Move a pass to another state
const url = 'https://api.ebitex.io/audience/management/v1/individuals/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/stages/example/rows/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/transitions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"transitionId":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","comment":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.ebitex.io/audience/management/v1/individuals/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/stages/example/rows/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/transitions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "transitionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "comment": "example" }'Fires one of the pass’s availableTransitions. The engine checks the transition’s condition and, if it has one, runs its actions; a transition into a terminal state closes the pass with its outcome, and an automatic transition that follows it runs in the same call. comment is kept with the move.
A key holds no role. It can fire a transition only when that transition has no role allow-list; one that does answers 403 transition_not_allowed. A key never holds the permission that overrides a role rule an Owner set, because anyone who can mint a key could otherwise use it to override one. The key’s name, and the fact that a key made the move, are what the person’s history and the organization’s activity log record.
Key: an Audience management key with audience.management.write (write also needs read; erase needs both).
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Examplegenerated
{ "transitionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "comment": "example"}Responses
Section titled “ Responses ”{ "id", "stage", "state": { "id", "name", "kind", "isTerminal" }, "outcome", "openedAtUtc", "stateEnteredAtUtc", "closedAtUtc", "facts": { … }, "source": { "kind", "key", "label" }, "availableTransitions": [ { "id", "name", "toStateId" } ], "rowVersion", "campaignId", "campaign": { "id", "name", "kind" } }. On an awareness pass, campaignId and campaign are read-only: the campaign the pass’s campaign fact resolves to (an alias the organization already holds, or an external campaign registered the first time the text is seen). Both are absent on any other stage and when the text resolves to nothing.
missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired, or it was not created from the Audience settings page.
payment_required: the organization’s subscription needs attention.
transition_not_allowed: the transition has a role allow-list, and a key holds no role.
scope_denied: the key lacks this route’s scope. ip_denied: the caller’s address is outside the key’s allowed ranges. app_not_available: Audience is not enabled for the organization.
stage_row_not_found.
not_found: no such route.
invalid_transition: that transition does not leave the pass’s current state. transition_vetoed: the transition’s condition is not met. outcome_blocked: a closing action failed and the pass was left where it was. stage_row_closed.
rate_limited: the key spent its requests-per-minute budget; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.