Appearance
Fresh 2026
WhatsApp Message Template
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.
Reading
Retrieves information about the message template
Example
Requirements
whatsapp_business_management permission
whatsapp_business_messaging permission
public_profile permission
WHATSAPP MESSAGE TEMPLATE ID
USER ACCESS TOKEN
Request
cURLAndroid SDKObjective-C
sh
curl -i -X GET \
"https://graph.facebook.com/LATEST-VERSION/WHATS-APP-MESSAGE-TEMPLATE-ID?access_token=USER-ACCESS-TOKEN"java
GraphRequest request = GraphRequest.newGraphPathRequest(
accessToken,
"/WHATS-APP-MESSAGE-TEMPLATE-ID",
new GraphRequest.Callback() {
@Override
public void onCompleted(GraphResponse response) {
// Insert your code here
}
});
request.executeAsync();m
FBSDKGraphRequest *request = [[FBSDKGraphRequest alloc]\
initWithGraphPath:@"/WHATS-APP-MESSAGE-TEMPLATE-ID"\
parameters:nil\
HTTPMethod:@"GET"];
[request startWithCompletionHandler:^(FBSDKGraphRequestConnection *connection, id result, NSError *error) {\
// Insert your code here\
}];Response
json
{
"name": "shiptest",
"components": [\
{\
"type": "BODY",\
"text": "testing"\
}\
],
"language": "en_US",
"status": "REJECTED",
"category": "TRANSACTIONAL",
"id": "WHATS-APP-MESSAGE-TEMPLATE-ID"
}Parameters
This endpoint doesn't have any parameters.
Fields
| Field | Description |
|---|---|
id<br>numeric string | ID |
bid_spec<br>WhatsAppBusinessHSMWhatsAppBusinessBidSpec | bid_spec |
category<br>enum | The category type of the message template<br>Default |
components<br>list<WhatsAppBusinessHSMWhatsAppHSMComponentGet> | An array of JSON objects describing the message template components.<br>Default |
correct_category<br>enum | The correct category for the template.<br>Default |
cta_url_link_tracking_opted_out<br>bool | Optional boolean field for opting out/in of link tracking at template level |
degrees_of_freedom_spec<br>WhatsAppBusinessHSMMarketingMessageDegreesOfFreedomSpec | degrees_of_freedom_spec |
language<br>string | The language (and locale) of the element translation<br>Default |
library_template_name<br>string | Template Library name that this HSM is clone from<br>Default |
message_send_ttl_seconds<br>integer | 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.<br>TTL can be configured for certain message types. See Time-To-Live.<br>Default |
name<br>string | The message template name<br>Default |
parameter_format<br>enum | The parameter format, can be Named or Positional<br>Default |
previous_category<br>enum | Previous category of the template. See Template Categories.<br>Default |
product_set_id<br>numeric string | product_set_id is required for Dynamic Product Messages. Coming Soon!<br>Default |
quality_score<br>WhatsAppBusinessHSMWhatsAppBusinessHSMQualityScoreShape | Quality score of the HSM |
rejected_reason<br>enum | The reason the message template was rejected<br>enum {ABUSIVE_CONTENT, INVALID_FORMAT, NONE, PROMOTIONAL, TAG_CONTENT_MISMATCH, SCAM} |
status<br>enum | The status of the message template. Values can be:<br>APPROVED, Indicates the template has been reviewed, approved, and can now be sent in template messages.<br>IN_APPEAL, Indicates the template is in the rejection appeal process and cannot be sent.<br>PENDING, Indicates the template is still undergoing template review and cannot be sent.<br>REJECTED, Indicates the template has been reviewed and rejected and cannot be sent.<br>PENDING_DELETION, Indicates the template is undergoing deletion and cannot be sent.<br>DELETED, Indicates the template has been deleted and cannot be sent.<br>DISABLED, Indicates the template has been disabled due to poor template quality and cannot be sent.<br>PAUSED, Indicates the template has been paused due to poor template quality and cannot be sent.<br>LIMIT_EXCEEDED, Indicates the template has been paused due to template pacing.<br>Default |
sub_category<br>enum | Sub category of the template<br>Default |
Edges
| Edge | Description |
|---|---|
compare<br>Edge<WhatsAppBusinessHSMComparison> | compare |
Error Codes
| 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 |
Creating
You can make a POST request to message_templates edge from the following paths:
/{whats_app_business_account_id}/message_templates
When posting to this edge, a WhatsAppMessageTemplate will be created.
Parameters
| Parameter | Description |
|---|---|
allow_category_change<br>boolean | Set to true to allow us to assign a category based on our template guidelines and the template's contents. This can prevent the template status from immediately being set to REJECTED upon creation due to miscategorization.<br>If omitted, template will not be auto-assigned a category and its status may be set to REJECTED if determined to be miscategorized.<br>See Template Categories. |
category<br>enum {UTILITY, MARKETING, AUTHENTICATION} | Template category. See Template Categories.<br>Required |
components<br>array<JSON object> | Array of components that make up the template. See Template Components.<br>For types HEADER, BODY, FOOTER, text is required. |
type<br>enum {GREETING, HEADER, BODY, FOOTER, BUTTONS, CAROUSEL, ALBUM, LIMITED_TIME_OFFER, CALL_PERMISSION_REQUEST, TAP_TARGET_CONFIGURATION, ATTACHMENT} | Component type.<br>Required |
format<br>enum {TEXT, IMAGE, DOCUMENT, VIDEO, LOCATION, GIF, COLLECTION} | Component format. |
text<br>string | Required for components with type HEADER,BODY<br>Component text. |
buttons<br>array<JSON object> | Button components to be used in the template. |
type<br>enum {QUICK_REPLY, URL, PHONE_NUMBER, OTP, MPM, CATALOG, FLOW, VOICE_CALL, VIDEO_CALL, POSTBACK, BOOKING_STATUS, PAYMENT_REQUEST, REQUEST_CONTACT_INFO} | Button type.<br>Required |
text<br>string | Button text. |
url<br>URI | url |
phone_number<br>phone number string | phone_number |
example<br>array<string> | example |
flow_id<br>int64 | flow_id |
zero_tap_terms_accepted<br>boolean | zero_tap_terms_accepted |
flow_action<br>enum {NAVIGATE, DATA_EXCHANGE} | flow_action |
navigate_screen<br>string | navigate_screen |
supported_apps<br>array<JSON object> | supported_apps |
package_name<br>string | package_name<br>Required |
signature_hash<br>string | signature_hash<br>Required |
ttl_minutes<br>int64 | ttl_minutes |
flow_name<br>string | flow_name |
flow_json<br>string | flow_json |
icon<br>enum {DOCUMENT, PROMOTION, REVIEW} | icon |
endpoint_uri<br>URI | endpoint_uri |
example<br>JSON object | Placeholder examples. Templates will not be approved without examples. |
header_text<br>array<string> | header_text |
body_text<br>array<array<string>> | body_text |
header_handle<br>array<string> | header_handle |
header_text_named_params<br>array<JSON object> | header_text_named_params |
param_name<br>string | param_name<br>Required |
example<br>string | example<br>Required |
body_text_named_params<br>array<JSON object> | body_text_named_params |
param_name<br>string | param_name<br>Required |
example<br>string | example<br>Required |
creative_sourcing_spec<br>JSON object | Defines the ACO dimensions specification the Biz can opt in or out of. |
associated_product_set_id<br>numeric string | The associated product set id |
is_primary_device_delivery_only<br>boolean | is_primary_device_delivery only |
language<br>string | Template location and locale code.<br>Required |
library_template_body_inputs<br>JSON object | Optional data during creation of a template from a library template. These are optional fields for the body component. |
add_contact_number<br>boolean | add_contact_number |
add_learn_more_link<br>boolean | add_learn_more_link |
add_security_recommendation<br>boolean | add_security_recommendation |
add_track_package_link<br>boolean | add_track_package_link |
code_expiration_minutes<br>int64 | code_expiration_minutes |
library_template_button_inputs<br>array<JSON object> | Optional data during creation of a template from a library template. These are optional fields for the button component. |
type<br>enum {QUICK_REPLY, URL, PHONE_NUMBER, OTP, MPM, CATALOG, FLOW, VOICE_CALL, VIDEO_CALL, POSTBACK, BOOKING_STATUS, PAYMENT_REQUEST, REQUEST_CONTACT_INFO} | type<br>Required |
phone_number<br>string | phone_number |
url<br>JSON object | url |
base_url<br>string | base_url<br>Required |
url_suffix_example<br>string | url_suffix_example |
otp_type<br>enum {COPY_CODE, ONE_TAP, ZERO_TAP, NO_BUTTONS} | otp_type |
zero_tap_terms_accepted<br>boolean | zero_tap_terms_accepted |
supported_apps<br>array<JSON object> | supported_apps |
package_name<br>string | package_name<br>Required |
signature_hash<br>string | signature_hash<br>Required |
booking_url<br>JSON object | booking_url |
base_url<br>string | base_url<br>Required |
url_suffix_example<br>string | url_suffix_example |
booking_management_url<br>JSON object | booking_management_url |
base_url<br>string | base_url<br>Required |
url_suffix_example<br>string | url_suffix_example |
notes<br>JSON object | notes |
text<br>string | text<br>Required |
positional_params<br>array<string> | positional_params |
named_params<br>array<JSON object> | named_params |
param_name<br>string | param_name<br>Required |
example<br>string | example<br>Required |
library_template_name<br>string | library_template_name |
message_send_ttl_seconds<br>int64 | 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.<br>TTL can be configured for certain message types. See Time-To-Live. |
name<br>string | Template name.<br>Required |
optimization_spec<br>JSON object | optimization_spec |
parameter_format<br>enum {NAMED, POSITIONAL} | The parameter format of the template |
product_set_id<br>numeric 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.<br>Note: This is still in development. |
sub_category<br>enum {ORDER_DETAILS, ORDER_STATUS, RICH_ORDER_STATUS} | Sub category of the template |
Return Type
This endpoint supports read-after-write and will read the node to which you POSTed.
Struct {
id: numeric string,
status: enum,
category: enum,
}
Error Codes
| 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 |
Updating
You can update a WhatsAppMessageTemplate by making a POST request to /{whats_app_message_template_id}.
Parameters
| Parameter | Description |
|---|---|
category<br>enum {UTILITY, MARKETING, AUTHENTICATION} | category |
components<br>array<JSON object> | The array containing all the content of the message template |
type<br>enum {GREETING, HEADER, BODY, FOOTER, BUTTONS, CAROUSEL, ALBUM, LIMITED_TIME_OFFER, CALL_PERMISSION_REQUEST, TAP_TARGET_CONFIGURATION, ATTACHMENT} | Component type.<br>Required |
format<br>enum {TEXT, IMAGE, DOCUMENT, VIDEO, LOCATION, GIF, COLLECTION} | Component format. |
text<br>string | Required for components with type HEADER,BODY<br>Component text. |
buttons<br>array<JSON object> | Button components to be used in the template. |
type<br>enum {QUICK_REPLY, URL, PHONE_NUMBER, OTP, MPM, CATALOG, FLOW, VOICE_CALL, VIDEO_CALL, POSTBACK, BOOKING_STATUS, PAYMENT_REQUEST, REQUEST_CONTACT_INFO} | Button type.<br>Required |
text<br>string | Button text. |
url<br>URI | url |
phone_number<br>phone number string | phone_number |
flow_id<br>int64 | flow_id |
zero_tap_terms_accepted<br>boolean | zero_tap_terms_accepted |
flow_action<br>enum {NAVIGATE, DATA_EXCHANGE} | flow_action |
navigate_screen<br>string | navigate_screen |
supported_apps<br>array<JSON object> | supported_apps |
package_name<br>string | package_name<br>Required |
signature_hash<br>string | signature_hash<br>Required |
flow_name<br>string | flow_name |
flow_json<br>string | flow_json |
icon<br>enum {DOCUMENT, PROMOTION, REVIEW} | icon |
creative_sourcing_spec<br>JSON object | creative_sourcing_spec |
associated_product_set_id<br>numeric string | The associated product set id |
message_send_ttl_seconds<br>int64 | 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.<br>TTL can be configured for certain message types. See Time-To-Live. |
parameter_format<br>enum {NAMED, POSITIONAL} | The parameter format of the template |
product_set_id<br>numeric 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.<br>Note: This is still in development. |
Return Type
This endpoint supports read-after-write and will read the node to which you POSTed.
Struct {
success: bool,
id: string,
name: string,
category: string,
}
Error Codes
| 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. |
Deleting
You can dissociate a WhatsAppMessageTemplate from a WhatsAppBusinessAccount by making a DELETE request to /{whats_app_business_account_id}/message_templates.
Parameters
| Parameter | Description |
|---|---|
hsm_id<br>numeric string | ID of template to be deleted. Required with name if deleting a specific template by ID. |
hsm_ids<br>array<numeric string> | IDs of all the templates for bulk deletion. Required if you wish to delete templates in bulk |
name<br>string | Name of template to be deleted. Deletes templates matching the name in all languages |
Return Type
Struct {
success: bool,
}
Error Codes
| 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. |