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 a workspace, ordered by name, dates, budget, or totals.

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

Parameters#

NameTypeRequiredDescription
pageIndexintegerRequiredZero-based page index for pagination.
pageSizeintegerRequiredNumber of items per page (1-100).
workspaceIdstring (UUID)RequiredWorkspace identifier.
searchTermstring—Free-text search term to filter results (max 200 characters).
sortBy'name' | 'createdAt' | 'startAt' | 'endAt' | 'budget' | 'activitiesCount' | 'engagement' | 'impressions' | 'spend' | 'cpe' | 'cpm'—Campaign field to sort by.
sortDirection'asc' | 'desc'—Sort direction: ascending or descending.
dateFromstring—Earliest date to include, as YYYY-MM-DD in the workspace timezone.
dateTostring—Latest date to include, as YYYY-MM-DD in the workspace timezone. Use the same date as dateFrom for a single day.
status'active' | 'scheduled' | 'completed' | 'draft'—Filter by campaign status.
kind'campaign' | 'always_on'—Filter to dated campaigns or always-on work.
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?workspace_id=1c7743a8-6410-4a9e-9f3b-2c1d5e8a4b01
Authorization: Bearer {token}

Parameters#

NameTypeRequiredDescription
dateFromstring—Earliest date to include, as YYYY-MM-DD in the workspace timezone.
dateTostring—Latest date to include, as YYYY-MM-DD in the workspace timezone. Use the same date as dateFrom for a single day.
workspaceIdstring (UUID)RequiredWorkspace identifier.
status'active' | 'scheduled' | 'completed' | 'draft'—Filter by campaign status.
kind'campaign' | 'always_on'—Filter to dated campaigns or always-on work.
creatorIdstring (UUID)—Filter by creator identifier.
searchTermstring—Free-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

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

Parameters#

NameTypeRequiredDescription
summarystring | null—Short internal campaign summary.
objectivestring | null—Business or marketing objective the campaign is intended to advance.
audiencestring | null—Intended audience for the campaign.
keyMessagestring | null—Primary message the campaign should communicate.
desiredOutcomesstring | null—Desired outcomes or KPIs, without implying causal attribution.
channelsArray<string>—Planned channel labels for the campaign.
ownerUserIdstring (UUID) | null—Workspace user responsible for the campaign.
tagsArray<string>—Searchable campaign labels.
workspaceIdstring (UUID)RequiredWorkspace identifier.
namestringRequiredCampaign name.
kind'campaign' | 'always_on'—campaign (the default) for a dated push; always_on for ongoing work with no end date or budget. Always-on work starts today unless startAt is given.
startAtstring (ISO 8601) | null—Campaign start date.
endAtstring (ISO 8601) | null—Campaign end date. Leave out for always-on work.
budgetnumber | null—Total campaign budget (non-negative, max 1B). Leave out for always-on work.

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 | null—Short internal campaign summary.
objectivestring | null—Business or marketing objective the campaign is intended to advance.
audiencestring | null—Intended audience for the campaign.
keyMessagestring | null—Primary message the campaign should communicate.
desiredOutcomesstring | null—Desired outcomes or KPIs, without implying causal attribution.
channelsArray<string>—Planned channel labels for the campaign.
ownerUserIdstring (UUID) | null—Workspace user responsible for the campaign.
tagsArray<string>—Searchable campaign labels.
idstring (UUID)RequiredCampaign identifier to update.
namestring—Updated campaign name (1-255 characters).
kind'campaign' | 'always_on'—Switch between a dated campaign and always-on work. Switching to always_on clears the end date and budget.
startAtstring (ISO 8601) | null—Updated start date.
endAtstring (ISO 8601) | null—Updated end date.
budgetnumber | null—Updated 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

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

Parameters#

NameTypeRequiredDescription
workspaceIdstring (UUID)RequiredWorkspace identifier.
operation'create' | 'update' | 'delete' | 'duplicate'RequiredCampaign action to preview without changing data.
idstring (UUID)—Existing campaign identifier for update, delete, or duplicate.
namestring—Campaign name for create, update, or duplicate.
startAtstring (ISO 8601) | null—Proposed campaign start date.
endAtstring (ISO 8601) | null—Proposed campaign end date.
budgetnumber | null—
summarystring | null—Short internal campaign summary.
objectivestring | null—Business or marketing objective the campaign is intended to advance.
audiencestring | null—Intended audience for the campaign.
keyMessagestring | null—Primary message the campaign should communicate.
desiredOutcomesstring | null—Desired outcomes or KPIs, without implying causal attribution.
channelsArray<string>—Planned channel labels for the campaign.
ownerUserIdstring (UUID) | null—Workspace 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.
namestring—Name for the duplicated campaign.
startAtstring (ISO 8601) | null—Optional replacement start date.
endAtstring (ISO 8601) | null—Optional 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.

GET /v1/campaigns/metrics#

Fetch metrics for a single campaign including ISO currency, budget, spend, impressions, social engagement, delivery coverage, denominator-aware CPM and Social CPE, freshness, provenance, and data-quality warnings.

bash
GET /v1/campaigns/metrics?workspace_id=1c7743a8-6410-4a9e-9f3b-2c1d5e8a4b01&campaign_id=3a8d1f56-9e42-4b7c-a1d8-6f0e2b9c4a03
Authorization: Bearer {token}

Parameters#

NameTypeRequiredDescription
workspaceIdstring (UUID)RequiredWorkspace identifier.
campaignIdstring (UUID)RequiredCampaign identifier to get metrics for.

Response#

Returns { data, _meta } with the result.

GET /v1/campaigns/metrics/history#

Fetch campaign metrics over time with a configurable lookback window.

bash
GET /v1/campaigns/metrics/history?workspace_id=1c7743a8-6410-4a9e-9f3b-2c1d5e8a4b01&campaign_id=3a8d1f56-9e42-4b7c-a1d8-6f0e2b9c4a03
Authorization: Bearer {token}

Parameters#

NameTypeRequiredDescription
workspaceIdstring (UUID)RequiredWorkspace identifier.
campaignIdstring (UUID)RequiredCampaign identifier.
daysBackinteger—Number of days of history to return (1-365).

Response#

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

GET /v1/campaigns/portfolio#

Retrieve decision-ready portfolio health as the preferred starting point for broad campaign-health questions, including active, scheduled, completed, draft, and attention counts; budget and spend totals; brief completeness; evidence quality; priorities; and recommended next actions.

bash
GET /v1/campaigns/portfolio?workspace_id=1c7743a8-6410-4a9e-9f3b-2c1d5e8a4b01&days_back=30
Authorization: Bearer {token}

Parameters#

NameTypeRequiredDescription
workspaceIdstring (UUID)RequiredWorkspace identifier.
daysBackintegerRequiredTrailing window used for campaign changes and portfolio findings (1-365).

Response#

Returns { data, _meta } with the result.

GET /v1/campaigns/comparison#

Retrieve the preferred comparison workflow for selected campaigns over a trailing period, including current values, historical changes, denominator-aware efficiency metrics, ISO currency, evidence quality, and plain-language findings.

bash
GET /v1/campaigns/comparison?workspace_id=1c7743a8-6410-4a9e-9f3b-2c1d5e8a4b01&campaign_ids=...&days_back=30
Authorization: Bearer {token}

Parameters#

NameTypeRequiredDescription
workspaceIdstring (UUID)RequiredWorkspace identifier.
campaignIdsArray<string (UUID)>RequiredCampaign identifiers to compare.
daysBackintegerRequiredTrailing comparison window (1-365 days).

Response#

Returns { data, _meta } with the result.

GET /v1/campaigns/readiness#

Assess whether a campaign is ready to launch by reviewing its summary, objective, audience, desired outcomes, planned channels, dates, owner, budget, and linked activities.

bash
GET /v1/campaigns/readiness?workspace_id=1c7743a8-6410-4a9e-9f3b-2c1d5e8a4b01&campaign_id=3a8d1f56-9e42-4b7c-a1d8-6f0e2b9c4a03
Authorization: Bearer {token}

Parameters#

NameTypeRequiredDescription
workspaceIdstring (UUID)RequiredWorkspace identifier.
campaignIdstring (UUID)RequiredCampaign identifier to assess before launch.

Response#

Returns { data, _meta } with the result.

GET /v1/campaigns/closeout#

Generate a campaign closeout or review with recorded performance, ISO currency, evidence quality, limitations, and recommended follow-up actions without claiming causal attribution.

bash
GET /v1/campaigns/closeout?workspace_id=1c7743a8-6410-4a9e-9f3b-2c1d5e8a4b01&campaign_id=3a8d1f56-9e42-4b7c-a1d8-6f0e2b9c4a03
Authorization: Bearer {token}

Parameters#

NameTypeRequiredDescription
workspaceIdstring (UUID)RequiredWorkspace identifier.
campaignIdstring (UUID)RequiredCampaign identifier to summarize for closeout or review.

Response#

Returns { data, _meta } with the result.