https://graph.facebook.com/v18.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. |
language string | The language (and locale) of the element translation |
message_send_ttl_seconds integer | 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 | 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 |
---|---|
compare |
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. |
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.
Required |
language string | Template location and locale code. Required |
name string | Template name. Required |
sub_category enum {CUSTOM, ORDER_DETAILS, 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. |
192 | Invalid phone number |
200 | Permissions error |
200002 | HSM Template creation failed |
/{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 | 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. |
success
: bool, Error | Description |
---|---|
100 | Invalid parameter |
80012 | There have been too many calls to this message template. Wait a bit and try again. For more info, please refer to https://developers.facebook.com/docs/graph-api/overview/rate-limiting. |
192 | Invalid phone number |
/{whats_app_business_account_id}/message_templates
.Parameter | Description |
---|---|
hsm_id whatsapp business hsm ID | 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 |