Audience Binding
Replace the audience configuration on a campaign — which segments are included and which are suppressed.
Base URL: https://api.experiture.ai/public/v1
Replace Campaign Audience
Completely replaces the include and exclude audience bindings on a campaign. This is a full replacement, not a merge — any previously bound audiences not present in the new payload are removed.
PUT /campaigns/:id/audience
Authorization: Bearer <token>
Content-Type: application/jsonRequired scope: campaigns:update
Draft only. Audience binding is only permitted while the campaign has authoringStatus: "draft". Attempting to update a scheduled or sent campaign returns 409 NOT_DRAFT.
Path parameters
| Name | Type | Description |
|---|---|---|
campaign_id | string (UUID) | Campaign identifier. |
Request body
| Field | Type | Required | Description |
|---|---|---|---|
include | array | ✅ | 1–25 entries. Profiles matching any included audience receive the campaign. |
exclude | array | — | 0–25 entries. Profiles matching any excluded audience are suppressed, even if they match an included audience. |
Each entry in include and exclude:
| Field | Type | Required | Description |
|---|---|---|---|
audienceId | string (UUID) | ✅ | ID of the audience or segment. |
type | string | ✅ | "audience" or "segment". |
Example request
curl -X PUT https://api.experiture.ai/public/v1/campaigns/4130bada-9264-465f-bc0c-a26bebcfcc81/audience \
-H "Authorization: Bearer <your_access_token>" \
-H "Content-Type: application/json" \
-d '{
"include": [
{ "audienceId": "a1b2c3d4-0000-0000-0000-000000000001", "type": "segment" },
{ "audienceId": "a1b2c3d4-0000-0000-0000-000000000002", "type": "audience" }
],
"exclude": [
{ "audienceId": "a1b2c3d4-0000-0000-0000-000000000099", "type": "audience" }
]
}'Response — 200 OK
Returns the full campaign object reflecting the updated audience bindings. Same shape as Get Campaign.
Errors
| Code | HTTP | Meaning |
|---|---|---|
JOURNEY_API.PUBLIC.CAMPAIGNS.NOT_FOUND | 404 | Campaign not found in this tenant. |
JOURNEY_API.PUBLIC.CAMPAIGNS.NOT_DRAFT | 409 | Campaign is not in draft status — binding is locked. |
JOURNEY_API.PUBLIC.CAMPAIGNS.SUMMARY_UNAVAILABLE | 409 | Campaign is missing required persisted state. |
JOURNEY_API.AUTH.INSUFFICIENT_SCOPE | 403 | Token lacks campaigns:update. |
Constraints
- Full replacement. Each call to this endpoint replaces all audience bindings. To add a segment, re-submit the full include/exclude list.
- At least one included audience.
includemust contain at least 1 entry; an empty include list is rejected. - No overlap. The same audience ID cannot appear in both
includeandexclude. - Cardinality. Max 25 entries in
include, max 25 inexclude. - Reach evaluation. After updating the audience,
audience.reach.statusresets. The platform re-evaluates targeting asynchronously.
audience.reach.status values
| Status | Meaning |
|---|---|
idle | No evaluation has run since this audience was bound. |
pending | Evaluation queued or in progress — do not rely on evaluatedCount yet. |
ok | Evaluation complete. evaluatedCount and evaluatedAt are current. |
failed | Evaluation failed. Previous count (if any) is preserved in evaluatedCount. Retry or rebind. |
Poll the campaign summary endpoint and wait for reach.status: "ok" before running preflight or creating a send job.
See Also
- Campaign Object — create and manage campaign containers
- Content Binding — assign template and sender
- Preflight — validate audience is configured correctly before send
- Campaigns Overview — lifecycle and scope reference