Compat
Record attributes, events and purchases (Braze)
POST/v1/compat/braze/users/track
Requires an API key with the contacts:write events:write scope. About keys and scopes
Braze's /users/track, so an app sending to Braze can send here too while it moves, by pointing its REST endpoint at …/v1/compat/braze. Each item names its person by external_id (the contact's externalId) or email; a person not yet known is created. first_name, last_name, email, phone and country fill those fields; an email_subscribe or push_subscribe of unsubscribed withdraws that consent; every other key becomes an attribute. Consent is never granted here: import it with its evidence. A purchase is recorded as a Product Purchased event with product_id, currency, price, quantity and total. Items that fail are listed in errors; the rest apply. Agent keys are refused.
Requires API-key scope: contacts:write and events:write.
Request body
attributesBrazeAttributesInput[]optionalat most 75 items
2 child attributes
external_idstringoptional1–255 characters
emailstringoptional3–320 characters
eventsBrazeEventInput[]optionalat most 75 items
5 child attributes
external_idstringoptional1–255 characters
emailstringoptional3–320 characters
namestringrequired1–128 characters
timestringrequireddate-time
propertiesobjectoptional
purchasesBrazePurchaseInput[]optionalat most 75 items
8 child attributes
external_idstringoptional1–255 characters
emailstringoptional3–320 characters
product_idstringrequired1–255 characters
currencystringrequiredpricenumberrequiredmin 0 · max 1000000000
quantityintegeroptionalmin 1 · max 100 · default
1timestringrequireddate-time
propertiesobjectoptional
Returns
Returns 201 Created. Otherwise returns an error; Errors lists every code and which to retry.