Send Message Relay Proxy
POST/api/crm/v1/send-message
Today Gamanza Engage sends CRM messages through its own providers. The Send Message Relay Proxy hands an already rendered message to your platform, so you can deliver it with your own provider and the CRM can still track the result.
Return 202 Accepted before you call that provider, then process the send in the background.
On receipt:
- Validate the body.
- Store batchId, callback, and every item.
- Return 202 within a few seconds. Do not call your provider, look up a contact, or wait for delivery before that response.
Only 202 accepts the handoff. Any other response activates a retry, including 200, 4xx, 5xx, a timeout, and a transport error. PEP retries that handoff up to 10 times.
Each request is one channel. The batch size is 100 players.
Two keys:
| Key | Identifies | What you do |
|---|---|---|
| batchId | This request | Persist it with the item playerDeliverId values before 202. A known batchId, in progress or finished, returns 202 and does not deliver again. If the content differs, keep the content you accepted first. |
| playerDeliverId | One player | The delivery id of that player. Persist it. Do not deliver a second message for that id. Return 202 for that id when the batchId is one you already stored. The platform does not put that player on a new batchId while the first batch can still be accepted. If you already delivered that id, do not deliver it again. |
A failed batch is retried with the same batchId, the same players, and the same playerDeliverId values. Content is rendered again and may change. Keep the first accepted content.
Content. items[].content matches channel. One request is one channel.
| Channel | Required | Optional |
|---|---|---|
| subject, html, fromEmail | fromName, replyTo | |
| sms | text | — |
| on_site | contentHtml, language | templateType, isHtmlContent |
| web_push | title, body | url, icon, image, actions |
| push_in_app | title, body, language | url, icon, image |
| rich_inbox | title, message, contentHtml | language, templateType, displayType, buttonText, buttonUrl, imageUrl, terms, snackbarIcon, snackbarText, snackbarButtonText, snackbarContentHtml |
Email has no text. SMS has no from. On-site has no title and no body. Rich inbox has no body and no html.
Include Contact Point
Include Contact Point is a CRM setting. It is off by default. If you need Gamanza Engage to send contact information, ask your CSM to turn it on, and make sure the player's contact information is registered in Gamanza Engage.
When it is off, the request does not include an email, a phone number, or a push subscription. Gamanza Engage is not responsible for finding the recipient. You determine it from playerId, according to the channel.
When it is on, the request adds only that channel's contact, taken from the player stored by Register Player or Update Player.
On-site and rich inbox never send contact. Those channels are always addressed by playerId.
After your provider reports a result, POST one event per item to callback.url. That call is Register External Message Event - Analytics. Sending the events is optional. If you do not send them, the analytics are not shown in the CRM section. Send channel, eventType, occurredAt, playerDeliverId, and playerId at the root. playerDeliverId and playerId are the values from that send item. channel is the channel of this request.
Request
Responses
- 202
- 400
- 401
- 500
Accepted. The handoff is queued. The response body is ignored. This does not mean the player has the message.
The body is not version 1 of this contract. PEP treats this as a failure and retries.
Unauthorized. The x-authorization header is missing or not accepted.
Internal server error. PEP treats this as a failure and retries.