Menu

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[]optional

at most 75 items

2 child attributes
external_idstringoptional

1–255 characters

emailstringoptional

3–320 characters

eventsBrazeEventInput[]optional

at most 75 items

5 child attributes
external_idstringoptional

1–255 characters

emailstringoptional

3–320 characters

namestringrequired

1–128 characters

timestringrequired

date-time

propertiesobjectoptional
purchasesBrazePurchaseInput[]optional

at most 75 items

8 child attributes
external_idstringoptional

1–255 characters

emailstringoptional

3–320 characters

product_idstringrequired

1–255 characters

currencystringrequired
pricenumberrequired

min 0 · max 1000000000

quantityintegeroptional

min 1 · max 100 · default 1

timestringrequired

date-time

propertiesobjectoptional

Returns

Returns 201 Created. Otherwise returns an error; Errors lists every code and which to retry.