MessageTemplate
MessageTemplate is a resource that represents a template for a message that can be sent to a candidate. It can be used in the initial message of a FlowRun. Or as a standalone message. MessageTemplates are a proxy of WhatsApp templates.
This means it is a requirement to have a WhatsApp Business Account/number connected to the platform to create these messages. However, the MessageTemplate can be used to send messages to any channel, not just WhatsApp.
Currently it is not possible to update a MessageTemplate after it has been created.
Endpoints
GET /message-templates- Retrieve a list of all MessageTemplates.GET /message-templates/{id}- Retrieve a specific MessageTemplate by ID.POST /message-templates- Create a new MessageTemplate.DELETE /message-templates/{id}- Delete a specific MessageTemplate by ID.
Attributes
name
String
The name of the message template. This is displayed in the message payload.
language
String
The language of the message template. This is used by Meta while validating the message template.
category
String
The category of the message template. This can be Marketing, Utility or Authorization.
preview
String
The preview text of the message template.
createdAt
DateTime
The timestamp when the message template was created.
updatedAt
DateTime
The timestamp when the message template was last updated.
Components
text
String
The text content of the component.
type
String
The type of the component. Can be HEADER, BODY, or FOOTER.
format
String
The format of the component, only required for the header.
example
JSON object
The example usage of the component. Only required when using variables.
See Components for more information on the components.
We only support text format for the components at this moment
At this time the header and footer components are not supported in the web preview, but they will work on other channels.
Example POST body
Validation errors
Validation is done by The WhatsApp servers at Meta, we will pass the validation errors back to you in the response.
Example validation error response
OpenAPI
Last updated