View translations for a campaign
/campaigns/translations
Use this endpoint to view all the translations for each message variant in a campaign.
Viewing translations for campaign messages 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.get
permission.
Rate limit
This endpoint has a rate limit of 250,000 requests per hour.
Path parameters
Parameter | Required | Data Type | Description |
---|---|---|---|
campaign_id |
Required for translating a campaign | String | The ID of your campaign. |
message_variation_id |
Required | String | The ID of your message. |
Note all translation IDs are considered universal unique identifiers (UUIDs), which can be found in Multi-Language Support settings or in the request response.
Example request
1
2
3
curl --location --request GET 'https://rest.iad-03.braze.com/campaign/translations' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR-REST-API-KEY'
Response
There are four status code responses for this endpoint: 200
, 400
, 404
, and 429
.
Example success response
The status code 200
could return the following response header and body.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Content-Type: application/json
Authorization: Bearer YOUR-REST-API-KEY
{
"translations": [
{
"locale": {
"name": "zh-HK",
"country": "Hong Kong",
"language": "Chinese (Traditional)",
},
"translation_map": {
"id_0": "Hello",
"id_1": "My name is Jacky",
"id_2": "Where is the library?"
}
}
]
}
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": "This message does not support multi-language."
}
]
}
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_MESSAGE_VARIATION_ID |
Confirm your message ID is correct. |
MESSAGE_NOT_FOUND |
Check that the message to be translated. |
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. |