MessageTemplate

Create a message template

Creates a new message template that can be used when composing or scheduling messages.

post/v1/projects/{project_id}/message_templates

Request

  • Base URL: https://api.telerivet.com
  • URL: https://api.telerivet.com/v1/projects/{project_id}/message_templates
  • Auth: one of:
    • HTTP basic
    • OAuth 2 (authorization code, authorization URL https://telerivet.com/oauth/authorize, token URL https://api.telerivet.com/oauth/token)

Path parameters

project_idstring required

ID of the Project

Request body

namestring required

Name of the template (max 127 characters)

contentstring required

Content of the message template (max 2000 characters)

track_clicksboolean

If true, URLs in the content will be replaced with short links that track clicks. Requires a plan with click tracking enabled.

short_link_paramsobject

If track_clicks is true, short_link_params may be used to specify custom parameters for each short link.

route_paramsobject

Route-specific parameters to use when sending messages with this template.

When sending messages via chat apps such as WhatsApp, the route_params parameter can be used to send messages with app-specific features such as quick replies and link buttons.

For more details, see Route-Specific Parameters.

solution_idstring

ID of the solution that this message template is part of, if applicable

Example request

{
  "name": "Welcome Message",
  "content": "Hello, [[contact.name]]! Welcome to our service."
}

Response

Successful response

idstring

ID of the message template

namestring

Name of the template (max 127 characters)

contentstring

Content of the message template (max 2000 characters)

track_clicksboolean

If true, URLs in the content will be replaced with short links that track clicks when the template is used

readonlyboolean

True if the template cannot be modified or deleted (i.e., it was synchronized from a WhatsApp Business Account)

short_link_paramsobject nullable

Custom parameters for short links (only if track_clicks is true)

route_paramsobject nullable

Route-specific parameters to use when sending messages with this template.

When sending messages via chat apps such as WhatsApp, the route_params parameter can be used to send messages with app-specific features such as quick replies and link buttons.

For more details, see Route-Specific Parameters.

waba_idstring nullable

ID of the WhatsApp Business Account that this template is associated with (only present for WhatsApp templates)

whatsapp_templateobject nullable

For templates synchronized from a WhatsApp Business Account, contains the full template data from WhatsApp with properties including id, name, language, status, category, and components. The full format is defined in the WhatsApp Template API documentation. Only present for WhatsApp templates.

time_createdinteger

Time the template was created in Telerivet

time_updatedinteger

Time the template was last updated

varsobject

Custom variables stored for this template. Variable names may be up to 32 characters in length and can contain the characters a-z, A-Z, 0-9, and _. Values may be strings, numbers, or boolean (true/false). String values may be up to 4096 bytes in length when encoded as UTF-8. Up to 100 variables are supported per object. Setting a variable to null will delete the variable.

solution_idstring nullable

ID of the solution that this message template belongs to, if any

project_idstring

ID of the project this template belongs to

Example response

{
  "id": "MTd34f8c1d71a3e2b4",
  "name": "Welcome Message",
  "content": "Hello, [[contact.name]]! Welcome to our service.",
  "time_created": 1390343800,
  "time_updated": 1390343845,
  "solution_id": "SO2ad0100821a98bea",
  "project_id": "PJ2ad0100821a98bea"
}

Changes

No recorded changes to this operation across all 1 revision of this API.