Send customer events from your own backend (a lesson completed, a trial started), one or a batch of up to 500, for custo
Changed onSend customer events from your own backend (a lesson completed, a trial started), one or a batch of up to 500, for customer messaging flows to act on. Each event is answered with its outcome: applied, duplicate (that id was already stored; nothing new), rejected_schema (with the field), rejected_unknown_customer (Magistry has no customer with that external id) or suppressed_erasure (the customer was erased). Requires an idempotency key, which also becomes the event id when an event has none; a retry with the same key answers duplicate with the same id. Stores data only: nothing is sent to the customer by this call. Also served at /api/v1/events.
Request
- Base URLhttps://app.magistry.io
- Auth
- HTTP bearer
- or OAuth 2Authorization codehttps://app.magistry.io/api/oauth/authorizeToken URLhttps://app.magistry.io/api/oauth/tokenScopesorders:write
Headers
Required, here or as idempotency_key in the body. A unique string you choose for this request; send the SAME key when retrying and the first answer is returned instead of writing twice (idempotent-replayed: true). The same key with other arguments is 409 idempotency_conflict. If the header and idempotency_key are both sent they must be equal.
Request body
A batch. Or send one event's fields at the top level instead.
Your own id for this event. Default: the Idempotency-Key (with :<index> in a batch). The same id again is a duplicate, never a second event.
The customer's id in your system: the external_id Magistry holds for them.
The event, in lower snake_case, e.g. lesson_completed.
When it happened, with a time zone.
Anything about the event, at most 4 KB as JSON.
Required. A unique string you choose for this request. Send the SAME key when retrying after a timeout and Magistry returns the original outcome instead of performing the write twice. Reusing a key with different arguments is refused rather than replayed.
Response
Tool result
Changes
- info
endpoint added
- info