



library_template_name in the GET <WABAID>/message_templates?name=<TEMPLATE_NAME> response, it is a template created from the Template Library and is subject to type checks and restrictions.

Jim or the business name CS Mutual can be modified to accept variables like your customer’s name and your business’s name.| Parameter Type | Description | Sample Value |
|---|---|---|
ADDRESS | A location address.
|
|
TEXT | Basic text. |
|
AMOUNT | A number signifying a quantity.
|
|
DATE | A standard calendar date. |
|
PHONE NUMBER | A telephone number.
|
|
EMAIL | A standard email address.
|
|
NUMBER | A number.
|
|

GET /message_template_library endpoint, the type key in the buttons array will show as "FORMS".{ "name": "delivery_failed_2_form", "language": "en_US", "category": "UTILITY", "topic": "ORDER_MANAGEMENT", "usecase": "DELIVERY_FAILED", "industry": [ "E_COMMERCE" ], "body": "We were unable to deliver order {{1}} today. Please {{2}} to schedule another delivery attempt.", "body_params": [ "#12345", "try a redelivery" ], "body_param_types": [ "TEXT", "TEXT" ], "buttons": [ { "type": "FLOW", "text": "Reschedule" } ], "id": "7138055039625658" },
// Used to browse available library templates
GET /message_template_library
// Used when you are ready to create a template from the library.
POST /<WHATSAPP_BUSINESS_ACCOUNT_ID>/message_templates
Header parameter types of Document only support PDFsmessage_template_library endpoint.POST method.// Get all available templates
GET /message_template_library
// Search for substring
GET /message_template_library?search=<SEARCH_KEY>
// Filter by template topic
GET/message_template_library?topic=<TOPIC>
// Filter by template use case
GET/message_template_library?usecase=<USECASE>
// Filter by template industry
GET/message_template_library?industry=<INDUSTRY>
// Filter by template language
GET/message_template_library?language=<LANGUAGE>
// Search by template name
GET /message_template_library?name=<NAME>
| Placeholder | Description | Sample Value |
|---|---|---|
<SEARCH_KEY>String | Optional. A substring you are searching for in the content, name, header, body, or footer of the template. | payments |
<TOPIC>Enum | Optional. The topic of the template. See Template Filters below | ORDER_MANAGEMENT |
<USECASE>Enum | Optional. The use case of the template. See Template Filters below | SHIPMENT_CONFIRMATION |
<INDUSTRY>Enum | Optional. The industry of the template. See Template Filters below | E_COMMERCE |
<LANGUAGE>Enum | Optional. | en_US |
<NAME>String | Optional. The name of the template you are searching for in the template library. | verify_otp_usecase |
curl 'https://graph.facebook.com/v25.0/102290129340398/message_templates?search="payments"'
-H 'Authorization: Bearer EAAJB...'
{ "name": "low_balance_warning_1", "language": "en_US", "category": "UTILITY", "topic": "PAYMENTS", "usecase": "LOW_BALANCE_WARNING", "industry": [ "FINANCIAL_SERVICES" ], "header": "Your account balance is low", "body": "Hi {{1}}, This is to notify you that your {{2}} in your {{3}} account, ending in {{4}} is below your pre-set {{5}} of {{6}}. Click the button to deposit more {{7}}. {{8}}", "body_params": [ "Jim", "available funds", "CS Mutual checking plus", "1234", "limit", "$75.00", "funds", "CS Mutual" ], "buttons": [ { "type": "URL", "text": "Make a deposit", "url": "https://www.example.com/" }, { "type": "PHONE_NUMBER", "text": "Call us", "phone_number": "+18005551234" } ], "id": "7147013345418927" }
E_COMMERCEFINANCIAL_SERVICESACCOUNT_UPDATECUSTOMER_FEEDBACKORDER_MANAGEMENTPAYMENTSACCOUNT_CREATION_CONFIRMATIONAUTO_PAY_REMINDERDELIVERY_CONFIRMATIONDELIVERY_FAILEDDELIVERY_UPDATEFEEDBACK_SURVEYFRAUD_ALERTLOW_BALANCE_WARNINGORDER_ACTION_NEEDEDORDER_CONFIRMATIONORDER_DELAYORDER_OR_TRANSACTION_CANCELORDER_PICK_UPPAYMENT_ACTION_REQUIREDPAYMENT_CONFIRMATIONPAYMENT_DUE_REMINDERPAYMENT_OVERDUEPAYMENT_REJECT_FAILPAYMENT_SCHEDULEDRECEIPT_ATTACHMENTRETURN_CONFIRMATIONSHIPMENT_CONFIRMATIONSTATEMENT_ATTACHMENTSTATEMENT_AVAILABLETRANSACTION_ALERT<WHATSAPP_BUSINESS_ACCOUNT_ID>/message_templates endpoint using the body properties below.POST /<WHATSAPP_BUSINESS_ACCOUNT_ID>/message_templates
{ "name": "<NAME>", "category": "UTILITY", "language": "en_US", "library_template_name": "<LIBRARY_TEMPLATE_NAME>", "library_template_button_inputs": "[ {'type': 'URL', 'url': {'base_url' : 'https://www.example.com/{{1}}', 'url_suffix_example' : 'https://www.example.com/demo'}}, {type: 'PHONE_NUMBER', 'phone_number': '+16315551010'} ]" }
| Placeholder | Description | Sample Value |
|---|---|---|
<NAME>String | Required. The name you are providing for your template. Maximum 512 characters. | my_payment_template |
<CATEGORY>Enum | Required. The template category. Must be UTILITY for use with Template Library. | UTILITY |
<LANGUAGE>Enum | Required. | en_US |
<LIBRARY_TEMPLATE_NAME>String | Required. The exact name of the Template Library template. | delivery_update_1 |
<LIBRARY_TEMPLATE_BUTTON_INPUTS>Array of objects | Optional. The website and/or phone number of the business being used in the template. Note: For utility templates that have button inputs, this property is not optional. | “[
{'type': 'URL', 'url': {'base_url' : 'https://www.example.com/{{1}}',
'url_suffix_example' : 'https://www.example.com/demo'}},
{type: 'PHONE_NUMBER', 'phone_number': '+16315551010'}
]"
|
| Placeholder | Description | Sample Value |
|---|---|---|
typeenum | The button type QUICK_REPLY, URL, PHONE_NUMBER, OTP, MPM, CATALOG, FLOW, VOICE_CALL, APPRequired | OTP |
phone_numberString | Phone number for the button. Optional | "+13057652345" |
urlJSON Object | ||
zero_tap_terms_acceptedboolean | Wether the zero tap terms were accepted by the user or not. Optional | TRUE |
otp_typeenum | The OTP type. COPY_CODE, ONE_TAP, ZERO_TAPOptional | TRUE |
supported_appsArray of JSON Object |
| Placeholder | Description | Sample Value |
|---|---|---|
<LIBRARY_TEMPLATE_BODY_INPUTS>JSON Object | Optional. Optional data during creation of a template from Template Library. These are optional fields for the button component. Learn how to create templates using Template Library | |
add_contact_numberboolean | Boolean value to add information to the template about contacting business on their phone number. Optional | TRUE |
add_learn_more_linkboolean | Boolean value to add information to the template about learning more information with a url link. Not widely available and will be ignored if not available. Optional | TRUE |
add_security_recommendationboolean | Boolean value to add information to the template about not sharing authentication codes with anyone. Optional | TRUE |
add_track_package_linkboolean | Boolean value to add information to the template to track delivery packages. Not widely available and will be ignored if not available. Optional | TRUE |
code_expiration_minutesint64 | Integer value to add information to the template on when the code will expire. Optional | 5 |
curl 'https://graph.facebook.com/v19.0/102290129340398/message_templates' -H 'Authorization: Bearer EAAJB...' -H 'Content-Type: application/json' -d ' { "name": "my_delivery_update", "language": "en_US", "category": "UTILITY", “library_template_name”: “delivery_update_1”, "library_template_button_inputs": "[ {'type': 'URL', 'url': {'base_url' : 'https://www.example.com/{{1}}', 'url_suffix_example' : 'https://www.example.com/order_update}} ]" }
{ "id": "{hsm-id}", "status": "APPROVED", "category": "UTILITY" }