Skip to content

Get a template.

Request

Fetches a template under the given project ID.

Security
Basic or oAuth2
Path
project_idstringrequired

The project ID.

template_idstringrequired

The ID of the template to fetch.

curl -i -X GET \
  -u '<username>:<password>' \
  'https://us.template.api.sinch.com/v2/projects/{project_id}/templates/{template_id}'

Responses

A successful response.

Bodyapplication/json
idstring

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.

Example:"id_string"
descriptionstring

The description of the template.

Example:"Template description"
versioninteger

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.

Example:1
default_translationstring

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.

Example:"en-US"
translationsArray of objects(v2TemplateTranslation)
create_timestring, (date-time)read-only

Timestamp of when the template was created.

update_timestring, (date-time)read-only

Timestamp when the template was updated.

Response
{ "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" }
We'd love to hear from you!
Rate this content: