Update translation in a campaign
/campaigns/translations
Use this endpoint to update multiple translations for a campaign.
Updating a translation in a campaign via API 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 hour.
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. |
locale_id |
Required | String | The ID 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
11
12
13
Content-Type: application/json
Authorization: Bearer YOUR-REST-API-KEY
{
"campaign_id": "9a0ba932-11c0-4c33-b529-e79aafc12409",
"message_variation_id": "f5896eec-847d-4c0d-a4b6-7695e67520d7",
"locale_id": "3fa10d31-83ae-4ff4-9631-f52cea9ec8fa",
"translation_map": {
"id_4": "¿Dónde está la biblioteca? Me llamo T-Bone, La araña discoteca.",
"subject_1": "¿Dónde está la biblioteca? Me llamo T-Bone, La araña discoteca.",
"id_1": "¿Dónde está la biblioteca? Me llamo T-Bone, La araña discoteca.",
"image": "¿Dónde está la biblioteca? Me llamo T-Bone, La araña discoteca."
}
}
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": "Something went wrong. Translation IDs are mismatched or translated text exceeds limits."
}
]
}
Troubleshooting
The following table lists possible returned errors and their associated troubleshooting steps.
Error message | Troubleshooting |
---|---|
INVALID_CAMPAIGN_ID |
Confirm the campaign ID matches the campaign you’re translating. |
INVALID_LOCALE_ID |
Confirm your locale ID exists in your message translation. |
INVALID_MESSAGE_VARIATION_ID |
Confirm your message ID is correct. |
INVALID_TRANSLATION_OBJECT |
Translation IDs are mismatched or translated text exceeds limits. |
MESSAGE_NOT_FOUND |
Check that the message to be translated. |
LOCALE_NOT_FOUND |
Confirm the locale exists in your multi-language settings. |
MISSING_TRANSLATIONS |
Translation IDs must match to the message. |
MULTI_LANGUAGE_NOT_ENABLED |
Multi-language settings aren’t turned on for your workspace. |
MULTI_LANGUAGE_NOT_ENABLED_ON_MESSAGE |
Only email campaigns or Canvas messages with emails can be translated. |
UNSUPPORTED_CHANNEL |
Only messages in email campaigns or Canvas messages with emails can be translated. |