Skip to content

Server API: Transactional messages

The app’s messages your servers send to one person when something happens on your side.

What it doesRoute
Send a messagePOST /server/v1/messages/{message_id}/send

POST /server/v1/messages/{message_id}/send

Sends one of the app’s messages whose trigger is the API (a receipt, a password reset) to the person with your id for them, the props filling its {{event.<prop>}} tags. It is still held to the message’s audience, frequency, window, quiet hours, caps and the person’s consent. With an Idempotency-Key, a request sent again answers the send the first made, 200 with Idempotent-Replayed; the same key for another message or person is 409. Needs a key with the messages scope.

Needs: a server key (Authorization: Bearer crm_sk_…). See Connect your backend.

Parameters

NameInDescription
message_id (required)pathThe in-app message’s id.
Idempotency-KeyheaderYour own id for this send (at most 100 characters): sent again within a week, it answers the send it made.

Body (application/json): MessageSendBody

FieldTypeDescription
external_id (always)string
propsobject of string

Answers

StatusBodyMeaning
200MessageSendOK
202MessageSendAccepted
400problemThe request could not be read: the problem names the field.
401problemNo credential, or one that is not right.
403problemRefused: the app is switched off, or this is not allowed.
404problemNot found, or the part is switched off.
409problemRefused as things stand: the problem says why.
429problemToo many requests: wait for Retry-After.