Skip to main content
Records something someone did, like cart_added or order_placed, on their contact’s timeline, where it can feed audiences and custom traits. It never creates a contact: an event for someone not yet known is held, and joins the contact once they are identified with a phone. Server events need the OMNI API and Customer data in your plan, and an OMNI API key — not a Customer data source key (sk_live_…), which is now refused.
Needs the cdp.events:write scope.

Body

Say who did it with at least one of user_id, phone, email or anonymous_id. Send an Idempotency-Key header to take it once however often the request is retried. Events are applied in the background, so the answer only says how many were taken. One that can’t be applied — no one named, a reserved event name, properties too large — is dropped without stopping the rest, and shows with its reason under Live events on Settings → Data sources in the panel.

Request

Response

202 Accepted — taken, to be applied in the background.

Errors

Every refusal is {"error": {"code", "message", "field"}}; field is there when one input is at fault. Any request can also be refused for its key, its account or its rate (key_required, invalid_key, account_suspended, plan_excludes_api, address_not_allowed, rate_limited); see the overview.