API Reference
Campaigns
Audience Binding

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/json

Required 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

NameTypeDescription
campaign_idstring (UUID)Campaign identifier.

Request body

FieldTypeRequiredDescription
includearray1–25 entries. Profiles matching any included audience receive the campaign.
excludearray0–25 entries. Profiles matching any excluded audience are suppressed, even if they match an included audience.

Each entry in include and exclude:

FieldTypeRequiredDescription
audienceIdstring (UUID)ID of the audience or segment.
typestring"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

CodeHTTPMeaning
JOURNEY_API.PUBLIC.CAMPAIGNS.NOT_FOUND404Campaign not found in this tenant.
JOURNEY_API.PUBLIC.CAMPAIGNS.NOT_DRAFT409Campaign is not in draft status — binding is locked.
JOURNEY_API.PUBLIC.CAMPAIGNS.SUMMARY_UNAVAILABLE409Campaign is missing required persisted state.
JOURNEY_API.AUTH.INSUFFICIENT_SCOPE403Token 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. include must contain at least 1 entry; an empty include list is rejected.
  • No overlap. The same audience ID cannot appear in both include and exclude.
  • Cardinality. Max 25 entries in include, max 25 in exclude.
  • Reach evaluation. After updating the audience, audience.reach.status resets. The platform re-evaluates targeting asynchronously.

audience.reach.status values

StatusMeaning
idleNo evaluation has run since this audience was bound.
pendingEvaluation queued or in progress — do not rely on evaluatedCount yet.
okEvaluation complete. evaluatedCount and evaluatedAt are current.
failedEvaluation 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