Server API: Transactional messages
The app’s messages your servers send to one person when something happens on your side.
| What it does | Route |
|---|---|
| Send a message | POST /server/v1/messages/{message_id}/send |
Send a message
Section titled “Send a message”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
| Name | In | Description |
|---|---|---|
message_id (required) | path | The in-app message’s id. |
Idempotency-Key | header | Your own id for this send (at most 100 characters): sent again within a week, it answers the send it made. |
Body (application/json): MessageSendBody
| Field | Type | Description |
|---|---|---|
external_id (always) | string | |
props | object of string |
Answers
| Status | Body | Meaning |
|---|---|---|
| 200 | MessageSend | OK |
| 202 | MessageSend | Accepted |
| 400 | problem | The request could not be read: the problem names the field. |
| 401 | problem | No credential, or one that is not right. |
| 403 | problem | Refused: the app is switched off, or this is not allowed. |
| 404 | problem | Not found, or the part is switched off. |
| 409 | problem | Refused as things stand: the problem says why. |
| 429 | problem | Too many requests: wait for Retry-After. |