Skip to content

Update translation in a Canvas

put

/canvas/translations

Use this endpoint to update multiple translations for a Canvas.

Prerequisites

To use this endpoint, you’ll need an API key with the canvas.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

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
{
    "canvas_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.

1
2
3
4
5
6
7
8
9
10
      INVALID_CAMPAIGN_ID = "Invalid campaign or step ID"
      INVALID_LOCALE_ID = "Invalid locale ID"
      INVALID_MESSAGE_VARIATION_ID = "Invalid message ID"
      INVALID_TRANSLATION_OBJECT = "Invalid translation object"
      MESSAGE_NOT_FOUND = "Message not found"
      LOCALE_NOT_FOUND = "Locale not found"
      MISSING_TRANSLATIONS = "Missing translations from the request body"
      MULTI_LANGUAGE_NOT_ENABLED = "Multi-language feature is not enabled on this company"
      MULTI_LANGUAGE_NOT_ENABLED_ON_MESSAGE = "This message does not have multi-language setup"
      UNSUPPORTED_CHANNEL = "This message type does not support multi-language"
HOW HELPFUL WAS THIS PAGE?
New Stuff!