Messaging API error handling and retries

important
This page is in beta. Features and documentation for the Messaging API are subject to change.
Messaging API response bodies and success semantics vary by endpoint. Use each endpoint’s response schema and status-code table as the authoritative contract.
Success responses
The Banner endpoints use different success responses:
POST /v1/device-messaging/banners/syncreturns a200status code with abannersobject.POST /v1/device-messaging/banners/trackreturns a202status code withevents_processedandmessage. If Braze skips individual events, the response also includes anerrorsarray.
A 202 response from the tracking endpoint means Braze accepted at least one valid event. Review the errors array to identify skipped events.
Error responses
Error response fields also vary:
- Banner retrieval errors use an
errorfield. - Banner tracking errors use a
messagefield and can include an indexederrorsarray.
Don’t parse error-message text to determine application behavior. Use the HTTP status code and endpoint-specific fields instead.
Retry guidance
Use the following guidance when deciding whether to retry:
| Status code | Retry guidance |
|---|---|
400 |
Correct the request before retrying. For Banner tracking, correct skipped events before retrying them. |
401 or 403 |
Verify the client-side REST API key and its permissions before retrying. |
404 |
Confirm that the Messaging API is enabled for the workspace and that the endpoint URL is correct. |
429 |
Reduce the request rate and retry with exponential backoff. Use rate-limit response headers when available. |
5XX |
Retry with exponential backoff and a maximum number of attempts. |
For the exact response body and supported status codes, refer to the relevant endpoint:
New Stuff!