Skip to documentation
Dashboard
Audience and campaigns

Audience and campaign operations

Run workspace-scoped audience, export, and campaign operations through a shared validated contract.

POST/api/v1/assistant
On this page

Authentication

Send a RouteKite API key as a Bearer token. This endpoint requires the Operation-specific audience or campaign scope scope.

Required headers
NameTypeRequirementDescription
AuthorizationstringRequiredBearer rk_ API key.
Idempotency-KeystringConfirmed mutations8 to 200 characters. Reuse only with the exact same operation.

Request body

Request fields
NameTypeRequirementDescription
operationstringRequiredDiscriminates the request contract in OpenAPI.

Response

Response fields
NameTypeRequirementDescription
revisionintegerRevisioned resourcesCurrent revision used for later edits and confirmation.

Operation contract

The operation field selects the resource contract. See the machine-readable OpenAPI AssistantOperation schema for every request shape. New capabilities return FEATURE_UNAVAILABLE until enabled. Preview responses describe impact without persisting changes.

Field and topic reads accept audience:read or audience:write; audience mutations require audience:write. Campaign reads accept campaign:read, campaign:write, or campaign:send. Exports require read access to the requested dataset, including when inspecting or downloading an existing export. Idempotency keys are required for confirmed mutations, not for previews.

Errors

StatusCodeWhat it meansWhat to do
400/422INVALID_REQUESTInvalid input or field values.Correct the structured request.
403FORBIDDENWorkspace or scope access is missing.Use a key with the required access.
409REVISION_CONFLICTThe resource or previewed schedule changed.Refresh, preview, and confirm again.
503STALE_ANALYTICSReporting is stale or unavailable.Wait for reporting to refresh; do not substitute an empty audience.