Create and manage Template Messages
You can create and manage Template Messages using either the API or the UI. This guide explains both methods, so you can choose the option that best fits your workflow. You may combine both approaches or simply use the one that is most efficient for your scenario.
Via API
Create new WABA template
POST
https://waba-v2.360dialog.io/v1/configs/templates
The message template name field is limited to 512 characters. The message template content field is limited to 1024 characters.
Headers
D360-API-KEY*
string
Body Properties
<NAME>
String
Required.
Template name.
Maximum 512 characters.
order_confirmation
<CATEGORY>
Enum
Required.
Template category.
Allowed values: AUTHENTICATION, MARKETING, UTILITY
<ALLOW_CATEGORY_CHANGE>
Boolean
Optional.
Set to true
to allow Meta to automatically assign a category. If omitted, the template may be rejected due to miscategorization.
true
<LIBRARY_TEMPLATE_NAME>
String
Optional.
The exact name of the Utility Template Library template.
Learn how to create templates using Utility Template Library
delivery_update_1
<LIBRARY_TEMPLATE_BUTTON_INPUTS>
Array of objects
Optional.
The website and/or phone number of the business being used in the template.
Note: For utility templates that contain buttons, this property is not optional.
Learn how to create templates using Utility Template Library
“[ {'type': 'URL', 'url': {'base_url' : 'https://www.example.com/{{1}}', 'url_suffix_example' : 'https://www.example.com/demo'}}, {type: 'PHONE_NUMBER', 'phone_number': '+16315551010'} ]"
Request body
Templates are composed of various text, media, and interactive components, based on your business needs. Refer to the Template Elements for a list of all possible components.
When creating a template, define its components by assigning an array of component objects to the components property in the body of the request.
For example, here's an array containing a text body component with two variables and sample values, a phone number button component, and a URL button component:
[
{
"type": "BODY",
"text": "Thank you for your order, {{1}}! Your confirmation number is {{2}}. If you have any questions, please use the buttons below to contact support. Thank you for being a customer!",
"example": {
"body_text": [
[
"Pablo","confirmation_number"
]
]
}
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "PHONE_NUMBER",
"text": "Call",
"phone_number": "phone_number"
},
{
"type": "URL",
"text": "Contact Support",
"url": "https://www.website.com/support"
}
]
}
]
Note that templates categorized as AUTHENTICATION
have unique component requirements. See Authentication Templates.
In addition, if Meta determines that a template has been miscategorized, its status will be set to REJECTED
and you will receive a template status webhook indicating that it was rejected for miscategorization.
{
"category": "MARKETING",
"components": [
{
"example": {
"body_text": [
[
"Lorem"
]
]
},
"text": "Lorem {{1}} ipsum",
"type": "BODY"
}
],
"created_at": "2024-06-25T09:42:33Z",
"created_by": {
"user_id": "360dialog_user_id",
"user_name": "360dialog_user_name"
},
"external_id": "template_external_id",
"id": "template_id",
"language": "en_US",
"modified_at": "2024-06-25T09:42:37Z",
"modified_by": {
"user_id": "360dialog_user_id",
"user_name": "360dialog_user_name"
},
"name": "string",
"namespace": "string",
"partner_id": "string",
"quality_score": null,
"rejected_reason": null,
"status": "submitted",
"updated_external": true,
"waba_account_id": "string"
}
Get WABA templates
GET
https://waba-v2.360dialog.io/v1/configs/templates
Request example
curl --request GET
--url https://waba-v2.360dialog.io/v1/configs/templates
--header 'D360-API-KEY: '
--header 'Content-Type: application/json'
Query Parameters
filters
string
A JSON object of params and their expected values
id
, partner_id
, business_templates.name
, status
, category
limit
string
Objects limit to return in the response
default: 1000
offset
string
Show the results starting from an offset
default: 0
sort
string
Use minus -
symbol for descending sorting
id
, name
, status
Headers
D360-API-KEY*
string
{
"count": 0,
"filters": [],
"limit": 1000,
"offset": 0,
"sort": ["id"],
"total": 0,
"waba_templates": [
{
"category": "string",
"components": [
{
"format": "string",
"type": "string"
},
{
"text": "string",
"type": "string"
}
],
"external id": "string"
"language": "string",
"name": "string",
"namespace": "string",
"rejected_reason": "string",
"status": "string"
}
]
}
Remove a Template Message
Before deleting a Template Message, keep the following points in mind:
Pending delivery: Messages that have already been sent but not yet delivered (e.g., if the customer’s device is offline) will continue to attempt delivery for up to 30 days.
After deletion: If a message is sent from a previously approved template 30 days after deletion, you will receive a
"Structure Unavailable"
error, and the customer will not receive the message.Name reuse restriction: Once a template is deleted, its name cannot be reused for 30 days. To create a new template during this period, use a different name.
Template elements: For details on the components available in a Template Message, see Template Elements.
How to remove a Template Message
You can delete a WABA Template Message by using either its name or template ID.
Remove by template ID
To delete a template message by ID, you may need to retrieve the ID and in the request by including the template's ID:
Only the template with the specified Template ID will be deleted.
Each template has a unique ID for each language, so make sure you use the correct Template ID when making a deletion request.
DELETE
https://hub.360dialog.io/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/waba_templates/{template_id}
Request example
curl --request DELETE
--url https://hub.360dialog.io/api/v2/partners/{partner_id}/waba_accounts/{waba_account_id}/waba_templates/{template_id}
--header 'D360-API-KEY: '
--header 'Accept: application/json'
partner_id
string
The ID of the partner
waba_account_id
string
Internal 360dialog ID of the waba account
template_id
string
The ID of the template
Expected outcomes
This message confirms the deletion of a template.
{
"meta": {
"developer_message": "template =`{template_id}` was deleted",
"http_code": 200,
"success": true
}
}
Remove by template name
Deleting a template by name deletes all templates that match that name (meaning templates with the same name but different languages will also be deleted).
DELETE
https://waba-v2.360dialog.io/v1/configs/templates/{template_name}
Request example
curl --request DELETE
--url https://waba.360dialog.io/v1/configs/templates/{template_name}
--header 'D360-API-KEY: '
--header 'Content-Type: application/json'
template_name
string
Name of the template (can be fetched with the get WABA templates request)
Expected outcomes
This message confirms the deletion of a template.
{
"meta": {
"developer_message": "template name=`<template_name>` was deleted",
"http_code": 200,
"success": true
}
}
Edit WABA template
POST
https://waba-v2.360dialog.io/v1/configs/templates/{external_id}
Request example
curl --request POST
--url https://waba.360dialog.io/v1/configs/templates/{external_id}
--header 'D360-API-KEY: '
--header 'Content-Type: application/json'
Path Parameters
external_id*
string
external id (can be fetched with the get WABA templates request)
Headers
D360-API-KEY*
string
In the WABA Management UI
The Template Management feature in the 360Dialog WABA Management UI supports both text and media templates. To manage Template Messages in the UI you will need to access the Template Manager: the Template Manager supports both text and media templates and has the following functions:
Create and preview new template messages
Monitor current approval status of all your templates
Copy and Delete templates
Add different template Languages
Allow template category change
Edit Templates
Access
Each WABA has it's own set of Message Templates. To access your Message Templates, find the WABA number you would like to add a Message Template to in the Numbers page > Manage > Templates.
In WhatsApp Account > Manage Templates.

Overview
This is the Template Management home page where you can get an overview of all Templates under your number.
Delete Template
Replicate Template. Useful for creating variants of a similar template
Add different language to a template
Edit Templates
See Templates Category

Template Verification Process
Template messages must be submitted to Meta for review before they are available to use. The status of this review can be seen by the color of the template language. Please review our tips on Template Messaging before submitting any templates for review.
Templates with a gray background are in draft mode and have not been submitted for review by Meta yet.

Create a template
To create a Message Template, click on the blue Add Template
button in the home page.
When creating your template, you will need to include the following information:
Template Name
Name can only contain lowercase alphanumeric characters and underscores ( _ )
Template Category
Template Language
Language that the template is written in
Allow Template Category Change
Selecting Yes to this value will allow Meta to assign whatever category they determine to be appropriate to avoid template rejection due to miscategorization.
Template Type
Standard (text only) or Media Template


Creating Standard (text only) Templates:
Standard Message Templates only have a BODY section. In order to add a variable, insert {{#}} at the given position, where # represents the variable index, which needs to start at {{1}}

Creating Media Templates
The Media Templates have more building blocks and features. It consists of the following building blocks:
The Header is optional and serves as the title or header of your template. It supports the following:
Text
Image
Document
Video

Important: all media examples must be urls that point to a valid media file.
Creating templates with Buttons
Through the 360dialog Client Hub, you can add buttons and combinations as per our Buttons documentation.

Sample Templates
For all accounts, WhatsApp already registers a number of pre-approved sample templates. These templates can be used at any time and cannot be deleted.
Sample templates always have sample_ in the name.

Appeal Template Rejections
Rejected Template messages can be appealed via the Account Quality section in Meta Business Manager.
Last updated
Was this helpful?