Represents a specific message template. Make the API call to the message template ID.
To find a message template ID, call https://graph.facebook.com/{api-version}/{whatsapp-business-account-ID}/message_templates.
For more information on how to use the API, see WhatsApp Business Management API.
Retrieves information about the message template
Requirements
whatsapp_business_management permission
whatsapp_business_messaging permission
public_profile permission
WHATSAPP MESSAGE TEMPLATE ID
USER ACCESS TOKEN
Request
curl -i -X GET \
"https://graph.facebook.com/LATEST-VERSION/WHATS-APP-MESSAGE-TEMPLATE-ID?access_token=USER-ACCESS-TOKEN"Response
{
"name": "shiptest",
"components": [
{
"type": "BODY",
"text": "testing"
}
],
"language": "en_US",
"status": "REJECTED",
"category": "TRANSACTIONAL",
"id": "WHATS-APP-MESSAGE-TEMPLATE-ID"
}| Field | Description |
|---|---|
idnumeric string | ID |
bid_specWhatsAppBusinessHSMWhatsAppBusinessBidSpec | bid_spec |
categoryenum | The category type of the message template |
components | An array of JSON objects describing the message template components. |
correct_categoryenum | The correct category for the template. |
cta_url_link_tracking_opted_outbool | Optional boolean field for opting out/in of link tracking at template level |
degrees_of_freedom_spec | degrees_of_freedom_spec |
languagestring | The language (and locale) of the element translation |
library_template_namestring | Template Library name that this HSM is clone from |
message_send_ttl_secondsinteger |
Template message delivery retry time-to-live (TTL) override value. If we are unable to deliver a message to a WhatsApp user, we will retry the delivery for a period of time known as a time-to-live, TTL, or the message validity period.
|
namestring | The message template name |
optimization_specWhatsAppBusinessHSMTMMApiOptimizationSpecForGraphAPI | optimization_spec |
parameter_formatenum | The parameter format, can be Named or Positional |
previous_categoryenum | Previous category of the template. See Template Categories. |
product_set_idnumeric string | product_set_id is required for Dynamic Product Messages. Coming Soon! |
quality_score | Quality score of the HSM |
rejected_reasonenum | The reason the message template was rejected enum {ABUSIVE_CONTENT, INVALID_FORMAT, NONE, PROMOTIONAL, TAG_CONTENT_MISMATCH, SCAM} |
statusenum | The status of the message template. Values can be:
|
sub_categoryenum | Sub category of the template |
| Edge | Description |
|---|---|
Edge<WhatsAppBusinessHSMComparison> | compare |
| Error | Description |
|---|---|
| 80008 | There have been too many calls to this WhatsApp Business account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting. |
| 100 | Invalid parameter |
| 200 | Permissions error |
| 104 | Incorrect signature |
message_templates edge from the following paths: | Parameter | Description |
|---|---|
allow_category_changeboolean | Set to
|
categoryenum {UTILITY, MARKETING, AUTHENTICATION} | Template category. See Template Categories. Required |
componentsarray<JSON object> | Array of components that make up the template. See Template Components.
|
creative_sourcing_specJSON object | Defines the ACO dimensions specification the Biz can opt in or out of. |
is_primary_device_delivery_onlyboolean | is_primary_device_delivery only |
languagestring | Template location and locale code. Required |
library_template_body_inputsJSON object | Optional data during creation of a template from a library template. These are optional fields for the body component. |
library_template_button_inputsarray<JSON object> | Optional data during creation of a template from a library template. These are optional fields for the button component. |
library_template_namestring | library_template_name |
message_send_ttl_secondsint64 | Time to live for message template sent. If users are offline for more than TTL duration after message template is sent, we will retry the delivery for a period of time known as a time-to-live, TTL, or the message validity period. TTL can be configured for certain message types. See Time-To-Live. |
namestring | Template name. Required |
optimization_specJSON object | optimization_spec |
parameter_formatenum {NAMED, POSITIONAL} | The parameter format of the template |
product_set_idnumeric string | [Coming soon] This will let you connect a product set (from your catalog) to the template and send messages without needing to specify products in the send API call. Our product recommendation engine will select the products your customers are most interested in and likely to convert. This feature is called Dynamic Product Message. Note: This is still in development. |
sub_categoryenum {ORDER_DETAILS, ORDER_STATUS, RICH_ORDER_STATUS} | Sub category of the template |
id: numeric string, status: enum, category: enum, | Error | Description |
|---|---|
| 100 | Invalid parameter |
| 80008 | There have been too many calls to this WhatsApp Business account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting. |
| 131009 | Parameter value is not valid |
| 192 | Invalid phone number |
| 200 | Permissions error |
| 368 | The action attempted has been deemed abusive or is otherwise disallowed |
| 200002 | HSM Template creation failed |
| 139000 | Blocked by Integrity |
/{whats_app_message_template_id}.| Parameter | Description |
|---|---|
categoryenum {UTILITY, MARKETING, AUTHENTICATION} | category |
componentsarray<JSON object> | The array containing all the content of the message template |
creative_sourcing_specJSON object | creative_sourcing_spec |
message_send_ttl_secondsint64 |
Template message delivery retry time-to-live (TTL) override value.If we are unable to deliver a message to a WhatsApp user, we will retry the delivery for a period of time known as a time-to-live, TTL, or the message validity period. If we are unable to deliver the message for this period of time, the message will be dropped.
|
parameter_formatenum {NAMED, POSITIONAL} | The parameter format of the template |
product_set_idnumeric string | [Coming soon] This will let you connect a product set (from your catalog) to the template and send messages without needing to specify products in the send API call. Our product recommendation engine will select the products your customers are most interested in and likely to convert. This feature is called Dynamic Product Message. Note: This is still in development. |
success: bool, id: string, name: string, category: string, | Error | Description |
|---|---|
| 100 | Invalid parameter |
| 131009 | Parameter value is not valid |
| 192 | Invalid phone number |
| 200 | Permissions error |
| 80008 | There have been too many calls to this WhatsApp Business account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting. |
/{whats_app_business_account_id}/message_templates.| Parameter | Description |
|---|---|
hsm_idnumeric string | ID of template to be deleted. Required with name if deleting a specific template by ID. |
hsm_idsarray<numeric string> | IDs of all the templates for bulk deletion. Required if you wish to delete templates in bulk |
namestring | Name of template to be deleted. Deletes templates matching the name in all languages |
success: bool, | Error | Description |
|---|---|
| 100 | Invalid parameter |
| 200 | Permissions error |
| 190 | Invalid OAuth 2.0 Access Token |
| 80008 | There have been too many calls to this WhatsApp Business account. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting. |