Справочник API
Приём событий, профили, сегменты, цепочки и рассылки — спецификация OpenAPI 3.1.
Общие сведения
Описания методов и полей — на английском, как в спецификации.
{"message": "..."}; validation errors add errors by field path. Lists use cursor pagination (limit 1-200, cursor from next_cursor). POST requests accept an Idempotency-Key header: a repeat with the same key and body returns the stored response for 24 hours. Rate limits: 6000 requests/min per write key, 1200 requests/min per secret key (429). Error messages follow Accept-Language (en, ru, de, es, fr, it, pt, tr, uz, zh), otherwise the platform default language.Ключи
writeKeyhttp bearercdp_wk_…: ingestion only. Also accepted as Basic auth user orwriteKeybody field.secretKeyhttp bearercdp_sk_…: server-side only, permissions chosen when the key is created.
Ingest
Track an event
post/track
Тело запросаобязательно
typestringзначения:
"track", "identify", "page", "alias"messageIdstringдлина:
≤ 100anonymousIdstring | integeruserIdstring | integerpreviousIdstring | integereventstringдлина:
≤ 200namestringpropertiesobjecttraitsobjectcontextobjectconsentsobject[]identify only, secret key only: marketing consents given together with the customer data (sign-up or checkout form). Unknown channels are skipped.элементов:
≤ 20channelstringобязательношаблон:
^[a-z0-9_]{1,64}$· пример:"email"topicstringSubscription topic; the whole channel if omitted.шаблон:
^[a-z0-9_-]{1,64}$statusstringобязательнозначения:
"subscribed", "unsubscribed"
timestampstring (date-time)
Пример тела запроса
{
"type": "track",
"messageId": "string",
"anonymousId": "string",
"userId": "string",
"previousId": "string",
"event": "string",
"name": "string",
"properties": {},
"traits": {},
"context": {},
"consents": [
{
"channel": "email",
"topic": "string",
"status": "subscribed"
}
],
"timestamp": "2026-01-01T10:00:00Z"
}Ответы
202Accepted for asynchronous processing
acceptedintegerduplicatesinteger
- 401Missing, invalid or revoked key · Error
- 413Body over 1 MB · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Identify a profile and update traits
post/identify
Тело запросаобязательно
typestringзначения:
"track", "identify", "page", "alias"messageIdstringдлина:
≤ 100anonymousIdstring | integeruserIdstring | integerpreviousIdstring | integereventstringдлина:
≤ 200namestringpropertiesobjecttraitsobjectcontextobjectconsentsobject[]identify only, secret key only: marketing consents given together with the customer data (sign-up or checkout form). Unknown channels are skipped.элементов:
≤ 20channelstringобязательношаблон:
^[a-z0-9_]{1,64}$· пример:"email"topicstringSubscription topic; the whole channel if omitted.шаблон:
^[a-z0-9_-]{1,64}$statusstringобязательнозначения:
"subscribed", "unsubscribed"
timestampstring (date-time)
Пример тела запроса
{
"type": "track",
"messageId": "string",
"anonymousId": "string",
"userId": "string",
"previousId": "string",
"event": "string",
"name": "string",
"properties": {},
"traits": {},
"context": {},
"consents": [
{
"channel": "email",
"topic": "string",
"status": "subscribed"
}
],
"timestamp": "2026-01-01T10:00:00Z"
}Ответы
202Accepted for asynchronous processing
acceptedintegerduplicatesinteger
- 401Missing, invalid or revoked key · Error
- 413Body over 1 MB · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Track a page view
post/page
Тело запросаобязательно
typestringзначения:
"track", "identify", "page", "alias"messageIdstringдлина:
≤ 100anonymousIdstring | integeruserIdstring | integerpreviousIdstring | integereventstringдлина:
≤ 200namestringpropertiesobjecttraitsobjectcontextobjectconsentsobject[]identify only, secret key only: marketing consents given together with the customer data (sign-up or checkout form). Unknown channels are skipped.элементов:
≤ 20channelstringобязательношаблон:
^[a-z0-9_]{1,64}$· пример:"email"topicstringSubscription topic; the whole channel if omitted.шаблон:
^[a-z0-9_-]{1,64}$statusstringобязательнозначения:
"subscribed", "unsubscribed"
timestampstring (date-time)
Пример тела запроса
{
"type": "track",
"messageId": "string",
"anonymousId": "string",
"userId": "string",
"previousId": "string",
"event": "string",
"name": "string",
"properties": {},
"traits": {},
"context": {},
"consents": [
{
"channel": "email",
"topic": "string",
"status": "subscribed"
}
],
"timestamp": "2026-01-01T10:00:00Z"
}Ответы
202Accepted for asynchronous processing
acceptedintegerduplicatesinteger
- 401Missing, invalid or revoked key · Error
- 413Body over 1 MB · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Link a previous identifier to a user
post/alias
Тело запросаобязательно
typestringзначения:
"track", "identify", "page", "alias"messageIdstringдлина:
≤ 100anonymousIdstring | integeruserIdstring | integerpreviousIdstring | integereventstringдлина:
≤ 200namestringpropertiesobjecttraitsobjectcontextobjectconsentsobject[]identify only, secret key only: marketing consents given together with the customer data (sign-up or checkout form). Unknown channels are skipped.элементов:
≤ 20channelstringобязательношаблон:
^[a-z0-9_]{1,64}$· пример:"email"topicstringSubscription topic; the whole channel if omitted.шаблон:
^[a-z0-9_-]{1,64}$statusstringобязательнозначения:
"subscribed", "unsubscribed"
timestampstring (date-time)
Пример тела запроса
{
"type": "track",
"messageId": "string",
"anonymousId": "string",
"userId": "string",
"previousId": "string",
"event": "string",
"name": "string",
"properties": {},
"traits": {},
"context": {},
"consents": [
{
"channel": "email",
"topic": "string",
"status": "subscribed"
}
],
"timestamp": "2026-01-01T10:00:00Z"
}Ответы
202Accepted for asynchronous processing
acceptedintegerduplicatesinteger
- 401Missing, invalid or revoked key · Error
- 413Body over 1 MB · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Send up to 500 messages at once
post/batch
Тело запросаобязательно
элементов:
≤ 500
Пример тела запроса
{
"batch": [
{
"type": "track",
"messageId": "string",
"anonymousId": "string",
"userId": "string",
"previousId": "string",
"event": "string",
"name": "string",
"properties": {},
"traits": {},
"context": {},
"consents": [
{
"channel": "email",
"topic": "string",
"status": "subscribed"
}
],
"timestamp": "2026-01-01T10:00:00Z"
}
]
}Ответы
202Accepted for asynchronous processing
acceptedintegerduplicatesinteger
- 401Missing, invalid or revoked key · Error
- 413Body over 1 MB · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Check the API key
get/key
Ответы
200OK
typestringобязательнозначения:
"write", "secret"namestringобязательноprojectobjectобязательноuidstringnamestringtimezonestring
scopesstring[]обязательноPermissions of a secret key; empty for a write key.
- 401Missing, invalid or revoked key · Error
- 429Rate limit or monthly event quota exceeded · Error
Push
VAPID public key for PushManager.subscribe()
get/push/config
Ответы
Store a browser push subscription and link it to the visitor
post/push/subscriptions
Тело запросаобязательно
anonymousIdstringRequired without userIdдлина:
≤ 255userIdstringдлина:
≤ 255publicKeystringVAPID key the subscription was created withsubscriptionobjectобязательноPushSubscription.toJSON(); the endpoint must belong to a browser push serviceendpointstring (uri)обязательноexpirationTimeinteger | nullkeysobjectобязательноp256dhstringобязательноauthstringобязательно
Пример тела запроса
{
"anonymousId": "string",
"userId": "string",
"publicKey": "string",
"subscription": {
"endpoint": "https://example.com",
"expirationTime": 0,
"keys": {
"p256dh": "string",
"auth": "string"
}
}
}Ответы
201Subscription stored; consent is recorded once the profile is processed
subscription_idstring
- 401Missing, invalid or revoked key · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Forget a browser push subscription
delete/push/subscriptions
Тело запросаобязательно
endpointstringобязательно
Пример тела запроса
{
"endpoint": "string"
}Ответы
200Whether a subscription was removed
deletedboolean
- 401Missing, invalid or revoked key · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Recommendations
Product recommendations for the site
get/recommendations
anonymousId only. Only available products are returned. replenish — products the visitor buys regularly whose repeat-purchase cycle has come (needs “Time to reorder” in the recommendation settings).Параметры
typeв строке запросаstringобязательнозначения:
"personal", "popular", "trending", "viewed_with", "bought_with", "similar", "recently_viewed", "replenish"limitв строке запросаintegerпо умолчанию:
8· диапазон:1–24itemв строке запросаstringContext product id (or item[] for a cart) for viewed_with, bought_with, similar.categoryв строке запросаstringCategory id for popular and trending.exclude[]в строке запросаstring[]anonymousIdв строке запросаstringimage_widthв строке запросаintegerCard image width (image), px. Variants forare in srcset when imgproxy is configured (ADR-047). по умолчанию:
480· диапазон:64–1200languageв строке запросаstringVisitor language (BCP 47, as in context.locale): product names and links come in the catalog translation for the closest language (ADR-080).длина:
≤ 35
Ответы
200Recommended products
typestringrequest_idstring (uuid)itemsProductCard[]
- 401Missing, invalid or revoked key · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Website widget configured in the admin panel
get/widgets/{uid}
anonymousId only.Параметры
uidв путиstringобязательношаблон:
^[a-z0-9]{1,16}$item[]в строке запросаstring[]Context product ids (data-item): page product or cart items.categoryв строке запросаstringCategory id (data-category); overrides the widget category.exclude[]в строке запросаstring[]anonymousIdв строке запросаstringlanguageв строке запросаstringVisitor language (BCP 47, as in context.locale): the heading, the button and product names come in their translation for the closest language (ADR-078, ADR-080).длина:
≤ 35
Ответы
200Widget and products
widgetobjectuidstringtypestringstatusstringзначения:
"active", "paused"settingsobjecttitlestringlayoutstringзначения:
"grid", "carousel"columnsintegeraccentstring | nullradiusintegerbuttonstringshowPriceboolean
request_idstring | nullitemsProductCard[]
- 401Invalid key
- 403Request origin is not one of the key website domains
- 404Widget not found in the project
Meta
This OpenAPI specification
get/openapi.json
Ответы
200OK
object
Profiles
Get a profile by any identifier
get/profiles/{type}/{value}
profiles.pii.Параметры
typeв путиstringобязательнозначения:
"user_id", "anonymous_id", "email", "phone", "telegram_chat_id", "viber_id", "web_push"valueв путиstringобязательноNormalized like at ingestion (lower-case email, E.164 phone).
Ответы
200OK
idintegertraitsobjectidentitiesobjectfirst_seen_atstring (date-time)last_seen_atstring (date-time)
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Erase a profile and all profiles merged into it (GDPR)
delete/profiles/{type}/{value}
Параметры
typeв путиstringобязательнозначения:
"user_id", "anonymous_id", "email", "phone", "telegram_chat_id", "viber_id", "web_push"valueв путиstringобязательноNormalized like at ingestion (lower-case email, E.164 phone).
Ответы
Profile events, newest first, 50 per page
get/profiles/{type}/{value}/events
Параметры
typeв путиstringобязательнозначения:
"user_id", "anonymous_id", "email", "phone", "telegram_chat_id", "viber_id", "web_push"valueв путиstringобязательноNormalized like at ingestion (lower-case email, E.164 phone).beforeв строке запросаstring (date-time)Cursor:next_beforeof the previous page.nameв строке запросаstring
Ответы
Subscribe or unsubscribe a profile
put/profiles/{type}/{value}/consents
Параметры
typeв путиstringобязательнозначения:
"user_id", "anonymous_id", "email", "phone", "telegram_chat_id", "viber_id", "web_push"valueв путиstringобязательноNormalized like at ingestion (lower-case email, E.164 phone).
Тело запросаобязательно
channelstringобязательнопример:
"email"topicstringOmit for the whole channel (all).statusstringобязательнозначения:
"subscribed", "unsubscribed"
Пример тела запроса
{
"channel": "email",
"topic": "string",
"status": "subscribed"
}Ответы
200OK
object
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Create a Telegram deep link for a profile
post/telegram/link
Тело запросаобязательно
integrationstringIntegration uid when the project has several bots.
Пример тела запроса
{
"identity": {
"type": "user_id",
"value": "string"
},
"integration": "string"
}Ответы
200OK
urlstringtokenstringintegrationstring
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Create a Viber bot deep link for a profile
post/viber/link
Тело запросаобязательно
integrationstringIntegration uid when the project has several Viber bots.
Пример тела запроса
{
"identity": {
"type": "user_id",
"value": "string"
},
"integration": "string"
}Ответы
200OK
urlstringtokenstringintegrationstring
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Products
Create or update products and categories
post/products
Тело запросаобязательно
элементов:
≤ 1000categoriesobject[]элементов:
≤ 1000idstringобязательноnamestringобязательноparent_idstring | nulltranslationsobjectCategory name by language (BCP 47 tag → {name}).ключей:
≤ 20
Пример тела запроса
{
"items": [
{
"id": "string",
"name": "string",
"url": "https://example.com",
"image": "https://example.com",
"price": 0,
"old_price": 0,
"currency": "string",
"available": true,
"stock": 0,
"category_ids": [
"string"
],
"brand": "string",
"params": {},
"translations": {}
}
],
"categories": [
{
"id": "string",
"name": "string",
"parent_id": "string",
"translations": {}
}
]
}Ответы
200Saved
savedintegercategoriesinteger
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Delete products
delete/products
Тело запросаобязательно
idsstring[]обязательноэлементов:
1–1000
Пример тела запроса
{
"ids": [
"string"
]
}Ответы
200Deleted
deletedinteger
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Catalog
Events seen in the project with their properties
get/catalog/events
Ответы
200OK
dataCatalogEvent[]
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 429Rate limit or monthly event quota exceeded · Error
Profile traits of the project
get/catalog/traits
Ответы
200OK
dataCatalogTrait[]
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 429Rate limit or monthly event quota exceeded · Error
Segments
List segments
get/segments
Параметры
limitв строке запросаintegerпо умолчанию:
50· диапазон:1–200cursorв строке запросаstring
Ответы
Create a segment
post/segments
status. Rules use the same DSL as the segment builder (docs/architecture/segmentation.md).Параметры
Idempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
namestringобязательнодлина:
≤ 120descriptionstring | nulltypestringобязательнозначения:
"dynamic", "static"realtimebooleanschedule_minutesintegerзначения:
15, 30, 60, 180, 360, 720, 1440rulesobject
Пример тела запроса
{
"name": "string",
"description": "string",
"type": "dynamic",
"realtime": true,
"schedule_minutes": 15,
"rules": {}
}Ответы
201Created
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Get a segment with its rules
get/segments/{segment}
Параметры
segmentв путиintegerобязательно
Ответы
Update a segment (partial)
patch/segments/{segment}
Параметры
segmentв путиintegerобязательно
Тело запросаобязательно
namestringдлина:
≤ 120descriptionstring | nullrealtimebooleanschedule_minutesintegerrulesobject
Пример тела запроса
{
"name": "string",
"description": "string",
"realtime": true,
"schedule_minutes": 0,
"rules": {}
}Ответы
200OK
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Delete a segment
delete/segments/{segment}
Параметры
segmentв путиintegerобязательно
Ответы
- 204Deleted
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Queue a recomputation of a dynamic segment
post/segments/{segment}/compute
Параметры
segmentв путиintegerобязательно
Ответы
Segment members, latest entered first
get/segments/{segment}/members
Параметры
segmentв путиintegerобязательноlimitв строке запросаintegerпо умолчанию:
50· диапазон:1–200cursorв строке запросаstring
Ответы
200OK
dataobject[]обязательноprofile_idintegerentered_atstring (date-time)
next_cursorstring | nullобязательноPass ascursorto get the next page; null on the last page.
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 429Rate limit or monthly event quota exceeded · Error
Add profiles to a static segment
post/segments/{segment}/members
Параметры
segmentв путиintegerобязательноIdempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
элементов:
1–1000
Пример тела запроса
{
"identities": [
{
"type": "user_id",
"value": "string"
}
]
}Ответы
200OK
addedintegerunknownIdentityRef[]
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Remove profiles from a static segment
delete/segments/{segment}/members
Параметры
segmentв путиintegerобязательно
Тело запросаобязательно
элементов:
1–1000
Пример тела запроса
{
"identities": [
{
"type": "user_id",
"value": "string"
}
]
}Ответы
200OK
removedintegerunknownIdentityRef[]
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Whether a profile is a member
get/segments/{segment}/members/{type}/{value}
Параметры
segmentв путиintegerобязательноtypeв путиstringобязательнозначения:
"user_id", "anonymous_id", "email", "phone", "telegram_chat_id", "viber_id", "web_push"valueв путиstringобязательноNormalized like at ingestion (lower-case email, E.164 phone).
Ответы
Journeys
List journeys
get/journeys
Параметры
limitв строке запросаintegerпо умолчанию:
50· диапазон:1–200cursorв строке запросаstringstatusв строке запросаstringзначения:
"draft", "active", "paused", "archived"
Ответы
Create a journey draft
post/journeys
Параметры
Idempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
namestringобязательнодлина:
≤ 120descriptionstring | nullgraphobjectnodesarrayэлементов:
≤ 200edgesarrayэлементов:
≤ 400
entryobject
Пример тела запроса
{
"name": "string",
"description": "string",
"graph": {
"nodes": [],
"edges": []
},
"entry": {}
}Ответы
201Created
Все поля Journey:
draftobjectgraphobjectentryobject
publishedobject | nullgraphobjectentryobject
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Get a journey with its draft and published version
get/journeys/{journey}
Параметры
journeyв путиintegerобязательно
Ответы
200OK
Все поля Journey:
draftobjectgraphobjectentryobject
publishedobject | nullgraphobjectentryobject
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 429Rate limit or monthly event quota exceeded · Error
Update the draft (partial)
patch/journeys/{journey}
Параметры
journeyв путиintegerобязательно
Тело запросаобязательно
namestringдлина:
≤ 120descriptionstring | nullgraphobjectentryobject
Пример тела запроса
{
"name": "string",
"description": "string",
"graph": {},
"entry": {}
}Ответы
200OK
Все поля Journey:
draftobjectgraphobjectentryobject
publishedobject | nullgraphobjectentryobject
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Validate the draft without publishing
post/journeys/{journey}/validate
graph.nodes.2.data.template_id.Параметры
journeyв путиintegerобязательно
Ответы
200OK
validboolean
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Publish the draft as a new version
post/journeys/{journey}/publish
Параметры
journeyв путиintegerобязательноIdempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Ответы
200OK
Все поля Journey:
draftobjectgraphobjectentryobject
publishedobject | nullgraphobjectentryobject
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Pause: no new entries, participants stay
post/journeys/{journey}/pause
{"exit_all": true} also exits all participants. Only active journeys.Параметры
journeyв путиintegerобязательноIdempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запроса
exit_allboolean
Пример тела запроса
{
"exit_all": true
}Ответы
200OK
idintegernamestringdescriptionstring | nullstatusstringзначения:
"draft", "active", "paused", "archived"versioninteger | nullnext_run_atstring (date-time) | nullcreated_atstring (date-time)updated_atstring (date-time)
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Resume a paused journey
post/journeys/{journey}/resume
Параметры
journeyв путиintegerобязательноIdempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Ответы
200OK
idintegernamestringdescriptionstring | nullstatusstringзначения:
"draft", "active", "paused", "archived"versioninteger | nullnext_run_atstring (date-time) | nullcreated_atstring (date-time)updated_atstring (date-time)
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Archive: all participants exit
post/journeys/{journey}/archive
Параметры
journeyв путиintegerобязательноIdempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Ответы
200OK
idintegernamestringdescriptionstring | nullstatusstringзначения:
"draft", "active", "paused", "archived"versioninteger | nullnext_run_atstring (date-time) | nullcreated_atstring (date-time)updated_atstring (date-time)
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Journey participations, newest first
get/journeys/{journey}/enrollments
Параметры
journeyв путиintegerобязательноlimitв строке запросаintegerпо умолчанию:
50· диапазон:1–200cursorв строке запросаstringstatusв строке запросаstringзначения:
"active", "waiting", "completed", "exited", "failed"
Ответы
200OK
next_cursorstring | nullобязательноPass ascursorto get the next page; null on the last page.
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 429Rate limit or monthly event quota exceeded · Error
Funnel, goals and A/B branches for a period
get/journeys/{journey}/report
Параметры
journeyв путиintegerобязательноperiodв строке запросаintegerзначения:
7, 30, 90· по умолчанию:30
Ответы
Enroll a profile into a journey with the API trigger
post/journeys/{journey}/enroll
Параметры
journeyв путиintegerобязательноIdempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
dataobjectAvailable in templates ascontext.data.idempotency_keystringдлина:
≤ 150
Пример тела запроса
{
"identity": {
"type": "user_id",
"value": "string"
},
"data": {},
"idempotency_key": "string"
}Ответы
200Not enrolled (repeat key, re-entry policy, audience or limit)
enrolledbooleanenrollment_idinteger | nullprofile_idinteger
201Enrolled
enrolledbooleanenrollment_idinteger | nullprofile_idinteger
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 409The request cannot be applied in the current state · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Templates
List message templates
get/templates
Параметры
limitв строке запросаintegerпо умолчанию:
50· диапазон:1–200cursorв строке запросаstringchannelв строке запросаstringOnly templates of this channel.
Ответы
Create a message template
post/templates
Параметры
Idempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
namestringобязательнодлина:
≤ 120channel_keystringобязательноChannel of the template; cannot be changed later.topicstringпо умолчанию:
"marketing"· длина:≤ 64· шаблон:^[a-z0-9_-]+$transactionalbooleanпо умолчанию:
falselanguagestringMain language ofcontent; the project default language if omitted.длина:
≤ 16· пример:"de"contentobjectобязательноFields of the channel message schema, e.g.subject,htmlandtextfor email; string fields are Twig templates.translationsobjectOther language versions; each is validated likecontent. Omit to keep the stored versions, pass{}to delete them.ключей:
≤ 50
Пример тела запроса
{
"name": "string",
"channel_key": "string",
"topic": "marketing",
"transactional": false,
"language": "de",
"content": {},
"translations": {}
}Ответы
201Created
idintegernamestringchannelstringпример:
"email"topicstringSubscription topic the message belongs to.transactionalbooleanlanguagestringMain language ofcontent: recipients whose profile language has no version get it.длина:
≤ 16· пример:"de"contentobjectFields of the channel message schema, e.g.subject,htmlandtextfor email; string fields are Twig templates.translationsobjectOther language versions: language tag → content. A recipient gets the version for thelanguageprofile trait (exact tag, then the base language, then another variant of it), otherwisecontent.versionintegerGrows when any language version changes.created_atstring (date-time) | nullupdated_atstring (date-time) | null
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Get a message template
get/templates/{template}
Параметры
templateв путиintegerобязательно
Ответы
200OK
idintegernamestringchannelstringпример:
"email"topicstringSubscription topic the message belongs to.transactionalbooleanlanguagestringMain language ofcontent: recipients whose profile language has no version get it.длина:
≤ 16· пример:"de"contentobjectFields of the channel message schema, e.g.subject,htmlandtextfor email; string fields are Twig templates.translationsobjectOther language versions: language tag → content. A recipient gets the version for thelanguageprofile trait (exact tag, then the base language, then another variant of it), otherwisecontent.versionintegerGrows when any language version changes.created_atstring (date-time) | nullupdated_atstring (date-time) | null
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 429Rate limit or monthly event quota exceeded · Error
Update a message template (partial)
patch/templates/{template}
Параметры
templateв путиintegerобязательно
Тело запросаобязательно
namestringдлина:
≤ 120topicstringпо умолчанию:
"marketing"· длина:≤ 64· шаблон:^[a-z0-9_-]+$transactionalbooleanпо умолчанию:
falselanguagestringMain language ofcontent; the project default language if omitted.длина:
≤ 16· пример:"de"contentobjectFields of the channel message schema, e.g.subject,htmlandtextfor email; string fields are Twig templates.translationsobjectOther language versions; each is validated likecontent. Omit to keep the stored versions, pass{}to delete them.ключей:
≤ 50
Пример тела запроса
{
"name": "string",
"topic": "marketing",
"transactional": false,
"language": "de",
"content": {},
"translations": {}
}Ответы
200OK
idintegernamestringchannelstringпример:
"email"topicstringSubscription topic the message belongs to.transactionalbooleanlanguagestringMain language ofcontent: recipients whose profile language has no version get it.длина:
≤ 16· пример:"de"contentobjectFields of the channel message schema, e.g.subject,htmlandtextfor email; string fields are Twig templates.translationsobjectOther language versions: language tag → content. A recipient gets the version for thelanguageprofile trait (exact tag, then the base language, then another variant of it), otherwisecontent.versionintegerGrows when any language version changes.created_atstring (date-time) | nullupdated_atstring (date-time) | null
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Delete a message template
delete/templates/{template}
Параметры
templateв путиintegerобязательно
Ответы
Campaigns
List campaigns
get/campaigns
Параметры
limitв строке запросаintegerпо умолчанию:
50· диапазон:1–200cursorв строке запросаstring
Ответы
Create a campaign draft
post/campaigns
Параметры
Idempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
namestringобязательнодлина:
≤ 120descriptionstring | nullintegration_idinteger | nullChannel integration; the template of every variant must belong to its channel.элементов:
1–5rate_per_minuteinteger | nullдиапазон:
10–100000goalCampaignGoal
Пример тела запроса
{
"name": "string",
"description": "string",
"integration_id": 0,
"audience": {
"segment_ids": [
0
],
"exclude_segment_ids": [
0
]
},
"variants": [
{
"key": "string",
"template_id": 0,
"percent": 1
}
],
"ab": {
"test_percent": 5,
"metric": "opened",
"wait": {
"amount": 1,
"unit": "hour"
}
},
"schedule": {
"type": "now",
"at": "2026-11-01T10:00",
"repeat": "daily",
"time": "10:00",
"weekdays": [
1
],
"day_of_month": 1,
"start_date": "2026-01-01",
"end_date": "2026-01-01",
"local_time": true
},
"rate_per_minute": 10,
"goal": {
"event": "string",
"within": {
"amount": 1,
"unit": "hour"
}
}
}Ответы
201Created
idintegernamestringdescriptionstring | nullstatusstringзначения:
"draft", "scheduled", "sending", "sent", "paused", "cancelled"integration_idinteger | nullchannelstring | nullaudienceCampaignAudiencevariantsCampaignVariant[]scheduleCampaignSchedulerate_per_minuteinteger | nullgoalCampaignGoalnext_run_atstring (date-time) | nulllast_run_atstring (date-time) | nullcreated_atstring (date-time)updated_atstring (date-time)
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Get a campaign
get/campaigns/{campaign}
Параметры
campaignв путиintegerобязательно
Ответы
200OK
idintegernamestringdescriptionstring | nullstatusstringзначения:
"draft", "scheduled", "sending", "sent", "paused", "cancelled"integration_idinteger | nullchannelstring | nullaudienceCampaignAudiencevariantsCampaignVariant[]scheduleCampaignSchedulerate_per_minuteinteger | nullgoalCampaignGoalnext_run_atstring (date-time) | nulllast_run_atstring (date-time) | nullcreated_atstring (date-time)updated_atstring (date-time)
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 429Rate limit or monthly event quota exceeded · Error
Update a campaign (partial)
patch/campaigns/{campaign}
Параметры
campaignв путиintegerобязательно
Тело запросаобязательно
namestringдлина:
≤ 120descriptionstring | nullintegration_idinteger | nullChannel integration; the template of every variant must belong to its channel.audienceCampaignAudiencevariantsCampaignVariant[]элементов:
1–5scheduleCampaignSchedulerate_per_minuteinteger | nullдиапазон:
10–100000goalCampaignGoal
Пример тела запроса
{
"name": "string",
"description": "string",
"integration_id": 0,
"audience": {
"segment_ids": [
0
],
"exclude_segment_ids": [
0
]
},
"variants": [
{
"key": "string",
"template_id": 0,
"percent": 1
}
],
"ab": {
"test_percent": 5,
"metric": "opened",
"wait": {
"amount": 1,
"unit": "hour"
}
},
"schedule": {
"type": "now",
"at": "2026-11-01T10:00",
"repeat": "daily",
"time": "10:00",
"weekdays": [
1
],
"day_of_month": 1,
"start_date": "2026-01-01",
"end_date": "2026-01-01",
"local_time": true
},
"rate_per_minute": 10,
"goal": {
"event": "string",
"within": {
"amount": 1,
"unit": "hour"
}
}
}Ответы
200OK
idintegernamestringdescriptionstring | nullstatusstringзначения:
"draft", "scheduled", "sending", "sent", "paused", "cancelled"integration_idinteger | nullchannelstring | nullaudienceCampaignAudiencevariantsCampaignVariant[]scheduleCampaignSchedulerate_per_minuteinteger | nullgoalCampaignGoalnext_run_atstring (date-time) | nulllast_run_atstring (date-time) | nullcreated_atstring (date-time)updated_atstring (date-time)
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Delete a campaign
delete/campaigns/{campaign}
Параметры
campaignв путиintegerобязательно
Ответы
- 204Deleted
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Campaign report: last runs with per-variant stats
get/campaigns/{campaign}/report
Параметры
campaignв путиintegerобязательно
Ответы
Schedule (or launch) a campaign
post/campaigns/{campaign}/schedule
now starts within a minute.Параметры
campaignв путиintegerобязательноIdempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Ответы
200OK
idintegernamestringdescriptionstring | nullstatusstringзначения:
"draft", "scheduled", "sending", "sent", "paused", "cancelled"integration_idinteger | nullchannelstring | nullaudienceCampaignAudiencevariantsCampaignVariant[]scheduleCampaignSchedulerate_per_minuteinteger | nullgoalCampaignGoalnext_run_atstring (date-time) | nulllast_run_atstring (date-time) | nullcreated_atstring (date-time)updated_atstring (date-time)
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Pause a campaign
post/campaigns/{campaign}/pause
Параметры
campaignв путиintegerобязательноIdempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Ответы
200OK
idintegernamestringdescriptionstring | nullstatusstringзначения:
"draft", "scheduled", "sending", "sent", "paused", "cancelled"integration_idinteger | nullchannelstring | nullaudienceCampaignAudiencevariantsCampaignVariant[]scheduleCampaignSchedulerate_per_minuteinteger | nullgoalCampaignGoalnext_run_atstring (date-time) | nulllast_run_atstring (date-time) | nullcreated_atstring (date-time)updated_atstring (date-time)
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Resume a paused campaign
post/campaigns/{campaign}/resume
Параметры
campaignв путиintegerобязательноIdempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Ответы
200OK
idintegernamestringdescriptionstring | nullstatusstringзначения:
"draft", "scheduled", "sending", "sent", "paused", "cancelled"integration_idinteger | nullchannelstring | nullaudienceCampaignAudiencevariantsCampaignVariant[]scheduleCampaignSchedulerate_per_minuteinteger | nullgoalCampaignGoalnext_run_atstring (date-time) | nulllast_run_atstring (date-time) | nullcreated_atstring (date-time)updated_atstring (date-time)
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Cancel a campaign
post/campaigns/{campaign}/cancel
Параметры
campaignв путиintegerобязательноIdempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Ответы
200OK
idintegernamestringdescriptionstring | nullstatusstringзначения:
"draft", "scheduled", "sending", "sent", "paused", "cancelled"integration_idinteger | nullchannelstring | nullaudienceCampaignAudiencevariantsCampaignVariant[]scheduleCampaignSchedulerate_per_minuteinteger | nullgoalCampaignGoalnext_run_atstring (date-time) | nulllast_run_atstring (date-time) | nullcreated_atstring (date-time)updated_atstring (date-time)
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Chat
Website chat widget settings
get/chat/config
Used by the tracker: whether the chat is enabled, online state (working hours and operators online), color, position, pre-chat form and texts in the visitor language.
Used by the website chat widget of the tracker; not part of the SDKs. To read and answer conversations from a server, use /conversations.
Параметры
languageв строке запросаstringдлина:
≤ 35
Ответы
200Settings; only enabled: false when the chat is off
enabledbooleanonlinebooleancolorstringpositionstringзначения:
"right", "left"prechatbooleantextsobjecttitlestringgreetingstringofflinestring
Messages of the visitor conversation
get/chat/messages
/conversations.Параметры
conversationв строке запросаstring (uuid)обязательноtokenв строке запросаstringобязательнодлина:
≤ 64afterв строке запросаintegerдиапазон:
≥ 0readв строке запросаbooleanMark operator replies as read by the visitorпо умолчанию:
true
Ответы
200Messages visible to the visitor
conversationChatVisitorConversationmessagesChatVisitorMessage[]
- 404Unknown conversation or wrong token
Send a visitor message
post/chat/messages
Finds the visitor profile by userId or anonymousId (creates it if needed) and adds the message to its open website conversation or starts a new one.
Used by the website chat widget of the tracker; not part of the SDKs. To read and answer conversations from a server, use /conversations.
Тело запросаобязательно
anonymousIdstringобязательнодлина:
≤ 255userIdstringдлина:
≤ 255conversationstring (uuid)Conversation id from POST /chat/messagestokenstringVisitor token of the conversation from POST /chat/messagesдлина:
≤ 64bodystringобязательнодлина:
≤ 4000namestringдлина:
≤ 100emailstring (email)длина:
≤ 255pagestringPage URL (http/https)длина:
≤ 2000languagestringдлина:
≤ 35customer_tokenstringToken of the customer signed in to the store website, issued by the store (store MCP contract, docs/api/store-mcp.md#5). The store verifies it; the platform stores it encrypted.длина:
≤ 2000
Пример тела запроса
{
"anonymousId": "string",
"userId": "string",
"conversation": "00000000-0000-0000-0000-000000000000",
"token": "string",
"body": "string",
"name": "string",
"email": "string",
"page": "string",
"language": "string",
"customer_token": "string"
}Ответы
201Message stored
conversationChatVisitorConversationmessageChatVisitorMessage
- 404The website chat is turned off
- 429Too many messages from the visitor
The visitor is typing
post/chat/typing
/conversations.Тело запросаобязательно
conversationstring (uuid)обязательноConversation id from POST /chat/messagestokenstringобязательноVisitor token of the conversation from POST /chat/messagesдлина:
≤ 64
Пример тела запроса
{
"conversation": "00000000-0000-0000-0000-000000000000",
"token": "string"
}Ответы
- 200Shown to operators of the open conversation
- 404Unknown conversation or wrong token
Rate the conversation
post/chat/rating
/conversations.Тело запросаобязательно
conversationstring (uuid)обязательноConversation id from POST /chat/messagestokenstringобязательноVisitor token of the conversation from POST /chat/messagesдлина:
≤ 64ratingintegerобязательнодиапазон:
1–5commentstringдлина:
≤ 1000
Пример тела запроса
{
"conversation": "00000000-0000-0000-0000-000000000000",
"token": "string",
"rating": 1,
"comment": "string"
}Ответы
200Rating stored
conversationChatVisitorConversation
- 404Unknown conversation or wrong token
Ask for a human operator
post/chat/handoff
/conversations.Тело запросаобязательно
conversationstring (uuid)обязательноConversation id from POST /chat/messagestokenstringобязательноVisitor token of the conversation from POST /chat/messagesдлина:
≤ 64
Пример тела запроса
{
"conversation": "00000000-0000-0000-0000-000000000000",
"token": "string"
}Ответы
200The bot handed the conversation over to the operators
conversationChatVisitorConversation
- 404Unknown conversation or wrong token
Realtime tokens of the visitor conversation
post/chat/realtime
Centrifugo connection token (anonymous) and subscription token for the channel of this conversation only.
Used by the website chat widget of the tracker; not part of the SDKs. To read and answer conversations from a server, use /conversations.
Тело запросаобязательно
conversationstring (uuid)обязательноConversation id from POST /chat/messagestokenstringобязательноVisitor token of the conversation from POST /chat/messagesдлина:
≤ 64
Пример тела запроса
{
"conversation": "00000000-0000-0000-0000-000000000000",
"token": "string"
}Ответы
200Tokens
urlstringchannelstringconnection_tokenstringsubscription_tokenstring
- 404Unknown conversation or wrong token
Search
Product search for the site
get/search
relaxed). With anonymousId the first results are reordered by the categories and brands the visitor looked at (personalized). Facets are counted over the whole query, before the category, brand and price filters.Параметры
qв строке запросаstringQuery text; empty — the whole catalog.длина:
≤ 200categoryв строке запросаstringCategory id; products of its subcategories too.brand[]в строке запросаstring[]элементов:
≤ 20price_minв строке запросаnumberдиапазон:
≥ 0price_maxв строке запросаnumberдиапазон:
≥ 0attrв строке запросаobjectFilters by product characteristics of the store industry (ADR-114), e.g.attr[season]=winter&attr[rim_diameter][]=16&attr[rim_diameter][]=17: any of the values of a key, all keys. Keys and values — fromfacets.attributes.ключей:
≤ 20sortв строке запросаstringзначения:
"relevance", "popular", "price_asc", "price_desc"· по умолчанию:"relevance"pageв строке запросаintegerпо умолчанию:
1· диапазон:1–100per_pageв строке запросаintegerпо умолчанию:
24· диапазон:1–48allв строке запросаbooleanInclude products that are not available.по умолчанию:
falseanonymousIdв строке запросаstringTracker visitor id for the personal order.image_widthв строке запросаintegerпо умолчанию:
480· диапазон:64–1200languageв строке запросаstringVisitor language (BCP 47, as in context.locale): product names and links come in the catalog translation for the closest language (ADR-080).длина:
≤ 35
Ответы
200Found products
request_idstring (uuid)querystringtotalintegerpageintegerper_pageintegerrelaxedbooleanNothing matched all words: products matching any word.personalizedbooleanitemsProductCard[]Все поля ProductCard:
availableboolean
facetsobjectcategoriesobject[]idstringnamestringcountinteger
brandsobject[]namestringcountinteger
priceobjectminnumber | nullmaxnumber | null
attributesobject[]Characteristics of the store industry with values and product counts; values go toattr[key].keystringnamestringvaluesobject[]valuestringlabelstringcountinteger
redirectstring (uri) | nullRedirect rule of the query (Site → Search): the page to open instead of the results, or null.filtersobjectSizes and parameters recognized in the query text and applied as filters (“205/55 r16 winter” → tire_width, tire_profile, rim_diameter, season); empty when nothing was recognized or nothing matched them.
- 401Missing, invalid or revoked key · Error
- 402Product search is not in the plan of the project (code feature_unavailable)
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Search suggestions while typing
get/search/suggest
search events of the last 30 days). An empty query returns only the popular queries.Параметры
qв строке запросаstringдлина:
≤ 100limitв строке запросаintegerProducts in the suggestion.по умолчанию:
6· диапазон:1–10image_widthв строке запросаintegerпо умолчанию:
480· диапазон:64–1200languageв строке запросаstringVisitor language (BCP 47, as in context.locale): product names and links come in the catalog translation for the closest language (ADR-080).длина:
≤ 35
Ответы
200Suggestions
productsProductCard[]Все поля ProductCard:
availableboolean
categoriesobject[]idstringnamestring
queriesstring[]redirectstring (uri) | nullRedirect rule of the query (Site → Search): the page to open instead of the results, or null.
- 401Missing, invalid or revoked key · Error
- 402Product search is not in the plan of the project (code feature_unavailable)
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Analytics
Run an event report
post/analytics/reports
definition and the result — the same as the analytics pages.Тело запросаобязательно
seriesobject[]обязательноэлементов:
1–5eventstring | nullmetricstringзначения:
"count", "profiles", "per_profile", "sum", "avg"propertystring | nullfiltersPropertyFilter[]
profilesProfileRulesbreakdownBreakdownintervalAnalyticsIntervalperiodAnalyticsPeriodcompareboolean
Пример тела запроса
{
"series": [
{
"event": "string",
"metric": "count",
"property": "string",
"filters": [
{
"key": "string",
"operator": "string",
"value": null
}
]
}
],
"profiles": {},
"breakdown": {
"source": "property",
"key": "string"
},
"interval": "day",
"period": {
"last": 7
},
"compare": true
}Ответы
200OK
definitionobjectобязательноNormalized definitionperiodobjectобязательноfromstring (date)tostring (date)
bucketsstring (date)[]обязательноseriesobject[]обязательноPer series: index, total, values per bucket, previous period, breakdown
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Run a funnel
post/analytics/funnels
definition and the result — the same as the analytics pages.Тело запросаобязательно
stepsobject[]обязательноэлементов:
2–10eventstringобязательноfiltersPropertyFilter[]
windowobjectConversion window from the first step, up to 90 daysamountintegerдиапазон:
≥ 1unitstringзначения:
"minute", "hour", "day"
orderstringзначения:
"sequential", "strict"profilesProfileRulesbreakdownBreakdownperiodAnalyticsPeriod
Пример тела запроса
{
"steps": [
{
"event": "string",
"filters": [
{
"key": "string",
"operator": "string",
"value": null
}
]
}
],
"window": {
"amount": 1,
"unit": "minute"
},
"order": "sequential",
"profiles": {},
"breakdown": {
"source": "property",
"key": "string"
},
"period": {
"last": 7
}
}Ответы
200OK
definitionobjectобязательноNormalized definitionperiodobjectобязательноfromstring (date)tostring (date)
stepsobject[]обязательноPer step: event, reached, from_start, from_previous, median_seconds, avg_secondsbreakdownobject[]обязательноPer breakdown value: value, steps (reached per step)time_samplenumberShare of profiles used for time between steps
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Run a retention report
post/analytics/retention
definition and the result — the same as the analytics pages.Тело запросаобязательно
startobjectобязательноeventstring | nullfiltersPropertyFilter[]
returnobjecteventstring | nullfiltersPropertyFilter[]
cohortstringзначения:
"first", "period"intervalAnalyticsIntervalperiodsintegerUp to 30 days, 12 weeks or 12 monthsдиапазон:
1–30returnsstringзначения:
"exact", "rolling"profilesProfileRulesperiodAnalyticsPeriod
Пример тела запроса
{
"start": {
"event": "string",
"filters": [
{
"key": "string",
"operator": "string",
"value": null
}
]
},
"return": {
"event": "string",
"filters": [
{
"key": "string",
"operator": "string",
"value": null
}
]
},
"cohort": "first",
"interval": "day",
"periods": 1,
"returns": "exact",
"profiles": {},
"period": {
"last": 7
}
}Ответы
200OK
definitionobjectобязательноNormalized definitionperiodobjectобязательноfromstring (date)tostring (date)
cohortsobject[]обязательноPer cohort: date, size, values (returned per period, null — not yet), open (period still running)averageobject[]обязательноPer period: period, rate, profiles
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Run a paths report
post/analytics/paths
definition and the result — the same as the analytics pages.Тело запросаобязательно
eventstringобязательноfiltersPropertyFilter[]directionstringзначения:
"after", "before"stepsintegerдиапазон:
1–5gap_minutesintegerдиапазон:
1–1440excludestring[]элементов:
≤ 20profilesProfileRulesperiodAnalyticsPeriod
Пример тела запроса
{
"event": "string",
"filters": [
{
"key": "string",
"operator": "string",
"value": null
}
],
"direction": "after",
"steps": 1,
"gap_minutes": 1,
"exclude": [
"string"
],
"profiles": {},
"period": {
"last": 7
}
}Ответы
200OK
definitionobjectобязательноNormalized definitionperiodobjectобязательноfromstring (date)tostring (date)
totalintegerобязательноnodesobject[]обязательноlinksobject[]обязательноpathsobject[]обязательноMost frequent paths: events, profilestruncatedboolean
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Run a revenue report
post/analytics/revenue
definition and the result — the same as the analytics pages.Тело запросаобязательно
eventstringPurchase event; by default from the prediction settingsamountstringNumeric order amount propertyproduct_propertystringintervalAnalyticsIntervalltv_intervalstringзначения:
"week", "month"ltv_periodsintegerдиапазон:
1–12profilesProfileRulesperiodAnalyticsPeriod
Пример тела запроса
{
"event": "string",
"amount": "string",
"product_property": "string",
"interval": "day",
"ltv_interval": "week",
"ltv_periods": 1,
"profiles": {},
"period": {
"last": 7
}
}Ответы
200OK
definitionobjectобязательноNormalized definitionperiodobjectобязательноfromstring (date)tostring (date)
currencystring | nullother_currency_ordersintegersummaryobjectобязательноseriesobjectобязательноltvobjectобязательноproductsobject[]обязательноcategoriesobject[]обязательно
- 401Missing, invalid or revoked key · Error
- 402Revenue, traffic and attribution reports are not in the plan of the project (code feature_unavailable, feature revenue_analytics)
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Run a traffic sources report
post/analytics/traffic
definition and the result — the same as the analytics pages.Тело запросаобязательно
dimensionstringзначения:
"channel", "source", "source_medium", "campaign", "referrer", "landing"intervalAnalyticsIntervaleventstringamountstringprofilesProfileRulesperiodAnalyticsPeriod
Пример тела запроса
{
"dimension": "channel",
"interval": "day",
"event": "string",
"amount": "string",
"profiles": {},
"period": {
"last": 7
}
}Ответы
200OK
definitionobjectобязательноNormalized definitionperiodobjectобязательноfromstring (date)tostring (date)
currencystring | nullpurchasesbooleansummaryobjectобязательноrowsobject[]обязательноrow_countintegerchartobjectобязательно
- 401Missing, invalid or revoked key · Error
- 402Revenue, traffic and attribution reports are not in the plan of the project (code feature_unavailable, feature revenue_analytics)
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Run a revenue attribution report
post/analytics/attribution
definition and the result — the same as the analytics pages.Тело запросаобязательно
window_daysintegerзначения:
1, 3, 7, 14, 30modelstringзначения:
"last", "first", "linear"intervalAnalyticsIntervaleventstringamountstringprofilesProfileRulesperiodAnalyticsPeriod
Пример тела запроса
{
"window_days": 1,
"model": "last",
"interval": "day",
"event": "string",
"amount": "string",
"profiles": {},
"period": {
"last": 7
}
}Ответы
200OK
definitionobjectобязательноNormalized definitionperiodobjectобязательноfromstring (date)tostring (date)
currencystring | nullsummaryobjectобязательноchannelsobject[]обязательноPer channel: channel, clicks, touched_orders, revenue and orders by modelitemsobject[]обязательноPer campaign, journey, message channel or widgetchartobject
- 401Missing, invalid or revoked key · Error
- 402Revenue, traffic and attribution reports are not in the plan of the project (code feature_unavailable, feature revenue_analytics)
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
List saved reports
get/analytics/saved-reports
Параметры
limitв строке запросаintegerпо умолчанию:
50· диапазон:1–200cursorв строке запросаstring
Ответы
Save a report
post/analytics/saved-reports
definition.* paths.Параметры
Idempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
namestringобязательнодлина:
≤ 120definitionobjectобязательноDefinition of the report type — see the run operationsviewobject
Пример тела запроса
{
"name": "string",
"type": "report",
"definition": {},
"view": {}
}Ответы
201Created
Все поля SavedReport:
definitionobjectобязательноviewobjectобязательноPage view settings: chart type, metric
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Get a saved report
get/analytics/saved-reports/{report}
Параметры
reportв путиintegerобязательно
Ответы
200OK
Все поля SavedReport:
definitionobjectобязательноviewobjectобязательноPage view settings: chart type, metric
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 429Rate limit or monthly event quota exceeded · Error
Update a saved report
patch/analytics/saved-reports/{report}
Параметры
reportв путиintegerобязательно
Тело запросаобязательно
namestringдлина:
≤ 120definitionobjectviewobject
Пример тела запроса
{
"name": "string",
"definition": {},
"view": {}
}Ответы
200OK
Все поля SavedReport:
definitionobjectобязательноviewobjectобязательноPage view settings: chart type, metric
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Delete a saved report
delete/analytics/saved-reports/{report}
Параметры
reportв путиintegerобязательно
Ответы
Run a saved report
post/analytics/saved-reports/{report}/result
period replaces the period of the saved definition. Runs the report in ClickHouse (up to 30 s; results cached for 5 minutes). Rate limit: 30 report calculations per minute per key, separate from the general API limit. The response holds the normalized definition and the result — the same as the analytics pages.Параметры
reportв путиintegerобязательно
Тело запросаобязательно
periodAnalyticsPeriod
Пример тела запроса
{
"period": {
"last": 7
}
}Ответы
200OK
Объект с произвольными ключами.
- 401Missing, invalid or revoked key · Error
- 402Revenue, traffic and attribution reports are not in the plan of the project (code feature_unavailable, feature revenue_analytics)
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
List dashboards
get/analytics/dashboards
Параметры
limitв строке запросаintegerпо умолчанию:
50· диапазон:1–200cursorв строке запросаstring
Ответы
Create a dashboard
post/analytics/dashboards
Параметры
Idempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
namestringобязательнодлина:
≤ 120layoutobject[]элементов:
≤ 24report_idintegerобязательноsizestringзначения:
"half", "full"
periodAnalyticsPeriod
Пример тела запроса
{
"name": "string",
"layout": [
{
"report_id": 0,
"size": "half"
}
],
"period": {
"last": 7
}
}Ответы
201Created
idintegerобязательноnamestringобязательноlayoutobject[]обязательноэлементов:
≤ 24report_idintegerобязательноsizestringзначения:
"half", "full"
created_atstring (date-time)обязательноupdated_atstring (date-time)обязательно
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Get a dashboard
get/analytics/dashboards/{dashboard}
Параметры
dashboardв путиintegerобязательно
Ответы
200OK
idintegerобязательноnamestringобязательноlayoutobject[]обязательноэлементов:
≤ 24report_idintegerобязательноsizestringзначения:
"half", "full"
created_atstring (date-time)обязательноupdated_atstring (date-time)обязательно
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 429Rate limit or monthly event quota exceeded · Error
Update a dashboard
patch/analytics/dashboards/{dashboard}
layout replaces the whole layout.Параметры
dashboardв путиintegerобязательно
Тело запросаобязательно
namestringдлина:
≤ 120layoutobject[]элементов:
≤ 24report_idintegerобязательноsizestringзначения:
"half", "full"
periodAnalyticsPeriod
Пример тела запроса
{
"name": "string",
"layout": [
{
"report_id": 0,
"size": "half"
}
],
"period": {
"last": 7
}
}Ответы
200OK
idintegerобязательноnamestringобязательноlayoutobject[]обязательноэлементов:
≤ 24report_idintegerобязательноsizestringзначения:
"half", "full"
created_atstring (date-time)обязательноupdated_atstring (date-time)обязательно
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Delete a dashboard
delete/analytics/dashboards/{dashboard}
Параметры
dashboardв путиintegerобязательно
Ответы
Loyalty
Calculate points for a cart
post/loyalty/calculate
amount (at most max_redeem_percent of the amount and the balance), the discount in the project currency and an estimate of points the order will earn at the member's tier (rules are not included — they depend on the order).Тело запросаобязательно
amountnumberобязательноCart amount in the project currencyдиапазон:
≥ 0
Пример тела запроса
{
"profile": {
"type": "user_id",
"value": "string"
},
"amount": 0
}Ответы
200OK
memberbooleanbalanceintegertierstring | nullmax_pointsintegermax_discountnumberearn_pointsintegerpoint_valuenumbercurrencystring | null
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Loyalty account of a profile
get/loyalty/profiles/{type}/{value}
member: false.Параметры
typeв путиstringобязательнозначения:
"user_id", "anonymous_id", "email", "phone", "telegram_chat_id", "viber_id", "web_push"valueв путиstringобязательноNormalized like at ingestion (lower-case email, E.164 phone).
Ответы
200OK
memberbooleanbalanceintegerAvailable pointspendingintegerPoints waiting for the return periodtierstring | nulltier_spendnumberexpiringintegerPoints expiring within 30 daysexpires_atstring (date-time) | nullenrolled_atstring (date-time) | nullreferral_codestring | nullCode of the member for inviting friends.referral_urlstring | nullReferral link (?ref=on the store page) when referrals are on.referralsobjectFriends who came with the code, of them rewarded, and points for them.invitedintegerrewardedintegerpointsinteger
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 429Rate limit or monthly event quota exceeded · Error
Point history of a profile
get/loyalty/profiles/{type}/{value}/transactions
earn, cancel, expire, adjust, redeem (a hold or a redemption), refund (points returned). Cursor pages.Параметры
typeв путиstringобязательнозначения:
"user_id", "anonymous_id", "email", "phone", "telegram_chat_id", "viber_id", "web_push"valueв путиstringобязательноNormalized like at ingestion (lower-case email, E.164 phone).limitв строке запросаintegerпо умолчанию:
50· диапазон:1–200cursorв строке запросаstring
Ответы
Join the program
post/loyalty/members
enrollment: explicit). Returns 200 if the profile is already a member.Параметры
Idempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
Пример тела запроса
{
"profile": {
"type": "user_id",
"value": "string"
}
}Ответы
201Created
memberbooleanbalanceintegerAvailable pointspendingintegerPoints waiting for the return periodtierstring | nulltier_spendnumberexpiringintegerPoints expiring within 30 daysexpires_atstring (date-time) | nullenrolled_atstring (date-time) | nullreferral_codestring | nullCode of the member for inviting friends.referral_urlstring | nullReferral link (?ref=on the store page) when referrals are on.referralsobjectFriends who came with the code, of them rewarded, and points for them.invitedintegerrewardedintegerpointsinteger
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Apply a friend's referral code
post/loyalty/referrals
code: referrals off, unknown code, own code, existing customer.Параметры
Idempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
codestringобязательнодлина:
≤ 16
Пример тела запроса
{
"profile": {
"type": "user_id",
"value": "string"
},
"code": "string"
}Ответы
200Counted before
statusstringpending— waiting for the friend's first order.значения:
"pending", "rewarded", "expired", "limit", "cancelled"codestringfriend_pointsintegerfriend_promo_codestring | nullrewardedbooleanThe friend has received the reward.expires_atstring (date-time)The first order of the friend rewards the member until this moment.
201Counted
statusstringpending— waiting for the friend's first order.значения:
"pending", "rewarded", "expired", "limit", "cancelled"codestringfriend_pointsintegerfriend_promo_codestring | nullrewardedbooleanThe friend has received the reward.expires_atstring (date-time)The first order of the friend rewards the member until this moment.
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Hold points for a cart
post/loyalty/redemptions
cart_id returns the previous one. With amount, points are limited to the payable share of the cart. Confirm with the order number or cancel; unconfirmed holds return automatically.Параметры
Idempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
pointsintegerобязательнодиапазон:
≥ 1cart_idstringобязательнодлина:
≤ 255amountnumberдиапазон:
≥ 0
Пример тела запроса
{
"profile": {
"type": "user_id",
"value": "string"
},
"points": 1,
"cart_id": "string",
"amount": 0
}Ответы
201Created
idstringstatusstringзначения:
"held", "confirmed", "cancelled", "expired"pointsintegerreturnedintegerdiscountnumbercart_idstringorder_idstring | nullheld_untilstring (date-time)confirmed_atstring (date-time) | null
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Confirm a redemption
post/loyalty/redemptions/{redemption}/confirm
order_refunded, order_cancelled) return the points proportionally. Repeating with the same order changes nothing; an expired or cancelled hold — 422.Параметры
redemptionв путиstringобязательноRedemption id from the hold response.Idempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
order_idstringобязательнодлина:
≤ 255
Пример тела запроса
{
"order_id": "string"
}Ответы
200OK
idstringstatusstringзначения:
"held", "confirmed", "cancelled", "expired"pointsintegerreturnedintegerdiscountnumbercart_idstringorder_idstring | nullheld_untilstring (date-time)confirmed_atstring (date-time) | null
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Cancel a redemption
post/loyalty/redemptions/{redemption}/cancel
Параметры
redemptionв путиstringобязательноRedemption id from the hold response.
Ответы
200OK
idstringstatusstringзначения:
"held", "confirmed", "cancelled", "expired"pointsintegerreturnedintegerdiscountnumbercart_idstringorder_idstring | nullheld_untilstring (date-time)confirmed_atstring (date-time) | null
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 429Rate limit or monthly event quota exceeded · Error
Adjust points manually
post/loyalty/adjustments
Idempotency-Key to make retries safe.Параметры
Idempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
pointsintegerобязательноPositive — add, negative — take offreasonstringобязательнодлина:
≤ 500
Пример тела запроса
{
"profile": {
"type": "user_id",
"value": "string"
},
"points": 0,
"reason": "string"
}Ответы
200OK
memberbooleanbalanceintegerAvailable pointspendingintegerPoints waiting for the return periodtierstring | nulltier_spendnumberexpiringintegerPoints expiring within 30 daysexpires_atstring (date-time) | nullenrolled_atstring (date-time) | nullreferral_codestring | nullCode of the member for inviting friends.referral_urlstring | nullReferral link (?ref=on the store page) when referrals are on.referralsobjectFriends who came with the code, of them rewarded, and points for them.invitedintegerrewardedintegerpointsinteger
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Promo
List promo code pools
get/promo/pools
Ответы
200OK
dataPromoPool[]
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 429Rate limit or monthly event quota exceeded · Error
Get a pool
get/promo/pools/{key}
Параметры
keyв путиstringобязательноPool key — the name used in templates:{{ promo_code('summer') }}.шаблон:
^[a-z0-9_]{1,64}$
Ответы
200OK
keystringобязательноnamestringобязательноtypestringобязательноshared— one code for everyone;unique— a separate code for every profile.значения:
"shared", "unique"statusstringобязательнозначения:
"active", "paused"activebooleanобязательноActive now: not paused and within the promotion period.discountstring | nullDiscount text for messages, e.g. «−10 %». The discount itself is a coupon rule of the store.starts_atstring (date-time) | nullends_atstring (date-time) | nullEnd of the promotion (exclusive).validity_daysinteger | nullA code is valid for this many days after it is issued (not longer than the promotion).per_profileintegerобязательноHow many codes of the pool one profile can receive.statsobjectобязательноtotalintegeravailableintegerissuedintegerusedintegerusesintegerrevenuenumberSum of the orders with codes of the pool.
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Codes of a pool (sync)
get/promo/pools/{key}/codes
next and pass it as since next time; an empty page returns the same cursor. Changes of the last 10 seconds come with the next call.Параметры
keyв путиstringобязательноPool key — the name used in templates:{{ promo_code('summer') }}.шаблон:
^[a-z0-9_]{1,64}$sinceв строке запросаstringCursor from the previous response.limitв строке запросаintegerпо умолчанию:
500· диапазон:1–1000
Ответы
200OK
dataPromoCode[]nextstring | nullCursor for the next call.
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Add codes to a pool
post/promo/pools/{key}/codes
count codes (prefix and length of the pool, up to 50 000) or uploads ready codes (up to 100 000, e.g. coupons exported from the store). Codes that already exist in the project are skipped. Only for unique pools.Параметры
keyв путиstringобязательноPool key — the name used in templates:{{ promo_code('summer') }}.шаблон:
^[a-z0-9_]{1,64}$Idempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
countintegerдиапазон:
1–50000codesstring[]элементов:
≤ 100000
Пример тела запроса
{
"count": 1,
"codes": [
"string"
]
}Ответы
201Created
addedintegerskippedinteger
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Issue a code to a profile
post/promo/pools/{key}/issue
$promo_code_issued). A shared pool returns its code. 409 with reason: inactive (paused or outside the period), limit (the profile received all its codes), exhausted (no free codes).Параметры
keyв путиstringобязательноPool key — the name used in templates:{{ promo_code('summer') }}.шаблон:
^[a-z0-9_]{1,64}$Idempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
Пример тела запроса
{
"profile": {
"type": "user_id",
"value": "string"
}
}Ответы
200Already issued
poolstringPool key.codestringобязательноstatusstringобязательнозначения:
"available", "issued", "used", "shared"issued_atstring (date-time) | nullexpires_atstring (date-time) | nullused_atstring (date-time) | null
201Issued
poolstringPool key.codestringобязательноstatusstringобязательнозначения:
"available", "issued", "used", "shared"issued_atstring (date-time) | nullexpires_atstring (date-time) | nullused_atstring (date-time) | null
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
409Not issued
messagestringreasonstringзначения:
"inactive", "limit", "exhausted"
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Check a code
get/promo/codes/{code}
Параметры
codeв путиstringобязательноPromo code, case-insensitive.длина:
≤ 64
Ответы
200OK
Все поля PromoCode:
activebooleanIssued (or shared), not used, not expired, the pool is active.usesinteger
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Codes of a profile
get/promo/profiles/{type}/{value}/codes
Параметры
typeв путиstringобязательнозначения:
"user_id", "anonymous_id", "email", "phone", "telegram_chat_id", "viber_id", "web_push"valueв путиstringобязательноNormalized like at ingestion (lower-case email, E.164 phone).
Ответы
200OK
dataPromoCode[]Все поля PromoCode:
activeboolean
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Messages
Send one message now
post/messages
Idempotency-Key to retry safely: no second message is sent. No more than MESSAGES_API_PER_RECIPIENT_PER_HOUR (20 by default) messages per recipient per hour through the API. Poll GET /messages/{message} for the delivery status. With steps, the message goes as a cascade — poll GET /messages/cascades/{cascade}; the per-recipient limit counts a cascade once; without the cascades plan feature the answer is 402.Параметры
Idempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
- The recipient. A profile with this identity is created if there is none.
traitsobjectTraits written to the profile before sending, available in the template astraits.*.ключей:
≤ 100template_idintegerMessage template. A transactional template skips consents, frequency limits and quiet hours, but not hard blocks of the channel (address does not exist, bot blocked); other templates follow all messaging rules.integration_idinteger | nullChannel integration of the template's channel; may be omitted when the channel has exactly one active integration.dataobjectPer-message data, available in the template ascontext.data.*(order number, confirmation code).stepsCascadeStep[]Cascade (plans with thecascadesfeature): channels tried in order — the next one when the profile cannot be reached on the previous, or its message was not sent, not delivered or not read within the step time.элементов:
2–5
Пример тела запроса
{
"identity": {
"type": "user_id",
"value": "string"
},
"traits": {},
"template_id": 0,
"integration_id": 0,
"data": {},
"steps": [
{
"integration_id": 0,
"template_id": 0,
"wait_for": "sent",
"timeout": {
"amount": 1,
"unit": "minute"
}
}
]
}Ответы
202Queued: a message, or a cascade when `steps` are given
Один из вариантов:
- 401Missing, invalid or revoked key · Error
- 402The request cannot be applied in the current state · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Send a store email
post/emails
to as a transactional message: no marketing consent or frequency rules, but bounced and complained addresses are blocked. It is counted in the monthly message quota. The answer is fast: when it is not 202 (no email integration, quota exhausted, the service is unavailable), send the email yourself. Repeat the request with the same Idempotency-Key to retry safely. No more than MESSAGES_STORE_EMAILS_PER_RECIPIENT_PER_HOUR (30 by default) store emails per recipient per hour. Order emails (order_* kinds) with order are built from the OneTrace template enabled for the kind, in the customer language; without an enabled template subject and html are required. Poll GET /messages/{message} for the delivery status.Параметры
Idempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
tostring (email)обязательноRecipient address. The profile is found by this email or created.длина:
≤ 254subjectstringRequired unless an order template is enabled forkindandorderis given.длина:
≤ 998htmlstringReady HTML of the store email. Sent as is: it is not a template, braces are not processed. Required unless an order template is enabled forkindandorderis given.длина:
≤ 1000000textstring | nullPlain-text part; built from the HTML when empty.длина:
≤ 1000000reply_tostring (email) | nullOverrides the Reply-To of the email integration.from_namestring | nullOverrides the sender name of the email integration; the sender address is always the integration's.длина:
≤ 100kindstringобязательноWhat the email is:order_placed,order_paid,order_shipped,order_delivered,order_cancelled,order_refunded,account_new,password_reset,email_verification,login_link,login_code,other… Access-link kinds (password_reset,account_new,email_verification,login_link,login_code) go without click tracking, and only the subject is kept after sending. Fororder_placed,order_paid,order_shipped,order_delivered,order_cancelled,order_refundedwithorder, an enabled OneTrace template builds the email instead ofhtml(seeGET /emails/settings).шаблон:
^[a-z0-9_]{1,40}$languagestring | nullCustomer language tag: picks the language version of an order template; for history and reports otherwise.длина:
≤ 20integration_idinteger | nullEmail integration; may be omitted when the project has exactly one active.traitsobject | nullProfile traits to update before sending (name, phone).attachmentsobject[]Up to 5 files, 5 MB in total.элементов:
≤ 5namestringобязательнодлина:
≤ 200typestringобязательнозначения:
"application/pdf", "image/png", "image/jpeg", "image/gif", "text/plain", "text/csv", "text/calendar"contentstring (byte)обязательноFile contents in base64.
orderStoreOrder
Пример тела запроса
{
"to": "string",
"subject": "string",
"html": "string",
"text": "string",
"reply_to": "string",
"from_name": "string",
"kind": "string",
"language": "string",
"integration_id": 0,
"traits": {},
"attachments": [
{
"name": "string",
"type": "application/pdf",
"content": "string"
}
],
"order": {
"order_id": "string",
"number": "string",
"url": "https://example.com",
"created_at": "2026-01-01T10:00:00Z",
"currency": "string",
"amount": 0,
"subtotal": 0,
"discount": 0,
"shipping": 0,
"tax": 0,
"refund_amount": 0,
"coupon": "string",
"payment_method": "string",
"shipping_method": "string",
"carrier": "string",
"tracking_number": "string",
"tracking_url": "https://example.com",
"estimated_delivery": "2026-01-01",
"reason": "string",
"note": "string",
"payment_instructions": "string",
"products": [
{
"product_id": "string",
"variant_id": "string",
"sku": "string",
"product_name": "string",
"quantity": 0,
"price": 0,
"total": 0,
"image_url": "https://example.com",
"url": "https://example.com",
"options": "string"
}
],
"shipping_address": {
"name": "string",
"company": "string",
"address1": "string",
"address2": "string",
"city": "string",
"region": "string",
"postcode": "string",
"country": "string",
"phone": "string"
},
"billing_address": {
"name": "string",
"company": "string",
"address1": "string",
"address2": "string",
"city": "string",
"region": "string",
"postcode": "string",
"country": "string",
"phone": "string"
}
}
}Ответы
202Queued
Все поля MessageStatus:
kindstring | nulltemplatebooleanThe email is built from a OneTrace order template.
- 401Missing, invalid or revoked key · Error
- 402The request cannot be applied in the current state · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Store email settings
get/emails/settings
Ответы
200Settings
relaybooleanSend all store emails through OneTrace (store emails section).integration_idinteger | nulltemplatesobjectOrder email kinds built from OneTrace templates: the store does not send its own email for them and passesorderinstead.
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
Get the state of a cascade
get/messages/cascades/{cascade}
POST /messages and the messages of its steps.Параметры
cascadeв путиstring (uuid)обязательноCascadeid(UUID) from the send response.
Ответы
200OK
idstring (uuid)statusstringreached— a step succeeded;failed— no channel reached the profile.значения:
"running", "reached", "failed"stepintegerCurrent step, from 0.reached_channelstring | nullprofile_idintegeroriginstring | nullcreated_atstring (date-time) | nullfinished_atstring (date-time) | nullmessagesMessageStatus[]Messages of the steps tried so far.
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 429Rate limit or monthly event quota exceeded · Error
Get the status of a message
get/messages/{message}
POST /messages (or any message of the project by its id).Параметры
messageв путиstring (uuid)обязательноMessageid(UUID) from the send response.
Ответы
200OK
idstring (uuid)statusstringqueued→sent→delivered;scheduled— waiting (quiet hours, warm-up);skipped— not sent, seereason;failed/bounced— seereasonanderror.значения:
"queued", "scheduled", "sent", "delivered", "failed", "skipped", "bounced"reasonstring | nullWhy it was skipped or failed:no_recipient,unsubscribed,recipient_blocked,suppressed,frequency_limit,quota_exceeded,feature_unavailable,delivery_failed,recipient_unreachable,undelivered,template_error,integration_unavailable…errorstring | nullchannelstringtemplate_idinteger | nullintegration_idinteger | nullprofile_idintegertransactionalbooleanoriginstring | nullapifor messages sent withmessages.send,storefor store emails (emails.send).created_atstring (date-time) | nullscheduled_forstring (date-time) | nullsent_atstring (date-time) | nulldelivered_atstring (date-time) | nullopened_atstring (date-time) | nullclicked_atstring (date-time) | nullfailed_atstring (date-time) | null
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 429Rate limit or monthly event quota exceeded · Error
Conversations
List chat conversations
get/conversations
Параметры
statusв строке запросаstringopen— waiting for an answer.значения:
"open", "waiting", "closed"channelв строке запросаstringзначения:
"web", "telegram", "whatsapp", "viber"profile_typeв строке запросаstringIdentity type of the customer; together withprofile_value.значения:
"user_id", "anonymous_id", "email", "phone", "telegram_chat_id", "viber_id", "web_push"profile_valueв строке запросаstringIdentity value of the customer; together withprofile_type.длина:
≤ 255limitв строке запросаintegerпо умолчанию:
50· диапазон:1–200cursorв строке запросаstring
Ответы
200OK
next_cursorstring | nullобязательноPass ascursorto get the next page; null on the last page.
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Get a conversation with messages
get/conversations/{conversation}
Параметры
conversationв путиstring (uuid)обязательноConversationid(UUID).limitв строке запросаintegerHow many latest messages to return.по умолчанию:
100· диапазон:1–500
Ответы
200OK
Все поля Conversation:
- The latest messages, oldest first.
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Answer in a conversation
post/conversations/{conversation}/messages
Параметры
conversationв путиstring (uuid)обязательноConversationid(UUID).Idempotency-KeyзаголовокstringRepeat-safe retries: same key and body return the stored response (headerIdempotent-Replayed: true); a different body gives 422; a request still in progress gives 409.длина:
≤ 255
Тело запросаобязательно
bodystringобязательноPlain text of the answer.длина:
1–4000
Пример тела запроса
{
"body": "string"
}Ответы
201Created
idintegerобязательноauthorstringобязательноvisitor— the customer;operator— an answer from the inbox or the API;system— assignment, closing and reopening (seeaction).значения:
"visitor", "operator", "system"viastring | nullWhere an answer or action came from: the operator inbox or the API.значения:
"inbox", "api", nullapi_keystring | nullName of the API key that answered or closed the conversation.bodystringобязательноactionstring | nullзначения:
"assigned", "unassigned", "closed", "reopened", nullstatusstring | nullDelivery status of an answer sent to a messenger: queued, sent, delivered, failed, skipped, bounced.created_atstring (date-time)обязательно
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Close a conversation
post/conversations/{conversation}/close
Параметры
conversationв путиstring (uuid)обязательноConversationid(UUID).
Ответы
200OK
idstring (uuid)обязательноprofile_idintegerобязательноchannelstringобязательноweb— the website chat; messengers need thechat_messengersplan feature.значения:
"web", "telegram", "whatsapp", "viber"statusstringобязательноopen— the customer wrote last and waits for an answer;waiting— answered, waiting for the customer;closed.значения:
"open", "waiting", "closed"assignedbooleanобязательноAn operator is responsible for the conversation.unread_countintegerобязательноCustomer messages operators have not read yet.languagestring | nullratinginteger | nullCustomer rating after the conversation.диапазон:
1–5rating_commentstring | nulllast_message_atstring (date-time) | nulllast_message_authorstring | nullзначения:
"visitor", "operator", "system", nullfirst_reply_atstring (date-time) | nullcreated_atstring (date-time)обязательноclosed_atstring (date-time) | null
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 429Rate limit or monthly event quota exceeded · Error
Connect the store MCP server to the AI bot
put/chat/store-mcp
initialize, reads tools/list and keeps the contract tools the store owner allowed. One server per URL: calling again updates the key and re-reads the tools.Тело запросаобязательно
urlstring (uri)обязательноHTTPS address of the store MCP serverдлина:
≤ 2048keystringобязательноBearer key the platform sends to the storeдлина:
32–500namestringдлина:
≤ 120platformstringзначения:
"woocommerce", "magento", "bitrix", "sdk", "custom"
Пример тела запроса
{
"url": "https://example.com",
"key": "string",
"name": "string",
"platform": "woocommerce"
}Ответы
200Updated
idstring (uuid)urlstringstatusstringerror— seeerror; the bot works without this serverзначения:
"pending", "ok", "error"errorstring | nulltoolsstring[]Contract tools the bot may usechecked_atstring (date-time) | null
201Connected
idstring (uuid)urlstringstatusstringerror— seeerror; the bot works without this serverзначения:
"pending", "ok", "error"errorstring | nulltoolsstring[]Contract tools the bot may usechecked_atstring (date-time) | null
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Disconnect the store MCP server
delete/chat/store-mcp
Тело запросаобязательно
urlstringобязательнодлина:
≤ 2048
Пример тела запроса
{
"url": "string"
}Ответы
- 204Disconnected
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
Forms
Submit a website form
post/forms/{uid}/submissions
A visitor submits a signup form of the website (popup, flyout, embedded form or bar). With double opt-in the address gets a confirmation email and becomes part of the profile only after the visitor confirms it; otherwise the email or phone, the consent and the promo code of the form are applied at once.
Used by the website forms of the tracker; not part of the SDKs.
Параметры
uidв путиstringобязательноFormuidfrom the site code.длина:
≤ 16
Тело запросаобязательно
anonymousIdstringобязательнодлина:
≤ 255userIdstringдлина:
≤ 255valuesobjectобязательноForm fields: email, phone, first_name, last_name, birthday (YYYY-MM-DD) and consent (boolean).languagestringдлина:
≤ 35pagestringдлина:
≤ 2000websitestringHidden trap field: must stay empty.variantstringA/B variant of the form the visitor saw.значения:
"a", "b", "c", "d"
Пример тела запроса
{
"anonymousId": "string",
"userId": "string",
"values": {},
"language": "string",
"page": "string",
"website": "string",
"variant": "a"
}Ответы
201Accepted
statusstringобязательноpending— waiting for the confirmation link;accepted— applied to the profile.значения:
"pending", "accepted"messagestringобязательноText for the visitor in their language.promo_codestring | nullPromo code of the form when the submission is accepted at once.
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 404Not found in the key's project · Error
- 422Validation failed · ValidationError
- 429Rate limit or monthly event quota exceeded · Error
Active website forms
get/forms
Active signup forms of the project for the tracker: type, fields, design, display rules and the texts in the visitor's language. The tracker loads its forms module only when there is at least one.
Used by the website forms of the tracker; not part of the SDKs.
Параметры
languageв строке запросаstringVisitor language (BCP 47).длина:
≤ 35anonymousIdв строке запросаstringVisitor id: forms shown to segment members are filtered by the visitor's profile.длина:
≤ 255
Ответы
200OK
formsobject[]обязательноuidstringkindstringзначения:
"popup", "flyout", "embedded", "bar"double_opt_inbooleansettingsobjectrulesobjecttextsobject
- 401Missing, invalid or revoked key · Error
- 403The key lacks the required permission or the brand is suspended · Error
- 429Rate limit or monthly event quota exceeded · Error
Схемы
Error
messagestringобязательно
ValidationError
messagestringобязательноerrorsobjectобязательно
IdentityRef
typestringобязательнозначения:
"user_id", "anonymous_id", "email", "phone", "telegram_chat_id", "viber_id", "web_push"valuestringобязательнодлина:
≤ 255
IdentitiesInput
элементов:
1–1000
Message
typestringзначения:
"track", "identify", "page", "alias"messageIdstringдлина:
≤ 100anonymousIdstring | integeruserIdstring | integerpreviousIdstring | integereventstringдлина:
≤ 200namestringpropertiesobjecttraitsobjectcontextobjectconsentsobject[]identify only, secret key only: marketing consents given together with the customer data (sign-up or checkout form). Unknown channels are skipped.элементов:
≤ 20channelstringобязательношаблон:
^[a-z0-9_]{1,64}$· пример:"email"topicstringSubscription topic; the whole channel if omitted.шаблон:
^[a-z0-9_-]{1,64}$statusstringобязательнозначения:
"subscribed", "unsubscribed"
timestampstring (date-time)
Profile
idintegertraitsobjectidentitiesobjectfirst_seen_atstring (date-time)last_seen_atstring (date-time)
Event
event_idstringtypestringnamestringpropertiesobjectcontextobjectoccurred_atstring (date-time)
CatalogEvent
namestringlabelstring | nullvolumeintegerfirst_seen_atstring (date-time) | nulllast_seen_atstring (date-time) | nullpropertiesobject[]keystringdata_typestring
CatalogTrait
keystringlabelstring | nulldata_typestringpiibooleansystemboolean
Segment
idintegernamestringdescriptionstring | nulltypestringзначения:
"dynamic", "static"realtimebooleanschedule_minutesinteger | nullstatusstringзначения:
"pending", "computing", "ready", "failed"sizeintegerlast_computed_atstring (date-time) | nullcreated_atstring (date-time)updated_atstring (date-time)
SegmentDetail
Все поля Segment:
rulesobject | nullRule tree: {"op": "and|or", "children": [...]}
SegmentInput
namestringобязательнодлина:
≤ 120descriptionstring | nulltypestringобязательнозначения:
"dynamic", "static"realtimebooleanschedule_minutesintegerзначения:
15, 30, 60, 180, 360, 720, 1440rulesobject
SegmentPatch
namestringдлина:
≤ 120descriptionstring | nullrealtimebooleanschedule_minutesintegerrulesobject
Journey
idintegernamestringdescriptionstring | nullstatusstringзначения:
"draft", "active", "paused", "archived"versioninteger | nullnext_run_atstring (date-time) | nullcreated_atstring (date-time)updated_atstring (date-time)
JourneyDetail
Все поля Journey:
draftobjectgraphobjectentryobject
publishedobject | nullgraphobjectentryobject
JourneyInput
namestringобязательнодлина:
≤ 120descriptionstring | nullgraphobjectnodesarrayэлементов:
≤ 200edgesarrayэлементов:
≤ 400
entryobject
JourneyPatch
namestringдлина:
≤ 120descriptionstring | nullgraphobjectentryobject
Enrollment
idintegerprofile_idintegerversion_idintegerstatusstringcurrent_node_idstring | nullexit_reasonstring | nullentered_atstring (date-time)finished_atstring (date-time) | nullgoal_reached_atstring (date-time) | null
EnrollResult
enrolledbooleanenrollment_idinteger | nullprofile_idinteger
CampaignAudience
segment_idsinteger[]обязательноMembers of any of these segments get the campaign.элементов:
≤ 10exclude_segment_idsinteger[]Members of these segments are excluded.элементов:
≤ 10
CampaignVariant
keystringобязательношаблон:
^[a-z0-9_]{1,32}$template_idinteger | nullMessage template of the campaign channel.percentintegerобязательноShare of the audience (or of the A/B test share); all variants add up to 100.диапазон:
1–100
CampaignAb
test_percent of the audience is split between variants; after wait the rest gets the winner by metric.test_percentintegerобязательнодиапазон:
5–50metricstringобязательнозначения:
"opened", "clicked", "goal"waitobjectобязательноamountintegerдиапазон:
1–72unitstringзначения:
"hour", "day"
CampaignSchedule
local_time — in each recipient's timezone trait.typestringобязательнозначения:
"now", "at", "recurring"atstringForat: Y-m-d\TH:i.пример:
"2026-11-01T10:00"repeatstringзначения:
"daily", "weekly", "monthly"timestringпример:
"10:00"weekdaysinteger[]ISO weekdays forweekly(1 = Monday).day_of_monthintegerдиапазон:
1–28start_datestring (date) | nullend_datestring (date) | nulllocal_timeboolean
CampaignGoal
eventstringобязательноwithinobjectобязательноamountintegerдиапазон:
1–90unitstringзначения:
"hour", "day"
Campaign
idintegernamestringdescriptionstring | nullstatusstringзначения:
"draft", "scheduled", "sending", "sent", "paused", "cancelled"integration_idinteger | nullchannelstring | nullaudienceCampaignAudiencevariantsCampaignVariant[]scheduleCampaignSchedulerate_per_minuteinteger | nullgoalCampaignGoalnext_run_atstring (date-time) | nulllast_run_atstring (date-time) | nullcreated_atstring (date-time)updated_atstring (date-time)
CampaignInput
namestringобязательнодлина:
≤ 120descriptionstring | nullintegration_idinteger | nullChannel integration; the template of every variant must belong to its channel.элементов:
1–5rate_per_minuteinteger | nullдиапазон:
10–100000goalCampaignGoal
CampaignVariantStats
queuedintegersentintegerdeliveredintegeropenedintegerclickedintegerbouncedintegerfailedintegerskippedintegerunsubscribedintegerconvertedinteger | nullRecipients with the goal event in the window; null without a goal.
CampaignRun
idintegerstatusstringзначения:
"preparing", "sending", "testing", "completed", "paused", "cancelled", "failed"scheduled_atstring (date-time)started_atstring (date-time) | nullfinished_atstring (date-time) | nullaudience_sizeintegerqueuedintegerwinnerstring | nullwinner_atstring (date-time) | nullerrorstring | nullvariantsobjecttotalCampaignVariantStatsmetricstringзначения:
"opened", "clicked", "goal"statsAbStatsab_resultobject | nullTest result saved when the A/B winner was picked.metricstringdecided_atstring (date-time)statsAbStats
languagesobjectResults per language of the sent template version.
AbStats
verdictstringзначения:
"winner", "no_difference", "insufficient_data"winnerstring | nullSet only when the best variant is significantly better than every other one.beststringrequired_per_arminteger | nullalphanumberarmsobject[]keystringtrialsintegersuccessesintegerratenumbercinumber[]Wilson 95 % intervalэлементов:
2–2liftnumber | nullRelative to the first variantp_valuenumber | nullHolm-adjusted p-value against the best variantprobability_bestnumber
ProductCard
idstringnamestringurlstring | nullimagestring | nullJPEG up to image_width via imgproxy; without imgproxy — a direct link (CDN copy or feed URL).image_originalstring | nullDirect link: the platform CDN copy if the feed mirrors images, otherwise the feed URL.srcsetobject | nullVariants for: AVIF and WebP srcset (240–960 px); null without imgproxy. avifstringwebpstring
pricenumber | nullold_pricenumber | nullcurrencystring | nullbrandstring | nullcategory_idstring | nullmin_quantityinteger | nullThe product is sold as a set (tires by 4): how many to add to the cart; null — one.
ProductInput
idstringобязательноProduct id on the site: product_id in events.длина:
≤ 128namestringобязательнодлина:
≤ 500urlstring (uri)imagestring (uri)pricenumberдиапазон:
≥ 0old_pricenumberдиапазон:
≥ 0currencystringдлина:
3–3availablebooleanпо умолчанию:
truestockintegerUnits in stock. Used only when "Use stock levels from the API and plugins" is on in the catalog settings of the project: then the stock is saved, zero takes the product off sale, and the "low stock" journey trigger works. Otherwise it is ignored.диапазон:
≥ 0category_idsstring[]Leaf category first.элементов:
≤ 10brandstringдлина:
≤ 200paramsobjecttranslationsobjectTranslations by language (BCP 47 tag → text), ADR-080: name, url and params in that language; they are shown to visitors and in messages of the language. Languages sent before are kept, a new one is added.ключей:
≤ 20
MessageTemplate
idintegernamestringchannelstringпример:
"email"topicstringSubscription topic the message belongs to.transactionalbooleanlanguagestringMain language ofcontent: recipients whose profile language has no version get it.длина:
≤ 16· пример:"de"contentobjectFields of the channel message schema, e.g.subject,htmlandtextfor email; string fields are Twig templates.translationsobjectOther language versions: language tag → content. A recipient gets the version for thelanguageprofile trait (exact tag, then the base language, then another variant of it), otherwisecontent.versionintegerGrows when any language version changes.created_atstring (date-time) | nullupdated_atstring (date-time) | null
MessageTemplateInput
namestringобязательнодлина:
≤ 120channel_keystringобязательноChannel of the template; cannot be changed later.topicstringпо умолчанию:
"marketing"· длина:≤ 64· шаблон:^[a-z0-9_-]+$transactionalbooleanпо умолчанию:
falselanguagestringMain language ofcontent; the project default language if omitted.длина:
≤ 16· пример:"de"contentobjectобязательноFields of the channel message schema, e.g.subject,htmlandtextfor email; string fields are Twig templates.translationsobjectOther language versions; each is validated likecontent. Omit to keep the stored versions, pass{}to delete them.ключей:
≤ 50
AnalyticsReportType
string
значения: "report", "funnel", "retention", "paths", "revenue", "traffic", "attribution"
AnalyticsPeriod
Один из вариантов:
lastintegerобязательноLast N days including today, in the project timezoneзначения:
7, 14, 30, 90, 180, 365
fromstring (date)обязательноtostring (date)обязательно
Dates in the project timezone, up to 731 days
PropertyFilter
keystringобязательноProperty key from the event catalogoperatorstringобязательноOperator of the property type, as in segment rulesvalueanyValue for the operator; absent for is_set / is_not_set
ProfileRules
Объект с произвольными ключами.
Breakdown
sourcestringобязательнозначения:
"property", "context"keystringобязательноEvent property, or a page field: page.path, page.referrer, campaign.source, campaign.medium, campaign.name, locale
AnalyticsInterval
string
значения: "day", "week", "month"
ReportQuery
seriesobject[]обязательноэлементов:
1–5eventstring | nullmetricstringзначения:
"count", "profiles", "per_profile", "sum", "avg"propertystring | nullfiltersPropertyFilter[]
profilesProfileRulesbreakdownBreakdownintervalAnalyticsIntervalperiodAnalyticsPeriodcompareboolean
FunnelQuery
stepsobject[]обязательноэлементов:
2–10eventstringобязательноfiltersPropertyFilter[]
windowobjectConversion window from the first step, up to 90 daysamountintegerдиапазон:
≥ 1unitstringзначения:
"minute", "hour", "day"
orderstringзначения:
"sequential", "strict"profilesProfileRulesbreakdownBreakdownperiodAnalyticsPeriod
RetentionQuery
startobjectобязательноeventstring | nullfiltersPropertyFilter[]
returnobjecteventstring | nullfiltersPropertyFilter[]
cohortstringзначения:
"first", "period"intervalAnalyticsIntervalperiodsintegerUp to 30 days, 12 weeks or 12 monthsдиапазон:
1–30returnsstringзначения:
"exact", "rolling"profilesProfileRulesperiodAnalyticsPeriod
PathQuery
eventstringобязательноfiltersPropertyFilter[]directionstringзначения:
"after", "before"stepsintegerдиапазон:
1–5gap_minutesintegerдиапазон:
1–1440excludestring[]элементов:
≤ 20profilesProfileRulesperiodAnalyticsPeriod
RevenueQuery
eventstringPurchase event; by default from the prediction settingsamountstringNumeric order amount propertyproduct_propertystringintervalAnalyticsIntervalltv_intervalstringзначения:
"week", "month"ltv_periodsintegerдиапазон:
1–12profilesProfileRulesperiodAnalyticsPeriod
TrafficQuery
dimensionstringзначения:
"channel", "source", "source_medium", "campaign", "referrer", "landing"intervalAnalyticsIntervaleventstringamountstringprofilesProfileRulesperiodAnalyticsPeriod
AttributionQuery
window_daysintegerзначения:
1, 3, 7, 14, 30modelstringзначения:
"last", "first", "linear"intervalAnalyticsIntervaleventstringamountstringprofilesProfileRulesperiodAnalyticsPeriod
ReportResult
definitionobjectобязательноNormalized definitionperiodobjectобязательноfromstring (date)tostring (date)
bucketsstring (date)[]обязательноseriesobject[]обязательноPer series: index, total, values per bucket, previous period, breakdown
FunnelResult
definitionobjectобязательноNormalized definitionperiodobjectобязательноfromstring (date)tostring (date)
stepsobject[]обязательноPer step: event, reached, from_start, from_previous, median_seconds, avg_secondsbreakdownobject[]обязательноPer breakdown value: value, steps (reached per step)time_samplenumberShare of profiles used for time between steps
RetentionResult
definitionobjectобязательноNormalized definitionperiodobjectобязательноfromstring (date)tostring (date)
cohortsobject[]обязательноPer cohort: date, size, values (returned per period, null — not yet), open (period still running)averageobject[]обязательноPer period: period, rate, profiles
PathResult
definitionobjectобязательноNormalized definitionperiodobjectобязательноfromstring (date)tostring (date)
totalintegerобязательноnodesobject[]обязательноlinksobject[]обязательноpathsobject[]обязательноMost frequent paths: events, profilestruncatedboolean
RevenueResult
definitionobjectобязательноNormalized definitionperiodobjectобязательноfromstring (date)tostring (date)
currencystring | nullother_currency_ordersintegersummaryobjectобязательноseriesobjectобязательноltvobjectобязательноproductsobject[]обязательноcategoriesobject[]обязательно
TrafficResult
definitionobjectобязательноNormalized definitionperiodobjectобязательноfromstring (date)tostring (date)
currencystring | nullpurchasesbooleansummaryobjectобязательноrowsobject[]обязательноrow_countintegerchartobjectобязательно
AttributionResult
definitionobjectобязательноNormalized definitionperiodobjectобязательноfromstring (date)tostring (date)
currencystring | nullsummaryobjectобязательноchannelsobject[]обязательноPer channel: channel, clicks, touched_orders, revenue and orders by modelitemsobject[]обязательноPer campaign, journey, message channel or widgetchartobject
SavedReport
idintegerобязательноnamestringобязательноcreated_atstring (date-time)обязательноupdated_atstring (date-time)обязательно
SavedReportDetail
Все поля SavedReport:
definitionobjectобязательноviewobjectобязательноPage view settings: chart type, metric
SavedReportInput
namestringобязательнодлина:
≤ 120definitionobjectобязательноDefinition of the report type — see the run operationsviewobject
SavedReportPatch
namestringдлина:
≤ 120definitionobjectviewobject
Dashboard
idintegerобязательноnamestringобязательноlayoutobject[]обязательноэлементов:
≤ 24report_idintegerобязательноsizestringзначения:
"half", "full"
created_atstring (date-time)обязательноupdated_atstring (date-time)обязательно
DashboardInput
namestringобязательнодлина:
≤ 120layoutobject[]элементов:
≤ 24report_idintegerобязательноsizestringзначения:
"half", "full"
periodAnalyticsPeriod
DashboardPatch
namestringдлина:
≤ 120layoutobject[]элементов:
≤ 24report_idintegerобязательноsizestringзначения:
"half", "full"
periodAnalyticsPeriod
LoyaltyProfileRef
typestringобязательнозначения:
"user_id", "anonymous_id", "email", "phone", "telegram_chat_id", "viber_id", "web_push"valuestringобязательно
LoyaltyAccount
memberbooleanbalanceintegerAvailable pointspendingintegerPoints waiting for the return periodtierstring | nulltier_spendnumberexpiringintegerPoints expiring within 30 daysexpires_atstring (date-time) | nullenrolled_atstring (date-time) | nullreferral_codestring | nullCode of the member for inviting friends.referral_urlstring | nullReferral link (?ref=on the store page) when referrals are on.referralsobjectFriends who came with the code, of them rewarded, and points for them.invitedintegerrewardedintegerpointsinteger
LoyaltyCalculation
memberbooleanbalanceintegertierstring | nullmax_pointsintegermax_discountnumberearn_pointsintegerpoint_valuenumbercurrencystring | null
LoyaltyRedemption
idstringstatusstringзначения:
"held", "confirmed", "cancelled", "expired"pointsintegerreturnedintegerdiscountnumbercart_idstringorder_idstring | nullheld_untilstring (date-time)confirmed_atstring (date-time) | null
LoyaltyTransaction
idintegertypestringзначения:
"earn", "cancel", "expire", "adjust", "redeem", "refund"pointsintegerreferencestring | nullreasonstring | nullrulestring | nullcreated_atstring (date-time)referralstring | nullReferral reward:friend— for joining by invitation,referrer— for the first order of a friend.значения:
"friend", "referrer", null
PromoPool
keystringобязательноnamestringобязательноtypestringобязательноshared— one code for everyone;unique— a separate code for every profile.значения:
"shared", "unique"statusstringобязательнозначения:
"active", "paused"activebooleanобязательноActive now: not paused and within the promotion period.discountstring | nullDiscount text for messages, e.g. «−10 %». The discount itself is a coupon rule of the store.starts_atstring (date-time) | nullends_atstring (date-time) | nullEnd of the promotion (exclusive).validity_daysinteger | nullA code is valid for this many days after it is issued (not longer than the promotion).per_profileintegerобязательноHow many codes of the pool one profile can receive.statsobjectобязательноtotalintegeravailableintegerissuedintegerusedintegerusesintegerrevenuenumberSum of the orders with codes of the pool.
PromoCode
poolstringPool key.codestringобязательноstatusstringобязательнозначения:
"available", "issued", "used", "shared"issued_atstring (date-time) | nullexpires_atstring (date-time) | nullused_atstring (date-time) | null
LoyaltyReferral
statusstringpending— waiting for the friend's first order.значения:
"pending", "rewarded", "expired", "limit", "cancelled"codestringfriend_pointsintegerfriend_promo_codestring | nullrewardedbooleanThe friend has received the reward.expires_atstring (date-time)The first order of the friend rewards the member until this moment.
MessageSendInput
template_id (and integration_id if needed) for one message, or steps for a cascade — not both.- The recipient. A profile with this identity is created if there is none.
traitsobjectTraits written to the profile before sending, available in the template astraits.*.ключей:
≤ 100template_idintegerMessage template. A transactional template skips consents, frequency limits and quiet hours, but not hard blocks of the channel (address does not exist, bot blocked); other templates follow all messaging rules.integration_idinteger | nullChannel integration of the template's channel; may be omitted when the channel has exactly one active integration.dataobjectPer-message data, available in the template ascontext.data.*(order number, confirmation code).stepsCascadeStep[]Cascade (plans with thecascadesfeature): channels tried in order — the next one when the profile cannot be reached on the previous, or its message was not sent, not delivered or not read within the step time.элементов:
2–5
MessageStatus
idstring (uuid)statusstringqueued→sent→delivered;scheduled— waiting (quiet hours, warm-up);skipped— not sent, seereason;failed/bounced— seereasonanderror.значения:
"queued", "scheduled", "sent", "delivered", "failed", "skipped", "bounced"reasonstring | nullWhy it was skipped or failed:no_recipient,unsubscribed,recipient_blocked,suppressed,frequency_limit,quota_exceeded,feature_unavailable,delivery_failed,recipient_unreachable,undelivered,template_error,integration_unavailable…errorstring | nullchannelstringtemplate_idinteger | nullintegration_idinteger | nullprofile_idintegertransactionalbooleanoriginstring | nullapifor messages sent withmessages.send,storefor store emails (emails.send).created_atstring (date-time) | nullscheduled_forstring (date-time) | nullsent_atstring (date-time) | nulldelivered_atstring (date-time) | nullopened_atstring (date-time) | nullclicked_atstring (date-time) | nullfailed_atstring (date-time) | null
CascadeStep
integration_idintegerобязательноtemplate_idintegerобязательноTemplate of the integration's channel.wait_forstringWhat counts as success.deliveredneeds an integration that reports delivery (not email through own SMTP),opened— a channel that reports reading (email, WhatsApp, Viber).значения:
"sent", "delivered", "opened"· по умолчанию:"sent"timeoutobjectHow long to wait fordeliveredoropenedafter sending; 15 minutes by default.amountintegerдиапазон:
1–3650unitstringзначения:
"minute", "hour", "day", "week"
CascadeStatus
idstring (uuid)statusstringreached— a step succeeded;failed— no channel reached the profile.значения:
"running", "reached", "failed"stepintegerCurrent step, from 0.reached_channelstring | nullprofile_idintegeroriginstring | nullcreated_atstring (date-time) | nullfinished_atstring (date-time) | nullmessagesMessageStatus[]Messages of the steps tried so far.
ChatVisitorMessage
idintegerauthorstringзначения:
"visitor", "operator", "system"bodystringoperatorstring | nullFirst name of the operatoractionstring | nullclosed — the conversation was closedcreated_atstring (date-time)botbooleanReply of the AI bot; operator holds the bot name
ChatVisitorConversation
idstring (uuid)statusstringзначения:
"open", "waiting", "closed"ratinginteger | nulltokenstringReturned for a new conversation or when the request had no valid token; store itbotbooleanThe AI bot leads the conversation: the widget offers to call an operator (POST /chat/handoff)
Conversation
idstring (uuid)обязательноprofile_idintegerобязательноchannelstringобязательноweb— the website chat; messengers need thechat_messengersplan feature.значения:
"web", "telegram", "whatsapp", "viber"statusstringобязательноopen— the customer wrote last and waits for an answer;waiting— answered, waiting for the customer;closed.значения:
"open", "waiting", "closed"assignedbooleanобязательноAn operator is responsible for the conversation.unread_countintegerобязательноCustomer messages operators have not read yet.languagestring | nullratinginteger | nullCustomer rating after the conversation.диапазон:
1–5rating_commentstring | nulllast_message_atstring (date-time) | nulllast_message_authorstring | nullзначения:
"visitor", "operator", "system", nullfirst_reply_atstring (date-time) | nullcreated_atstring (date-time)обязательноclosed_atstring (date-time) | null
ConversationMessage
idintegerобязательноauthorstringобязательноvisitor— the customer;operator— an answer from the inbox or the API;system— assignment, closing and reopening (seeaction).значения:
"visitor", "operator", "system"viastring | nullWhere an answer or action came from: the operator inbox or the API.значения:
"inbox", "api", nullapi_keystring | nullName of the API key that answered or closed the conversation.bodystringобязательноactionstring | nullзначения:
"assigned", "unassigned", "closed", "reopened", nullstatusstring | nullDelivery status of an answer sent to a messenger: queued, sent, delivered, failed, skipped, bounced.created_atstring (date-time)обязательно
ConversationDetail
Все поля Conversation:
- The latest messages, oldest first.
StoreEmailInput
tostring (email)обязательноRecipient address. The profile is found by this email or created.длина:
≤ 254subjectstringRequired unless an order template is enabled forkindandorderis given.длина:
≤ 998htmlstringReady HTML of the store email. Sent as is: it is not a template, braces are not processed. Required unless an order template is enabled forkindandorderis given.длина:
≤ 1000000textstring | nullPlain-text part; built from the HTML when empty.длина:
≤ 1000000reply_tostring (email) | nullOverrides the Reply-To of the email integration.from_namestring | nullOverrides the sender name of the email integration; the sender address is always the integration's.длина:
≤ 100kindstringобязательноWhat the email is:order_placed,order_paid,order_shipped,order_delivered,order_cancelled,order_refunded,account_new,password_reset,email_verification,login_link,login_code,other… Access-link kinds (password_reset,account_new,email_verification,login_link,login_code) go without click tracking, and only the subject is kept after sending. Fororder_placed,order_paid,order_shipped,order_delivered,order_cancelled,order_refundedwithorder, an enabled OneTrace template builds the email instead ofhtml(seeGET /emails/settings).шаблон:
^[a-z0-9_]{1,40}$languagestring | nullCustomer language tag: picks the language version of an order template; for history and reports otherwise.длина:
≤ 20integration_idinteger | nullEmail integration; may be omitted when the project has exactly one active.traitsobject | nullProfile traits to update before sending (name, phone).attachmentsobject[]Up to 5 files, 5 MB in total.элементов:
≤ 5namestringобязательнодлина:
≤ 200typestringобязательнозначения:
"application/pdf", "image/png", "image/jpeg", "image/gif", "text/plain", "text/csv", "text/calendar"contentstring (byte)обязательноFile contents in base64.
orderStoreOrder
StoreEmailStatus
Все поля MessageStatus:
kindstring | nulltemplatebooleanThe email is built from a OneTrace order template.
StoreOrder
order template variable.order_idstringобязательнодлина:
≤ 100numberstring | nullNumber shown to the customer;order_idwhen empty.длина:
≤ 100urlstring (uri) | nullOrder page for the customer.created_atstring (date-time) | nullcurrencystringобязательношаблон:
^[A-Za-z]{3}$amountnumberобязательноOrder total.subtotalnumber | nulldiscountnumber | nullshippingnumber | nulltaxnumber | nullrefund_amountnumber | nullcouponstring | nullpayment_methodstring | nullshipping_methodstring | nullcarrierstring | nulltracking_numberstring | nulltracking_urlstring (uri) | nullestimated_deliverystring (date) | nullreasonstring | nullCancellation or refund reason.notestring | nullpayment_instructionsstring | nullBank transfer details and similar instructions.productsobject[]элементов:
≤ 100product_idstring | nullvariant_idstring | nullskustring | nullproduct_namestringобязательнодлина:
≤ 300quantitynumberобязательноpricenumberобязательноtotalnumber | nullLine total; price × quantity when empty.image_urlstring (uri) | nullurlstring (uri) | nulloptionsstring | nullVariant options as text: «Size: M, colour: white».длина:
≤ 500
shipping_addressobject | nullnamestring | nullдлина:
≤ 200companystring | nullдлина:
≤ 200address1string | nullдлина:
≤ 200address2string | nullдлина:
≤ 200citystring | nullдлина:
≤ 200regionstring | nullдлина:
≤ 200postcodestring | nullдлина:
≤ 200countrystring | nullдлина:
≤ 200phonestring | nullдлина:
≤ 200
billing_addressobject | nullnamestring | nullдлина:
≤ 200companystring | nullдлина:
≤ 200address1string | nullдлина:
≤ 200address2string | nullдлина:
≤ 200citystring | nullдлина:
≤ 200regionstring | nullдлина:
≤ 200postcodestring | nullдлина:
≤ 200countrystring | nullдлина:
≤ 200phonestring | nullдлина:
≤ 200
StoreEmailSettings
relaybooleanSend all store emails through OneTrace (store emails section).integration_idinteger | nulltemplatesobjectOrder email kinds built from OneTrace templates: the store does not send its own email for them and passesorderinstead.
StoreMcpServer
idstring (uuid)urlstringstatusstringerror— seeerror; the bot works without this serverзначения:
"pending", "ok", "error"errorstring | nulltoolsstring[]Contract tools the bot may usechecked_atstring (date-time) | null