Campaigns#

Group activities into campaigns for aggregate reporting.

Authentication required

All endpoints require a Bearer token in the Authorization header. See the Authentication guide for setup instructions.

GET /v1/campaigns#

Retrieve a paginated list of campaigns for an organization.

bash
GET /v1/campaigns?page_index=0&page_size=25&organization_id=1c7743a8-6410-4a9e-9f3b-2c1d5e8a4b01
Authorization: Bearer {token}

Parameters#

NameTypeRequiredDescription
pageIndexintegerRequiredZero-based page index for pagination.
pageSizeintegerRequiredNumber of items per page (1-100).
organizationIdstring (UUID)RequiredOrganization identifier.
searchTermstringFree-text search term to filter results (max 200 characters).
sortBystringColumn name to sort by.
sortDirection'asc' | 'desc'Sort direction: ascending or descending.
status'active' | 'scheduled' | 'completed' | 'draft'Filter by campaign status.
creatorIdstring (UUID)Filter by creator identifier.

Response#

Returns { items, totalCount, facets, _meta } with paginated results.

GET /v1/campaigns/stats#

Aggregate statistics for campaigns matching the given filters.

bash
GET /v1/campaigns/stats?organization_id=1c7743a8-6410-4a9e-9f3b-2c1d5e8a4b01
Authorization: Bearer {token}

Parameters#

NameTypeRequiredDescription
organizationIdstring (UUID)RequiredOrganization identifier.
status'active' | 'scheduled' | 'completed' | 'draft'Filter by campaign status.
creatorIdstring (UUID)Filter by creator identifier.
searchTermstringFree-text search term to filter results (max 200 characters).

Response#

Returns { data, _meta } with the result.

GET /v1/campaigns/:id#

Retrieve a single campaign by ID with full details.

bash
GET /v1/campaigns/:id
Authorization: Bearer {token}

Parameters#

NameTypeRequiredDescription
idstring (UUID)RequiredCampaign identifier.

Response#

Returns { data, _meta } with the result.

POST /v1/campaigns#

Create a campaign planning record with a name, summary, objective, audience, key message, desired outcomes, planned channels, owner, tags, dates, and budget. Status is derived from its dates and the response includes a mutation receipt.

bash
POST /v1/campaigns
Authorization: Bearer {token}
Content-Type: application/json

{
  "organization_id": "1c7743a8-6410-4a9e-9f3b-2c1d5e8a4b01",
  "name": "My Campaign"
}

Parameters#

NameTypeRequiredDescription
summarystring | nullShort internal campaign summary.
objectivestring | nullBusiness or marketing objective the campaign is intended to advance.
audiencestring | nullIntended audience for the campaign.
keyMessagestring | nullPrimary message the campaign should communicate.
desiredOutcomesstring | nullDesired outcomes or KPIs, without implying causal attribution.
channelsArray<string>Planned channel labels for the campaign.
ownerUserIdstring (UUID) | nullWorkspace user responsible for the campaign.
tagsArray<string>Searchable campaign labels.
organizationIdstring (UUID)RequiredOrganization identifier.
namestringRequiredCampaign name.
startAtstring (ISO 8601) | nullCampaign start date.
endAtstring (ISO 8601) | nullCampaign end date.
budgetnumber | nullTotal campaign budget (non-negative, max 1B).

Response#

Returns { data, mutation, _meta } with the result and a customer-facing mutation receipt.

PATCH /v1/campaigns/:id#

Update a campaign's planning brief, desired outcomes, owner, tags, budget, or dates. Status is derived from its dates and the response identifies the changed fields.

bash
PATCH /v1/campaigns/:id
Authorization: Bearer {token}

Parameters#

NameTypeRequiredDescription
summarystring | nullShort internal campaign summary.
objectivestring | nullBusiness or marketing objective the campaign is intended to advance.
audiencestring | nullIntended audience for the campaign.
keyMessagestring | nullPrimary message the campaign should communicate.
desiredOutcomesstring | nullDesired outcomes or KPIs, without implying causal attribution.
channelsArray<string>Planned channel labels for the campaign.
ownerUserIdstring (UUID) | nullWorkspace user responsible for the campaign.
tagsArray<string>Searchable campaign labels.
idstring (UUID)RequiredCampaign identifier to update.
namestringUpdated campaign name (1-255 characters).
startAtstring (ISO 8601) | nullUpdated start date.
endAtstring (ISO 8601) | nullUpdated end date.
budgetnumber | nullUpdated budget (non-negative, max 1B).

Response#

Returns { data, mutation, _meta } with the result and a customer-facing mutation receipt.

DELETE /v1/campaigns/:id#

Remove a campaign from normal use and unlink its associated activities. The response includes a customer-facing deletion receipt.

bash
DELETE /v1/campaigns/:id
Authorization: Bearer {token}

Parameters#

NameTypeRequiredDescription
idstring (UUID)RequiredCampaign identifier to delete.

Response#

Returns { data, mutation, _meta } with the result and a customer-facing mutation receipt.

Destructive action

Deleting a campaign permanently removes the campaign and unlinks all associated activities. This action cannot be undone.

POST /v1/campaigns/preview#

Retrieve a no-write preview of the exact customer-facing target, desired outcomes, budget, changed fields, derived status, and warning for a campaign create, update, delete, or duplicate action.

bash
POST /v1/campaigns/preview
Authorization: Bearer {token}
Content-Type: application/json

{
  "organization_id": "1c7743a8-6410-4a9e-9f3b-2c1d5e8a4b01",
  "operation": "..."
}

Parameters#

NameTypeRequiredDescription
organizationIdstring (UUID)RequiredOrganization identifier.
operation'create' | 'update' | 'delete' | 'duplicate'RequiredCampaign action to preview without changing data.
idstring (UUID)Existing campaign identifier for update, delete, or duplicate.
namestringCampaign name for create, update, or duplicate.
startAtstring (ISO 8601) | nullProposed campaign start date.
endAtstring (ISO 8601) | nullProposed campaign end date.
budgetnumber | null
summarystring | nullShort internal campaign summary.
objectivestring | nullBusiness or marketing objective the campaign is intended to advance.
audiencestring | nullIntended audience for the campaign.
keyMessagestring | nullPrimary message the campaign should communicate.
desiredOutcomesstring | nullDesired outcomes or KPIs, without implying causal attribution.
channelsArray<string>Planned channel labels for the campaign.
ownerUserIdstring (UUID) | nullWorkspace user responsible for the campaign.
tagsArray<string>Searchable campaign labels.

Response#

Returns { data, _meta } with the result.

POST /v1/campaigns/:id/duplicate#

Create a new draft by duplicating a campaign planning brief, optionally replacing its name and dates. Activities are not copied because an activity belongs to one campaign at a time.

bash
POST /v1/campaigns/:id/duplicate
Authorization: Bearer {token}

Parameters#

NameTypeRequiredDescription
idstring (UUID)RequiredCampaign identifier to duplicate.
namestringName for the duplicated campaign.
startAtstring (ISO 8601) | nullOptional replacement start date.
endAtstring (ISO 8601) | nullOptional replacement end date.

Response#

Returns { data, mutation, _meta } with the result and a customer-facing mutation receipt.

Link an activity to a campaign.

bash
POST /v1/campaigns/:id/activities
Authorization: Bearer {token}
Content-Type: application/json

{
  "campaign_id": "3a8d1f56-9e42-4b7c-a1d8-6f0e2b9c4a03",
  "activity_id": "7f2e9b34-5c81-4d6a-8e07-9a3b1c5d2f02"
}

Parameters#

NameTypeRequiredDescription
campaignIdstring (UUID)RequiredCampaign identifier to link the activity to.
activityIdstring (UUID)RequiredActivity identifier to link.

Response#

Returns { data, _meta } with the result.

Unlink an activity from a campaign.

bash
DELETE /v1/campaigns/:id/activities/:activityId
Authorization: Bearer {token}
Content-Type: application/json

{
  "campaign_id": "3a8d1f56-9e42-4b7c-a1d8-6f0e2b9c4a03"
}

Parameters#

NameTypeRequiredDescription
campaignIdstring (UUID)RequiredCampaign identifier.
activityIdstring (UUID)RequiredActivity identifier to unlink.

Response#

Returns { data, _meta } with the result.