Required. The updated template.
The id of the template. Specify this yourself during creation. Otherwise, we will generate an ID for you. This must be unique for a given project.
The version of the template. While creating a template, this will be defaulted to 1. When updating a template, you must supply the latest version of the template in order for the update to be successful.
The default translation to use if not specified. Specified as a BCP-47 language_code and the language_code must exist in the translations list.
- https://us.template.api.sinch.comhttps://us.template.api.sinch.com/v2/projects/{project_id}/templates/{template_id}
curl -i -X PUT \
-u '<username>:<password>' \
'https://us.template.api.sinch.com/v2/projects/{project_id}/templates/{template_id}' \
-H 'Content-Type: application/json' \
-d '{
"id": "<template id>",
"description": "English text template with one parameter using Conversation API generic format.",
"version": 1,
"default_translation": "en-US",
"translations": [
{
"language_code": "en-US",
"version": "1",
"variables": [
{
"key": "name",
"preview_value": "Mr Jones"
}
],
"text_message": {
"text": "Hi ${name}"
},
"channel_template_overrides": {
"WHATSAPP": {
"template_reference": {
"template_id": "<referenced template id>",
"version": "1",
"language_code": "en-US",
"parameters": {
"body[1]text": "defaultValue"
}
},
"parameter_mappings": {
"body[1]text": "name"
}
}
}
}
]
}'A successful response.
The id of the template. Specify this yourself during creation. Otherwise, we will generate an ID for you. This must be unique for a given project.
The version of the template. While creating a template, this will be defaulted to 1. When updating a template, you must supply the latest version of the template in order for the update to be successful.
The default translation to use if not specified. Specified as a BCP-47 language_code and the language_code must exist in the translations list.
{ "id": "id_string", "description": "Template description", "version": 1, "default_translation": "en-US", "translations": [ { … } ], "create_time": "2019-08-24T14:15:22Z", "update_time": "2019-08-24T14:15:22Z" }