Skip to content

Record something a recognised visitor did

POST
/audience/delivery/v1/interaction
curl --request POST \
--url https://api.ebitex.io/audience/delivery/v1/interaction \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "visitor": "example", "name": "example", "properties": {}, "interactionId": "example", "consent": { "cmp": "example", "gpc": true, "dnt": true, "cmpString": "example" } }'

Call this when a visitor does something your site wants on their timeline in Audience, for example pricing-viewed. It is not a page-view tracker: nothing is recorded for a visitor ebitex cannot attribute to a person, and each device may record at most 200 interactions in any 24 hours.

visitor is the device’s token and consent its raw consent signals, as for visitors/session. The interaction is recorded only when the device is recognised: a recognition token that has not been forgotten, consent granted on this device, and a link from the device to a person (made when your site or a form identifies them). Otherwise the answer is 202 with recorded: false and the reason (no_visitor, token_invalid, session_token, revoked or recognition_not_granted), and nothing is stored. This call never creates a person or links a device to one.

name is lower-case words joined by hyphens, at most 59 characters. It is stored as the interaction kind site.<name>. page-view is refused. properties may hold only declared visit properties, typed as declared (declare them under Settings, Visit properties in the Audience app); any other member is refused, so free-form personal data cannot reach the timeline. The properties, nested at most 8 levels, must fit in 16 KiB. interactionId is optional: sending the same one again from the same device records nothing new and answers duplicate: true, so a retry is safe.

A browser’s Sec-GPC and DNT headers count even if you do not forward them. The response is private, no-store.

Key: audience.delivery.read

Media typeapplication/json
One of:
null
Examplegenerated
{
"visitor": "example",
"name": "example",
"properties": {},
"interactionId": "example",
"consent": {
"cmp": "example",
"gpc": true,
"dnt": true,
"cmpString": "example"
}
}

200 with { "recorded": true, "duplicate": false, "reason": null } when the interaction is on the person’s timeline (duplicate is true for a replay), or 202 with { "recorded": false, "duplicate": false, "reason": "…" } when nothing was recorded.

validation_failed (a bad name or interactionId, or a property of the wrong type), undeclared_property (the errors member names each one) or name_not_accepted (page-view).

invalid_api_key: the key is missing, revoked, expired or not an Audience delivery key.

missing_api_key or invalid_api_key: no key was sent, or it is unknown, revoked or expired.

origin_denied or ip_denied: the key’s restriction does not admit this request. app_not_available.

scope_denied: the key lacks this route’s scope. origin_denied or ip_denied: a browser-safe key was used from an origin or address outside its restrictions. app_not_available: Content is not enabled for the organization.

The body is larger than 16 KiB.

interaction_cap_reached (this device has recorded 200 interactions in the last 24 hours) or rate_limited (the key’s per-minute budget is spent; Retry-After says when it resets).

Quota exceeded; Retry-After says how long to wait. too_many_failed_authentications: too many bad keys from this address.