Templates
Endpoints for managing WhatsApp message templates
Retrieve message templates from the template library for a WABA.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Template library retrieved successfully
Response payload containing a list of templates from the library
Unauthorized
Internal server error
GET /message_template_library HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
[
{
"data": [
{
"body": "Hi {{1}}, ...",
"body_param_types": [
"text"
],
"body_params": [
"text"
],
"buttons": [
{
"phone_number": "+13057652345",
"text": "Reschedule",
"type": "URL",
"url": {
"base_url": "https://www.example.com/{{1}}",
"url_suffix_example": "https://www.example.com/demo"
}
}
],
"category": "UTILITY",
"header": "Your account balance is low",
"industry": [
"text"
],
"language": "en_US",
"name": "low_balance_warning_1",
"topic": "PAYMENTS",
"usecase": "LOW_BALANCE_WARNING"
}
],
"paging": {
"cursors": {
"after": "MjQZD",
"before": "MAZDZD"
},
"next": "https://api.example.com/message_template_library?after=abc123"
}
}
]Retrieve message templates. Returns paginated results with template details including status, category, components, and quality scores.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Comma-separated list of fields to include (e.g. id,name,status,components)
Maximum number of templates to return per page
Cursor for the next page of results
Cursor for the previous page of results
Templates retrieved successfully
Bad request
Unauthorized
Forbidden
Not found
Internal server error
GET /message_templates HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
{
"data": [
{
"ad_account_id": "text",
"ad_adset_id": "text",
"ad_campaign_id": "text",
"ad_id": "text",
"category": "UTILITY",
"components": [
{
"add_security_recommendation": true,
"buttons": [
{
"autofill_text": "text",
"flow_action": "navigate",
"flow_id": "text",
"flow_json": "text",
"flow_name": "text",
"navigate_screen": "text",
"otp_type": "ONE_TAP",
"package_name": "text",
"phone_number": "+2233223322",
"signature_hash": "text",
"text": "Visit us",
"type": "URL",
"url": "https://www.example.com"
}
],
"code_expiration_minutes": 1,
"example": {
"body_text": [
[
"text"
]
],
"header_handle": [
"text"
],
"header_text": [
"text"
]
},
"format": "TEXT",
"text": "Hello {{1}}, your order is ready.",
"type": "BODY"
}
],
"correct_category": "UTILITY",
"cta_url_link_tracking_opted_out": true,
"degrees_of_freedom_spec": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"display_format": "ORDER_DETAILS",
"health_status": {
"can_send_message": "AVAILABLE"
},
"id": "123456789",
"is_primary_device_delivery_only": true,
"is_sms_fallback_enabled": true,
"language": "en_US",
"last_updated_time": 1,
"library_template_name": "welcome_template",
"message_send_ttl_seconds": 1,
"name": "order_update",
"optimization_spec": {
"bid_amount": 400,
"bid_strategy": "LOWEST_COST_WITH_BID_CAP"
},
"parameter_format": "POSITIONAL",
"previous_category": "MARKETING",
"quality_score": {
"date": 1,
"reason": "text",
"reasons": [
"text"
],
"score": "GREEN"
},
"rejected_reason": "NONE",
"source": "manual",
"status": "APPROVED",
"sub_category": "ORDER_STATUS"
}
],
"paging": {
"cursors": {
"after": "text",
"before": "text"
},
"next": "text",
"previous": "text"
}
}Create a new message template. Templates must be approved before they can be used to send messages. Supports cloning from the Meta Template Library.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Message template payload
UTILITYORDER_DETAILSen_USwelcome_templateorder_updatePOSITIONALdirectORDER_STATUSTemplate created successfully
UTILITY{hsm-id}APPROVEDBad request
Unauthorized
Forbidden
Internal server error
POST /message_templates HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 1120
{
"allow_category_change": true,
"category": "UTILITY",
"components": [
{
"add_security_recommendation": true,
"buttons": [
{
"autofill_text": "text",
"flow_action": "navigate",
"flow_id": "text",
"flow_json": "text",
"flow_name": "text",
"navigate_screen": "text",
"otp_type": "ONE_TAP",
"package_name": "text",
"phone_number": "+2233223322",
"signature_hash": "text",
"text": "Visit us",
"type": "URL",
"url": "https://www.example.com"
}
],
"code_expiration_minutes": 1,
"example": {
"body_text": [
[
"text"
]
],
"header_handle": [
"text"
],
"header_text": [
"text"
]
},
"format": "TEXT",
"text": "Hello {{1}}, your order is ready.",
"type": "BODY"
}
],
"cta_url_link_tracking_opted_out": true,
"display_format": "ORDER_DETAILS",
"is_primary_device_delivery_only": true,
"language": "en_US",
"library_template_body_inputs": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"library_template_button_inputs": [
{
"ANY_ADDITIONAL_PROPERTY": "anything"
}
],
"library_template_name": "welcome_template",
"message_send_ttl_seconds": 1,
"name": "order_update",
"optimization_spec": {
"bid_amount": 400,
"bid_strategy": "LOWEST_COST_WITH_BID_CAP"
},
"parameter_format": "POSITIONAL",
"send_type": "direct",
"sub_category": "ORDER_STATUS"
}{
"category": "UTILITY",
"id": "{hsm-id}",
"status": "APPROVED"
}Delete message templates. Can delete by name (all languages), by specific template ID, or by multiple template IDs.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Template name to delete (deletes all languages if hsm_id not specified)
Specific template ID to delete (used with name for single-language deletion)
JSON array of template IDs to delete (max 100)
Templates deleted successfully
trueBad request
Unauthorized
Internal server error
DELETE /message_templates HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
{
"success": true
}Archive one or more message templates for a WABA. Only approved or rejected templates can be archived. Archived templates are scheduled for deletion after 28 days.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Template IDs to archive (up to 100)
["1368161468357453"]Archive operation result
["1368161468357453"]Bad request
Unauthorized
Internal server error
POST /message_templates/archive HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 32
{
"hsm_ids": [
"1368161468357453"
]
}{
"archived_templates": [
"1368161468357453"
],
"failed_templates": {
"ANY_ADDITIONAL_PROPERTY": "text"
}
}Unarchive one or more archived message templates for a WABA within the 28-day window. Restores templates to their previous status (defaults to APPROVED if no previous status is available). Resets the inactivity clock.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Template IDs to unarchive (up to 100)
["1368161468357453"]Unarchive operation result
["1368161468357453"]Bad request
Unauthorized
Internal server error
POST /message_templates/unarchive HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 32
{
"hsm_ids": [
"1368161468357453"
]
}{
"failed_templates": {
"ANY_ADDITIONAL_PROPERTY": "text"
},
"unarchived_templates": [
"1368161468357453"
]
}Retrieve a specific message template by its ID with all available fields.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Message template ID
Comma-separated list of fields to include (e.g. id,name,status,components,optimization_spec)
Template retrieved successfully
UTILITYUTILITYORDER_DETAILS123456789en_USwelcome_templateorder_updatePOSITIONALMARKETINGNONEmanualAPPROVEDORDER_STATUSBad request
Unauthorized
Not found
Internal server error
GET /message_templates/{template_id} HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
{
"ad_account_id": "text",
"ad_adset_id": "text",
"ad_campaign_id": "text",
"ad_id": "text",
"category": "UTILITY",
"components": [
{
"add_security_recommendation": true,
"buttons": [
{
"autofill_text": "text",
"flow_action": "navigate",
"flow_id": "text",
"flow_json": "text",
"flow_name": "text",
"navigate_screen": "text",
"otp_type": "ONE_TAP",
"package_name": "text",
"phone_number": "+2233223322",
"signature_hash": "text",
"text": "Visit us",
"type": "URL",
"url": "https://www.example.com"
}
],
"code_expiration_minutes": 1,
"example": {
"body_text": [
[
"text"
]
],
"header_handle": [
"text"
],
"header_text": [
"text"
]
},
"format": "TEXT",
"text": "Hello {{1}}, your order is ready.",
"type": "BODY"
}
],
"correct_category": "UTILITY",
"cta_url_link_tracking_opted_out": true,
"degrees_of_freedom_spec": {
"ANY_ADDITIONAL_PROPERTY": "anything"
},
"display_format": "ORDER_DETAILS",
"health_status": {
"can_send_message": "AVAILABLE"
},
"id": "123456789",
"is_primary_device_delivery_only": true,
"is_sms_fallback_enabled": true,
"language": "en_US",
"last_updated_time": 1,
"library_template_name": "welcome_template",
"message_send_ttl_seconds": 1,
"name": "order_update",
"optimization_spec": {
"bid_amount": 400,
"bid_strategy": "LOWEST_COST_WITH_BID_CAP"
},
"parameter_format": "POSITIONAL",
"previous_category": "MARKETING",
"quality_score": {
"date": 1,
"reason": "text",
"reasons": [
"text"
],
"score": "GREEN"
},
"rejected_reason": "NONE",
"source": "manual",
"status": "APPROVED",
"sub_category": "ORDER_STATUS"
}Update an existing message template. Only approved or rejected templates can be edited.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Message template ID to edit
Updated template fields
UTILITYORDER_DETAILSPOSITIONALORDER_STATUSTemplate updated successfully
trueBad request
Unauthorized
Internal server error
POST /message_templates/{template_id} HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 871
{
"allow_category_change": true,
"category": "UTILITY",
"components": [
{
"add_security_recommendation": true,
"buttons": [
{
"autofill_text": "text",
"flow_action": "navigate",
"flow_id": "text",
"flow_json": "text",
"flow_name": "text",
"navigate_screen": "text",
"otp_type": "ONE_TAP",
"package_name": "text",
"phone_number": "+2233223322",
"signature_hash": "text",
"text": "Visit us",
"type": "URL",
"url": "https://www.example.com"
}
],
"code_expiration_minutes": 1,
"example": {
"body_text": [
[
"text"
]
],
"header_handle": [
"text"
],
"header_text": [
"text"
]
},
"format": "TEXT",
"text": "Hello {{1}}, your order is ready.",
"type": "BODY"
}
],
"cta_url_link_tracking_opted_out": true,
"display_format": "ORDER_DETAILS",
"is_primary_device_delivery_only": true,
"message_send_ttl_seconds": 1,
"optimization_spec": {
"bid_amount": 400,
"bid_strategy": "LOWEST_COST_WITH_BID_CAP"
},
"parameter_format": "POSITIONAL",
"sub_category": "ORDER_STATUS"
}{
"success": true
}Compare two message templates by block rate, message send volume, and top block reason. Both templates must be in the same WhatsApp Business account and must have been sent at least 1,000 times in the specified timeframe. Lookback windows are limited to 7, 30, 60, and 90 days.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
ID of the target WhatsApp Message Template
JSON array with the ID of the template to compare against (e.g. [1533406637136032])
UNIX timestamp for the start of the comparison timeframe
UNIX timestamp for the end of the comparison timeframe
Comparison results including block rate, send volume, and top block reason
Response payload for Meta's Template Comparison API
Bad request
Unauthorized
Internal server error
GET /message_templates/{template_id}/compare?template_ids=text&start=1&end=1 HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
{
"data": [
{
"metric": "BLOCK_RATE",
"number_values": [
{
"key": "5289179717853347",
"value": 1273
}
],
"order_by_relative_metric": [
"text"
],
"string_values": [
{
"key": "5289179717853347",
"value": "UNKNOWN_BLOCK_REASON"
}
],
"type": "RELATIVE"
}
]
}Deprecated: use GET /message_templates instead.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Templates retrieved successfully
Unauthorized
Internal server error
GET /v1/configs/templates HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
{}Deprecated: use POST /message_templates instead
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Template created successfully
Bad request
Unauthorized
Internal server error
POST /v1/configs/templates HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 2
{}{}Deprecated: use DELETE /message_templates instead
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Template name
Template id on Meta. If specified, name is ignored. Example: 1423298775400
Template id on HUB. If specified, name and external_id are ignored. Example: exampleWT
Template deleted successfully
Bad request - empty template name
Unauthorized
Template not found
Internal server error
DELETE /v1/configs/templates/{template_name} HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
{}Deprecated: use POST /message_templates/{template_id} instead
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
WhatsApp Message Template ID
Template updated successfully
Bad request
Unauthorized
Template not found
Internal server error
POST /v1/configs/templates/{whats_app_message_template_id} HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 2
{}{}Deprecated: use GET /message_templates/:template_id/compare instead.
API Key for Messaging API authentication. Send your API key in the D360-API-KEY header.
Template ID
Template comparison completed successfully
Response payload containing template comparison results
UTILITY594425479261596en_USorder_confirmationAPPROVEDBad request
Unauthorized
Internal server error
GET /{template_id}/compare HTTP/1.1
Host: waba-v2.360dialog.io
D360-API-KEY: YOUR_API_KEY
Accept: */*
{
"category": "UTILITY",
"compare": {
"has_differences": true,
"summary": "text"
},
"id": "594425479261596",
"language": "en_US",
"name": "order_confirmation",
"status": "APPROVED"
}Last updated
Was this helpful?