Templates V1

Version 1 endpoints for managing message templates. Currently maintained for existing users. Version 2 is recommended.

List all templates belonging to a project ID.

SecurityBasic or oAuth2
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
Response samples
application/json
{
  • "templates": [
    • {
      }
    ]
}

Creates a template

SecurityBasic or oAuth2
Request
path Parameters
project_id
required
string

Required. The project ID.

Request Body schema: application/json
required

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
{
  • "description": "English text template with one parameter using Conversation API generic format.",
  • "default_translation": "en",
  • "channel": "CONVERSATION",
  • "translations": [
    • {
      }
    ]
}
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.

SecurityBasic or oAuth2
Request
path Parameters
project_id
required
string

Required. The project ID.

template.id
required
string

The id of the template to be updated. Specified or automatically generated during template creation. Unique per project.

query Parameters
update_mask.paths
Array of strings

The set of field mask paths.

Request Body schema: application/json
required

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
{
  • "description": "English text template with one parameter using Conversation API generic format.",
  • "default_translation": "en",
  • "channel": "CONVERSATION",
  • "translations": [
    • {
      }
    ]
}
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

SecurityBasic or oAuth2
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
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.

SecurityBasic or oAuth2
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
Response samples
application/json
null