Not production

WhatsApp Template Management API

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

GET https://api.messente.com/v1/whatsapp/wabas/{wabaId}/templates

Returns a list of WhatsApp templates based on given filters.

Path Parameters

Name Type Required Description
wabaId string Yes The ID of the WABA (WhatsApp Business Account)

Query Parameters

Name Type Required Description
limit integer No 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 No A cursor point used for a paginated request to indicate the template to paginate backwards from.
after string No A cursor point used for a paginated request to indicate the template to paginate forwards from.
category string No A filter for returning only templates matching a specific category.
content string No A search filter representing the content of a template. Only matching templates will be returned in the list.
language string No A filter for returning only templates matching a specific language code.
name string No A search filter representing the name, either full or partial, of a template. Only matching templates will be returned in the list.
status string No 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

GET https://api.messente.com/v1/whatsapp/wabas/{wabaId}/templates/{templateId}

Requests a WhatsApp template with the given ID.

Path Parameters

Name Type Required Description
wabaId string Yes The ID of the WABA (WhatsApp Business Account)
templateId string Yes 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

POST https://api.messente.com/v1/whatsapp/wabas/{wabaId}/templates

Creates a WhatsApp template.

Path Parameters

Name Type Required Description
wabaId string Yes The ID of the WABA (WhatsApp Business Account)

Request Body

The WhatsApp template to create.

WhatsappCreateTemplateRequest

Property Type Required Description
name string Yes Name of the template
category string Yes Template category
allow_category_change boolean No Allow category change (default: false)
language string Yes Language of the template
components array Yes List of template components

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

PUT https://api.messente.com/v1/whatsapp/wabas/{wabaId}/templates/{templateId}

Updates a WhatsApp template.

Path Parameters

Name Type Required Description
wabaId string Yes The ID of the WABA (WhatsApp Business Account)
templateId string Yes The ID of the template to update

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

DELETE https://api.messente.com/v1/whatsapp/wabas/{wabaId}/templates

Deletes a WhatsApp template.

Path Parameters

Name Type Required Description
wabaId string Yes The ID of the WABA (WhatsApp Business Account)

Query Parameters

Name Type Required Description
name string Yes The name of the template to delete
hsmId string No The ID of the template to delete

Successful Response

HTTP 200

Error Responses

HTTP 400
HTTP 401
HTTP 403
HTTP 500
Property Type Info
errorsrequired array

An array of errors

A container for Omnichannel API error

Property Type Info
titlerequired string

Textual value which corresponds to an error code

Possible values:
  • Not found
  • Forbidden
  • Unauthorized
  • Invalid data
  • Internal Server Error
  • Missing data
  • Method not allowed
detailrequired string

Free form more detailed description of the error

coderequired string

Matches the following error title. This field is a constant

  • 101 - Not found
  • 102 - Forbidden
  • 103 - Unauthorized
  • 104 - Internal Server Error
  • 105 - Invalid data
  • 106 - Missing data
  • 107 - Method not allowed
sourcerequired 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 Yes Package name
signature_hash string Yes 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