Audience and campaign operations
Run workspace-scoped audience, export, and campaign operations through a shared validated contract.
/api/v1/assistantOn this page
Authentication
Send a RouteKite API key as a Bearer token. This endpoint requires the Operation-specific audience or campaign scope scope.
| Name | Type | Requirement | Description |
|---|---|---|---|
Authorization | string | Required | Bearer rk_ API key. |
Idempotency-Key | string | Confirmed mutations | 8 to 200 characters. Reuse only with the exact same operation. |
Request body
| Name | Type | Requirement | Description |
|---|---|---|---|
operation | string | Required | Discriminates the request contract in OpenAPI. |
Response
| Name | Type | Requirement | Description |
|---|---|---|---|
revision | integer | Revisioned resources | Current 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
| Status | Code | What it means | What to do |
|---|---|---|---|
| 400/422 | INVALID_REQUEST | Invalid input or field values. | Correct the structured request. |
| 403 | FORBIDDEN | Workspace or scope access is missing. | Use a key with the required access. |
| 409 | REVISION_CONFLICT | The resource or previewed schedule changed. | Refresh, preview, and confirm again. |
| 503 | STALE_ANALYTICS | Reporting is stale or unavailable. | Wait for reporting to refresh; do not substitute an empty audience. |