Move an account's pass
const url = 'https://api.ebitex.io/audience/management/v1/accounts/example/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/accounts/example/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 moves open from the pass’s current state. { "transitionId", "comment" }: the transitionId is one of the pass’s availableTransitions. A move into a final state closes the pass (completed or dropped).
An account moves through the same five lifecycle stages a person does (awareness, acquisition, conversion, retention, advocacy), each with the states and moves the organization defined in Audience settings. An account has at most one open pass per stage. A key holds no role, so it can only fire a move that has no role restriction.
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", "openedAtUtc", "stateEnteredAtUtc", "closedAtUtc", "outcome", "state": { "id", "name", … }, "facts": { "source", "medium", "campaign" }, "availableTransitions": [ … ], "rowVersion" }. facts is the first touch the pass was opened with.
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: that move is restricted to roles, and a key holds none.
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.
account_not_found or stage_row_not_found.
not_found: no such route.
invalid_transition, stage_row_closed, or accounts_not_enabled.
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.