Download OpenAPI specification:Download

Templates

Endpoints for managing message templates

List all templates belonging to a project ID.

Request
path Parameters
project_id
required
string

Required. The project ID.

Responses
200

A successful response.

Response Schema: application/json
Array of objects (TODO: Pagination)
Array
channel
string (typeChannel)
Enum: "UNSPECIFIED" "CONVERSATION" "MESSENGER" "WHATSAPP" "RCS" "SMS" "VIBER" "VIBERBM" "TELEGRAM" "INSTAGRAM" "KAKAOTALK" "APPLEBC"
create_time
string <date-time>

Timestamp when the template was created.

default_translation
string

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.

description
string

The description of the template.

id
string

The id of the template. Specify this yourself during creation otherwise we will generate an ID for you. This has to be unique for a given project.

Array of objects (typeTemplateTranslation)

List of translations for the template.

update_time
string <date-time>

Timestamp when the template was updated.

default

An unexpected error response.

get/v1/projects/{project_id}/templates
Request samples
curl -i -X GET \
  'https://us.template.api.sinch.com/v1/projects/{project_id}/templates'
Response samples
application/json
{
  • "templates": [
    • {
      }
    ]
}

Creates a template

Request
path Parameters
project_id
required
string

Required. The project ID.

Request Body schema: application/json

Required. The template to create.

default_translation
required
string

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.

required
Array of objects (typeTemplateTranslation)

List of translations for the template.

channel
string (typeChannel)
Enum: "UNSPECIFIED" "CONVERSATION" "MESSENGER" "WHATSAPP" "RCS" "SMS" "VIBER" "VIBERBM" "TELEGRAM" "INSTAGRAM" "KAKAOTALK" "APPLEBC"
create_time
string <date-time>

Timestamp when the template was created.

description
string

The description of the template.

id
string

The id of the template. Specify this yourself during creation otherwise we will generate an ID for you. This has to be unique for a given project.

update_time
string <date-time>

Timestamp when the template was updated.

Responses
200

A successful response.

Response Schema: application/json
channel
string (typeChannel)
Enum: "UNSPECIFIED" "CONVERSATION" "MESSENGER" "WHATSAPP" "RCS" "SMS" "VIBER" "VIBERBM" "TELEGRAM" "INSTAGRAM" "KAKAOTALK" "APPLEBC"
create_time
string <date-time>

Timestamp when the template was created.

default_translation
string

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.

description
string

The description of the template.

id
string

The id of the template. Specify this yourself during creation otherwise we will generate an ID for you. This has to be unique for a given project.

Array of objects (typeTemplateTranslation)

List of translations for the template.

update_time
string <date-time>

Timestamp when the template was updated.

default

An unexpected error response.

post/v1/projects/{project_id}/templates
Request samples
application/json
{ }
Response samples
application/json
{
  • "channel": "UNSPECIFIED",
  • "create_time": "2019-08-24T14:15:22Z",
  • "default_translation": "string",
  • "description": "string",
  • "id": "string",
  • "translations": [
    • {
      }
    ],
  • "update_time": "2019-08-24T14:15:22Z"
}

Updates a template.

Request
path Parameters
project_id
required
string

Required. The project ID.

template.id
required
string

The id of the template. Specify this yourself during creation otherwise we will generate an ID for you. This has to be unique for a given project.

query Parameters
update_mask.paths
Array of strings

The set of field mask paths.

Request Body schema: application/json

Required. The updated template.

channel
string (typeChannel)
Enum: "UNSPECIFIED" "CONVERSATION" "MESSENGER" "WHATSAPP" "RCS" "SMS" "VIBER" "VIBERBM" "TELEGRAM" "INSTAGRAM" "KAKAOTALK" "APPLEBC"
create_time
string <date-time>

Timestamp when the template was created.

default_translation
string

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.

description
string

The description of the template.

id
string

The id of the template. Specify this yourself during creation otherwise we will generate an ID for you. This has to be unique for a given project.

Array of objects (typeTemplateTranslation)

List of translations for the template.

update_time
string <date-time>

Timestamp when the template was updated.

Responses
200

A successful response.

Response Schema: application/json
channel
string (typeChannel)
Enum: "UNSPECIFIED" "CONVERSATION" "MESSENGER" "WHATSAPP" "RCS" "SMS" "VIBER" "VIBERBM" "TELEGRAM" "INSTAGRAM" "KAKAOTALK" "APPLEBC"
create_time
string <date-time>

Timestamp when the template was created.

default_translation
string

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.

description
string

The description of the template.

id
string

The id of the template. Specify this yourself during creation otherwise we will generate an ID for you. This has to be unique for a given project.

Array of objects (typeTemplateTranslation)

List of translations for the template.

update_time
string <date-time>

Timestamp when the template was updated.

default

An unexpected error response.

patch/v1/projects/{project_id}/templates/{template.id}
Request samples
application/json
{ }
Response samples
application/json
{
  • "channel": "UNSPECIFIED",
  • "create_time": "2019-08-24T14:15:22Z",
  • "default_translation": "string",
  • "description": "string",
  • "id": "string",
  • "translations": [
    • {
      }
    ],
  • "update_time": "2019-08-24T14:15:22Z"
}

Get a template

Request
path Parameters
project_id
required
string

Required. The project ID.

template_id
required
string

Required. The ID of the template to fetch.

Responses
200

A successful response.

Response Schema: application/json
channel
string (typeChannel)
Enum: "UNSPECIFIED" "CONVERSATION" "MESSENGER" "WHATSAPP" "RCS" "SMS" "VIBER" "VIBERBM" "TELEGRAM" "INSTAGRAM" "KAKAOTALK" "APPLEBC"
create_time
string <date-time>

Timestamp when the template was created.

default_translation
string

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.

description
string

The description of the template.

id
string

The id of the template. Specify this yourself during creation otherwise we will generate an ID for you. This has to be unique for a given project.

Array of objects (typeTemplateTranslation)

List of translations for the template.

update_time
string <date-time>

Timestamp when the template was updated.

default

An unexpected error response.

get/v1/projects/{project_id}/templates/{template_id}
Request samples
curl -i -X GET \
  'https://us.template.api.sinch.com/v1/projects/{project_id}/templates/{template_id}'
Response samples
application/json
{
  • "channel": "UNSPECIFIED",
  • "create_time": "2019-08-24T14:15:22Z",
  • "default_translation": "string",
  • "description": "string",
  • "id": "string",
  • "translations": [
    • {
      }
    ],
  • "update_time": "2019-08-24T14:15:22Z"
}

Delete a template.

Request
path Parameters
project_id
required
string

Required. The project ID.

template_id
required
string

Required. The ID of the template to fetch.

Responses
200

A successful response.

Response Schema: application/json
any
default

An unexpected error response.

delete/v1/projects/{project_id}/templates/{template_id}
Request samples
curl -i -X DELETE \
  'https://us.template.api.sinch.com/v1/projects/{project_id}/templates/{template_id}'
Response samples
application/json
null