https://graph.facebook.com/v21.0
/{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 |
---|---|
id numeric string | ID |
category enum | The category type of the message template |
components | An array of JSON objects describing the message template components. |
correct_category enum | The correct category for the template. |
cta_url_link_tracking_opted_out bool | Optional boolean field for opting out/in of link tracking at template level |
language string | The language (and locale) of the element translation |
library_template_name string | Template Library name that this HSM is clone from |
message_send_ttl_seconds integer |
Template message delivery retry time-to-live (TTL) override value. If unable to deliver the template message to the WhatsApp user, we will periodically retry for this period of time. If we are unable to deliver the message for this period of time, the message will be dropped.
|
name string | The message template name |
previous_category enum | Previous category of the template. See Template Categories. |
quality_score | Quality score of the HSM |
rejected_reason enum | The reason the message template was rejected enum {ABUSIVE_CONTENT, INVALID_FORMAT, NONE, PROMOTIONAL, TAG_CONTENT_MISMATCH, SCAM} |
status enum | The status of the message template enum {APPROVED, IN_APPEAL, PENDING, REJECTED, PENDING_DELETION, DELETED, DISABLED, PAUSED, LIMIT_EXCEEDED} |
sub_category enum | 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 |
104 | Incorrect signature |
message_templates
edge from the following paths: Parameter | Description |
---|---|
allow_category_change boolean | Set to
|
category enum {UTILITY, MARKETING, AUTHENTICATION} | Template category. See Template Categories. Required |
components array<JSON object> | Array of components that make up the template. See Template Components.
|
language string | Template location and locale code. Required |
library_template_body_inputs JSON object | Optional data during creation of a template from a library template. These are optional fields for the body component. |
library_template_button_inputs array<JSON object> | Optional data during creation of a template from a library template. These are optional fields for the button component. |
library_template_name string | library_template_name |
message_send_ttl_seconds int64 | Time to live for message template sent. If users are offline for more than TTL duration after message template is sent, message will be dropped from message queue and will not be delivered. Only allowed for authentication message templates. |
name string | Template name. Required |
sub_category enum {ORDER_DETAILS, ORDER_STATUS} | Sub category of the template |
id
: numeric string, status
: enum, category
: enum, Error | Description |
---|---|
100 | Invalid parameter |
131009 | Parameter value is not valid |
192 | Invalid phone number |
368 | The action attempted has been deemed abusive or is otherwise disallowed |
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. |
200 | Permissions error |
139000 | Blocked by Integrity |
190 | Invalid OAuth 2.0 Access Token |
/{whats_app_message_template_id}
.Parameter | Description |
---|---|
category enum {UTILITY, MARKETING, AUTHENTICATION} | category |
components array<JSON object> | The array containing all the content of the message template |
message_send_ttl_seconds int64 |
Template message delivery retry time-to-live (TTL) override value. If unable to deliver the template message to the WhatsApp user, we will periodically retry for this period of time. If we are unable to deliver the message for this period of time, the message will be dropped.
|
success
: bool, Error | Description |
---|---|
100 | Invalid parameter |
192 | Invalid phone number |
131009 | Parameter value is not valid |
/{whats_app_business_account_id}/message_templates
.Parameter | Description |
---|---|
hsm_id numeric string | ID of template to be deleted. Required if deleting a template by ID. |
name string | Name of template to be deleted. Required |
success
: bool, Error | Description |
---|---|
100 | Invalid parameter |
200 | Permissions error |