View all translations for a Content Block
/content_blocks/translations
Use this endpoint to view all the translations for a Content Block. See Locales in messages for more information about translation features.
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 content_blocks.translations.get permission.
Rate limit
This endpoint has a rate limit of 250,000 requests per minute.
Query parameters
| Parameter | Required | Data Type | Description |
|---|---|---|---|
content_block_id |
Required | String | The ID of your Content Block. |
locale_id |
Optional | String | A locale UUID to filter the responses. |
All translation IDs are considered universal unique identifiers (UUIDs), which can be found in the GET endpoint’s response.
Example request
1
2
3
curl --location --request GET 'https://rest.iad-03.braze.com/content_blocks/translations?content_block_id={content_block_id}&locale_id={locale_uuid}' \
--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
19
20
21
22
23
24
25
26
27
28
29
30
31
32
{
"translations": [
{
"translation_map": {
"id_0": "¡Hola!",
"id_1": "Me llamo Jacky",
"id_2": "¿Dónde está la biblioteca?"
},
"locale": {
"uuid": "c7c12345-te35-1234-5678-abcdefa99r3f",
"name": "es-MX",
"country": "MX",
"language": "es",
"locale_key": "es-mx"
}
},
{
"translation_map": {
"id_0": "你好",
"id_1": "我的名字是 Jacky",
"id_2": "圖書館在哪裡?"
},
"locale": {
"uuid": "a1b12345-cd35-1234-5678-abcdefa99r3f",
"name": "zh-HK",
"country": "HK",
"language": "zh",
"locale_key": "zh-hk"
}
}
]
}
Example error response
The status code 400 could return the following response body.
1
2
3
4
5
6
7
{
"errors": [
{
"message": "This message does not support multi-language."
}
]
}
Edit this page on GitHub