Update translation in a campaign
/campaigns/translations
Use this endpoint to update multiple translations for a campaign.
If you want to update translations after a campaign has been launched, you’ll need to save your message as a draft first.
This endpoint is currently in early access. Contact your Braze account manager if you’re interested in participating in the early access.
Prerequisites
To use this endpoint, you’ll need an API key with the campaigns.translations.update
permission.
Rate limit
This endpoint has a rate limit of 250,000 requests per minute.
Path parameters
There are no path parameters for this endpoint.
Request parameters
Parameter | Required | Data Type | Description |
---|---|---|---|
campaign_id |
Required | String | The ID of your campaign. |
message_variation_id |
Required | String | The ID of your message variation. |
locale_name |
Required | String | The name of the locale. |
Note all translation IDs are considered universal unique identifiers (UUIDs), which can be found in Multi-Language Support settings or in the GET request response.
Example request
1
2
3
4
5
6
7
8
9
10
Content-Type: application/json
Authorization: Bearer YOUR-REST-API-KEY
{
"campaign_id": "e24404b3-3626-4de0-bdec-06935f3aa0ab", // CAMPAIGNS ONLY
"message_variation_id": "f14404b3-3626-4de0-bdec-06935f3aa0ad",
"locale_id": "h94404b3-3626-4de0-bdec-06935f3aa0ad",
"translation_map": {
"id_3": "Ein Absatz ohne Formatierung"
}
}
Response
There are four status code responses for this endpoint: 200
, 400
, 404
, and 429
.
Example success response
1
2
3
{
"message": "success"
}
Example error response
The status code 400
could return the following response body. Refer to Troubleshooting for more information about errors you may encounter.
1
2
3
4
5
6
7
{
"errors": [
{
"message": "The provided locale code does not exist."
}
]
}
Troubleshooting
The following table lists possible returned errors and their associated troubleshooting steps.
Error message | Troubleshooting |
---|---|
The provided translations yielded errors when parsing. Please contact Braze for more information. |
Occurs when the third-party translator provides translations with exceptions that generate Liquid errors. Contact Braze Support for further assistance. |
The provided translations are missing 'id_1', 'id_2' |
Translation IDs are mismatched or translated text exceeds limits. For example, this could mean the payload shape is missing fields in the translation object. Every message (when enabled for multi-language) should have a specific number of “translation blocks” with an ID associated with it. If the payload provided is missing any of the IDs, then this would be considered an incomplete object and result in an error. |
The provided locale code does not exist. |
The third-party translator’s payload contains a locale code that doesn’t exist in Braze. |
The provided translations have exceeded the maximum of 20MB. |
The provided payload exceeds the size limit. |
You have exceeded the maximum number of requests. Please try again later. |
All Braze APIs have built-in rate limiting, and this error will automatically returned when the rate has exceeded the allotted amount for this authentication token. |
This message does not support multi-language. |
This can occur when a message ID doesn’t support multi-language messages yet. Only messages in the following channels can be translated: push, in-app messages, and email. |