WhatsApp Template Management API
For a more comprehensive API reference of the WhatsApp Template Management API, please refer to the API playground.
All endpoints require HTTP basic authorization header with Messente API username and password.
You can find the API username and password under your Account API Settings.
List Templates
Returns a list of WhatsApp templates based on given filters.
GET https://api.messente.com/v1/whatsapp/wabas/{wabaId}/templates
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
wabaId | string | The ID of the WABA (WhatsApp Business Account) |
Query Parameters
Name | Type | Required | Description |
---|---|---|---|
limit | integer | The number of templates to return in the list. Although the max size is 500, for large datasets it is recommended to use a lower limit and instead use pagination to avoid potential timeouts. Defaults to 25. | |
before | string | A cursor point used for a paginated request to indicate the template to paginate backwards from. | |
after | string | A cursor point used for a paginated request to indicate the template to paginate forwards from. | |
category | string | A filter for returning only templates matching a specific category. | |
content | string | A search filter representing the content of a template. Only matching templates will be returned in the list. | |
language | string | A filter for returning only templates matching a specific language code. | |
name | string | A search filter representing the name, either full or partial, of a template. Only matching templates will be returned in the list. | |
status | string | A filter for returning only templates matching a specific status. |
Successful Response
HTTP 200 - response containing a list of WhatsApp templates.
WhatsappListTemplatesResponse
Property | Type | Description |
---|---|---|
templates | array | List of template objects (WhatsappTemplateResponse) |
paging | object | Pagination object |
Get Template
Requests a WhatsApp template with the given ID.
GET https://api.messente.com/v1/whatsapp/wabas/{wabaId}/templates/{templateId}
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
wabaId | string | The ID of the WABA (WhatsApp Business Account) | |
templateId | string | The ID of the template to retrieve |
Successful Response
HTTP 200 - response containing a single WhatsApp template.
WhatsappTemplateResponse
Property | Type | Description |
---|---|---|
id | string | Template ID |
components | array | List of template component objects |
language | string | Language of the template |
name | string | Name of the template |
category | string | Template category |
status | string | Template status |
Create Template
Creates a WhatsApp template.
POST https://api.messente.com/v1/whatsapp/wabas/{wabaId}/templates
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
wabaId | string | The ID of the WABA (WhatsApp Business Account) |
Request Body
The WhatsApp template to create.
WhatsappCreateTemplateRequest
Property | Type | Required | Description |
---|---|---|---|
name | string | Name of the template | |
category | string | Template category | |
language | string | Language of the template | |
components | array | List of template component objects |
Successful Response
HTTP 200 - response containing the created template.
WhatsappCreateTemplateResponse
Property | Type | Description |
---|---|---|
id | string | Template ID |
status | string | Template status |
category | string | Template category |
Update Template
Updates a WhatsApp template.
PUT https://api.messente.com/v1/whatsapp/wabas/{wabaId}/templates/{templateId}
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
wabaId | string | The ID of the WABA (WhatsApp Business Account) | |
templateId | string | The ID of the template to retrieve |
Request Body
The template data to be updated.
WhatsappUpdateTemplateRequest
Property | Type | Required | Description |
---|---|---|---|
category | string | No* | Template category |
components | array | No* | List of template component objects |
*At least one of these properties must be provided.
Successful Response
HTTP 200
Delete Template
Deletes a WhatsApp template.
DELETE https://api.messente.com/v1/whatsapp/wabas/{wabaId}/templates
Path Parameters
Name | Type | Required | Description |
---|---|---|---|
wabaId | string | The ID of the WABA (WhatsApp Business Account) |
Query Parameters
Name | Type | Required | Description |
---|---|---|---|
name | string | The name of the template to delete | |
hsmId | string | The ID of the template to delete |
Successful Response
HTTP 200
Error Responses
If the request fails, the API will return an error response with a status code and an error.
- HTTP 400
- HTTP 401
- HTTP 403
- HTTP 500
Error responses will contain a JSON object with the following properties:
Property | Type | Description |
---|---|---|
errors | array | An array of Omnichannel API errors. |
Omnichannel API error
Property | Type | Description |
---|---|---|
title | string | Textual value which corresponds to an error code. Possible values:
|
detail | string | Free form more detailed description of the error |
code | string | Matches the following error title. This field is a constant.
|
source | string | Describes which field is causing the issue in the payload, null for non 400 status code responses |
Schemas
WhatsappPagination
Property | Type | Description |
---|---|---|
previous | string | A URL to get the previous paginated page |
next | string | A URL to get the next paginated page |
cursors | object | Pagination cursors object |
WhatsappPagingCursors
Property | Type | Description |
---|---|---|
before | string | The template before the first template in the current list |
after | string | The template after the last template in the current list |
WhatsappTemplateComponent
Property | Type | Description |
---|---|---|
type | string | Component type |
format | string | Header format (text) |
text | string | Text content of the component |
example | object | Example object for the templated content |
buttons | array | List of buttons for the component |
WhatsappTemplateButton
Property | Type | Description |
---|---|---|
type | string | Button type (quick_reply, phone_number, otp, url) |
otp_type | string | OTP button type (copy_code, one_tap, zero_tap) |
autofill_text | string | Text to be autofilled in the OTP field |
supported_apps | array | List of supported apps for the button |
text | string | Text content of the button (max 25 chars) |
phone_number | string | Phone number for the button (max 20 chars) |
url | string | URL for the button (max 2000 chars) |
WhatsappTemplateExample
Property | Type | Description |
---|---|---|
header_text | array | Example of the templated text for the header |
body_text | array | Example of the templated text for the body |
WhatsappSupportedApp
Property | Type | Required | Description |
---|---|---|---|
package_name | string | Package name | |
signature_hash | string | Signature hash |
Enums
WhatsappComponentType
This is the type of the component. Possible values are:
- body
- header
- footer
- buttons
WhatsappTemplateCategory
This is the category of the template. Possible values are:
- authentication
- marketing
- utility
WhatsappTemplateStatus
This is the status of the template. Possible values are:
- approved
- rejected
- pending