The Create Template API allows you to create various WhatsApp message templates that can be used for marketing, transactional updates, promotions, and personalized customer engagement. These templates are pre-approved by Meta and can be reused across multiple messaging campaigns.
With this API, businesses can define a message structure (including headers, body, footers, buttons, etc.) tailored to their specific communication needs. It supports multiple types like Text, Media, Carousel, Limited-Time Offer, Order Details, and Order Status templates.
Key Parameter to Identify Template Type:
Use the value of
template_typein the payload or presence of specific objects (e.g., type_order_status_template) to determine which type is being created.Refer to Create Template API document.
Template Use Cases
| Use Case | Recommended Template Type |
|---|---|
| Promotional campaigns, offers, announcements | Text, Media, LTO |
| Product showcases with interactive cards | Carousel |
| Order summaries and invoice details | Order Details |
| Real-time order updates like shipment, cancellation | Order Status |
| Clean URL CTAs without raw links in message body | Text with CTA |
| Quick replies or dynamic action buttons | Text / Media / Carousel with Buttons |
Supported Template Type
The Create Template API supports a variety of template types tailored to different messaging needs—from simple text messages to dynamic, media-rich, and structured commerce templates.
Below are the supported template types and how to identify them during template creation.
| Template Type | Identifier/Hint |
|---|---|
| Text Template | template_type: text (default) |
| Media Template | Contains media (image, video, doc) in components.header |
| Carousel Template | template_type: carousel |
| Limited-Time Offer (LTO) Template | template_type: limited_time_offer, includes limited_time_offer component |
| Order Details Template | type_order_detail_template used in message body |
| Order Status Template | type_order_status_template used in message body |
Important Notes
- Templates must be approved by Meta before they can be sent to users.
- Button types like COPY_CODE, VISIT_WEBSITE, CALL_PHONE_NUMBER, and so on, may have specific constraints based on Meta rules.
- template_save_mode can optionally be used to define save status (draft, system, etc.).
- Use example fields for dynamic placeholder previews to speed up approval.
- Ensure template names are unique across your account.
Request Samples
Create Template
curl --request POST \
--url https://cpaaswa.netcorecloud.net/api/v3/metainfo/template/create \
--header 'Authorization: ' \
--header 'Content-Type: application/json' \
--data '{
"category": "MARKETING",
"name": "sample_template",
"language": "en_US",
"allow_category_change": true,
"components": [
{
"type": "header",
"format": "image",
"example": {
"header_handle": [
"example_image_handle"
]
}
},
{
"type": "body",
"text": "Welcome to our service! Enjoy a discount of {{1}} using the code {{2}}.",
"example": {
"body_text": [
[
"20%",
"DISCOUNT20"
]
]
}
},
{
"type": "footer",
"text": "Thank you for being with us!"
},
{
"type": "buttons",
"buttons": [
{
"type": "URL",
"text": "Visit Us",
"url": "https://www.example.com"
},
{
"type": "PHONE_NUMBER",
"text": "Call Us",
"phone_number": "+1234567890"
}
]
}
]
}'
Text Message Template
curl --request POST \
--url https://cpaaswa.netcorecloud.net/api/v3/metainfo/template/create \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"meta_payload": {
"category": "MARKETING",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Welcome to Our Store"
},
{
"example": {
"body_text": [
[
"John",
"our products"
]
]
},
"type": "BODY",
"text": "Hi {{1}}, thank you for your interest in {{2}}!"
},
{
"type": "FOOTER",
"text": "Best regards, Team"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "QUICK_REPLY",
"text": "Learn More"
},
{
"type": "URL",
"text": "Visit Website",
"url": "https://www.example.com"
}
]
}
],
"name": "text_template_example",
"language": "en"
}
}
'
Media Template Request
curl --request POST \
--url https://cpaaswa.netcorecloud.net/api/v3/metainfo/template/create \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"meta_payload": {
"category": "MARKETING",
"components": [
{
"example": {
"header_handle": [
"4::YXBwbGljYXRpb24vcGRm:ARbUrtBD1gQxKrrtlmFMAnmTORdMD21Zl_idafCRz8SyA6g1z23_ONEbxWZEOv64uXD76u7HycOjSVn2leP24W-8PrDQykQW4T9u3VRfjbeqAw:e:1748431484:878254782770621:100057778901584:ARYGVx6iNVYUlKiW26s"
]
},
"type": "HEADER",
"format": "video"
},
{
"example": [
{
"body_text": [
"the end of August",
"25OFF",
"25%"
]
}
],
"type": "BODY",
"text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise."
},
{
"type": "FOOTER",
"text": "Use the buttons below to manage your marketing subscriptions"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "QUICK_REPLY",
"text": "Stop promotions"
},
{
"type": "QUICK_REPLY",
"text": "Enjoy"
},
{
"type": "PHONE_NUMBER",
"text": "Call",
"phone_number": "917009508776"
},
{
"type": "URL",
"text": "No tracking button",
"url": "https://www.examplesite.com/shop?promo={{1}}",
"example": [
"summer2023"
]
},
{
"type": "URL",
"text": "Tracking button",
"url": "https://www.examplesite.com/shop?promo={{1}}",
"example": [
"https://www.examplesite.com/shop?promo=123"
]
},
{
"type": "COPY_CODE",
"text": "Copy offer code",
"example": "SAVE30"
}
]
}
],
"name": "media_with_doc",
"language": "en"
}
}
'
Carousel Template Request
curl --request POST \
--url https://cpaaswa.netcorecloud.net/api/v3/metainfo/template/create \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"meta_payload": {
"category": "marketing",
"components": [
{
"example": {
"body_text": [
[
"Pablo"
]
]
},
"type": "body",
"text": "Rare succulents for sale! {{1}}, add these unique plants to your collection."
},
{
"type": "carousel",
"cards": [
{
"components": [
{
"type": "header",
"format": "image",
"example": {
"header_handle": [
"4::aW1hZ2U..."
]
}
},
{
"type": "buttons",
"buttons": [
{
"type": "quick_reply",
"text": "Send me more like this!"
},
{
"type": "url",
"text": "Shop",
"url": "https://www.luckyshrub.com/rare-succulents/{{1}}",
"example": [
"BLUE_ELF"
]
}
]
}
]
},
{
"components": [
{
"type": "header",
"format": "image",
"example": {
"header_handle": [
"4::aW1hZ2U..."
]
}
},
{
"type": "buttons",
"buttons": [
{
"type": "quick_reply",
"text": "Send me more like this!"
},
{
"type": "url",
"text": "Shop",
"url": "https://www.luckyshrub.com/rare-succulents/{{1}}",
"example": [
"BUDDHA"
]
}
]
}
]
}
]
}
],
"name": "carousel_template_example",
"language": "en_US"
}
}
'
Single Product Message Template
curl --request POST \
--url https://cpaaswa.netcorecloud.net/api/v3/metainfo/template/create \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"meta_payload": {
"name": "spm_template_example",
"language": "en_US",
"category": "marketing",
"components": [
{
"type": "header",
"format": "product"
},
{
"type": "body",
"text": "Use code {{1}} to get {{2}} off our newest succulent!",
"example": {
"body_text": [
[
"25OFF",
"25%"
]
]
}
},
{
"type": "footer",
"text": "Offer ends September 30, 2024"
},
{
"type": "buttons",
"buttons": [
{
"type": "spm",
"text": "View"
}
]
}
]
}
}
'
Product Card Carousel Template Request
curl --request POST \
--url https://cpaaswa.netcorecloud.net/api/v3/metainfo/template/create \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"meta_payload": {
"category": "marketing",
"components": [
{
"example": {
"body_text": "Pablo"
},
"type": "body",
"text": "Rare succulents for sale! {{1}}, add these unique plants to your collection."
},
{
"type": "carousel",
"cards": [
{
"components": [
{
"type": "header",
"format": "product"
},
{
"type": "buttons",
"buttons": [
{
"type": "spm",
"text": "View"
}
]
}
]
},
{
"components": [
{
"type": "header",
"format": "product"
},
{
"type": "buttons",
"buttons": [
{
"type": "spm",
"text": "View"
}
]
}
]
}
]
}
],
"name": "product_carousel_template_example",
"language": "en_US"
}
}
'
Order Details Template Request
curl --request POST \
--url https://cpaaswa.netcorecloud.net/api/v3/metainfo/template/create \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data @- <<EOF
{
"meta_payload": {
"category": "UTILITY",
"components": [
{
"type": "HEADER",
"format": "TEXT",
"text": "Order Confirmation"
},
{
"type": "BODY",
"text": "Your order has been confirmed. Thank you for shopping with us!"
},
{
"type": "FOOTER",
"text": "We'll notify you when it ships"
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "ORDER_DETAILS",
"text": "Copy Pix code"
}
]
}
],
"name": "order_details_template_example",
"language": "pt_BR",
"display_format": "ORDER_DETAILS"
}
}
EOF
Order Status Template Request
curl --request POST \
--url https://cpaaswa.netcorecloud.net/api/v3/metainfo/template/create \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"meta_payload": {
"category": "UTILITY",
"components": [
{
"type": "BODY",
"text": "Your order is on the way! Track your package for real-time updates."
},
{
"type": "FOOTER",
"text": "Estimated delivery: 2-3 business days"
}
],
"name": "order_status_template_example",
"language": "en_US",
"sub_category": "ORDER_STATUS"
}
}
'
Limited Time Offer Template Request
curl --request POST \
--url https://cpaaswa.netcorecloud.net/api/v3/metainfo/template/create \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"meta_payload": {
"category": "MARKETING",
"components": [
{
"example": {
"header_handle": [
"4::aW1hZ2UvcG5n:ARY_b7gZrOyH8TXqhJ_zTR9LTmH1IBUa82jVoS3Clkb61m7gwzMKrigTL_7UPQRy0x4mg1rmLSP1oJqPWiwiaFWj6yuuJ31YRxW-4XuGZyLZTQ:e:1754812588:878254782770621:100057778901584:ARbtoRYmEZDLiKLZ3_c"
]
},
"type": "HEADER",
"format": "image"
},
{
"type": "limited_time_offer",
"limited_time_offer": {
"text": "Expiring offer!",
"has_expiration": true
}
},
{
"example": {
"body_text": [
[
"the end of August",
"25OFF",
"25%"
]
]
},
"type": "BODY",
"text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise."
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "COPY_CODE",
"text": "Copy offer code",
"example": "SAVE30"
},
{
"type": "URL",
"text": "Tracking button",
"url": "https://www.examplesite.com/shop?promo={{1}}",
"example": [
"https://www.examplesite.com/shop?promo=123"
]
}
]
}
],
"name": "lto_template_image_qa_2_3",
"language": "en"
}
}
'
LTO with Image Header Template Request
curl --request POST \
--url https://cpaaswa.netcorecloud.net/api/v3/metainfo/template/create \
--header 'Accept: application/json' \
--header 'Authorization: ' \
--header 'Content-Type: application/json' \
--data '{
"meta_payload": {
"name": "lto_template_image_qa_2_3",
"language": "en",
"category": "MARKETING",
"components": [
{
"type": "HEADER",
"format": "image",
"example": {
"header_handle": [
"4::aW1hZ2UvcG5n:ARY_b7gZrOyH8TXqhJ_zTR9LTmH1IBUa82jVoS3Clkb61m7gwzMKrigTL_7UPQRy0x4mg1rmLSP1oJqPWiwiaFWj6yuuJ31YRxW-4XuGZyLZTQ:e:1754812588:878254782770621:100057778901584:ARbtoRYmEZDLiKLZ3_c"
]
}
},
{
"type": "limited_time_offer",
"limited_time_offer": {
"text": "Expiring offer!",
"has_expiration": true
}
},
{
"type": "BODY",
"text": "Shop now through {{1}} and use code {{2}} to get {{3}} off of all merchandise.",
"example": {
"body_text": [
[
"the end of August",
"25OFF",
"25%"
]
]
}
},
{
"type": "BUTTONS",
"buttons": [
{
"type": "COPY_CODE",
"text": "Copy offer code",
"example": "SAVE30"
},
{
"type": "URL",
"text": "Tracking button",
"url": "https://www.examplesite.com/shop?promo={{1}}",
"example": [
"https://www.examplesite.com/shop?promo=123"
]
}
]
}
]
},
"nc_payload": {
"source": "cee",
"stop_at_cc": true,
"thumbnail_url": "https://aws.s3.com/ceebucket/save_template.jpg",
"usecases": "promotional_offer",
"template_save_mode": "auto",
"template_type": "limited_time_offer",
"template_header": 2,
"header_example_value": "https://cpaas-media-us.s3.amazonaws.com/whatsapp-media/Screenshot.png",
"header_value": "https://aws.s3.com/ceebucket/dummy.jpg",
"button_value": [
{
"button": "CopyOfferCode"
},
{
"button": "VisitWebsite",
"url_type": "withTracking",
"domain_url": "https://qa.nctrckg.com"
}
],
"lto_expiration_detail": {
"exp_type": "datetime",
"exp_value": "2025:08:04 10:30:05"
}
},
"optional_payload": {}
}'
LTO with Video Header Template Request
curl --request POST \
--url https://cpaaswa.netcorecloud.net/api/v3/metainfo/template/create%20/ \
--header 'Accept: application/json' \
--header 'Authorization: ' \
--header 'Content-Type: application/json' \
--data '{
"nc_payload": {
"source": "sample_source",
"stop_at_cc": true,
"thumbnail_url": "https://example.com/path/to/thumbnail.jpg",
"usecases": "sample_use_case",
"template_save_mode": "sample_mode",
"template_type": "limited_time_offer",
"template_header": 2,
"header_example_value": "https://example.com/path/to/video-preview.jpg",
"header_value": "https://example.com/path/to/header-video.mp4",
"button_value": [
{
"button": "CopyOfferCode"
},
{
"button": "VisitWebsite",
"url_type": "sample_url_type",
"domain_url": "https://example.com/path/to/landing-page?param={{1}}"
}
],
"lto_expiration_detail": {
"exp_type": "duration",
"exp_value": "1D:00H:00M"
}
},
"optional_payload": {
"sample_key_1": "sample_value_1",
"sample_key_2": "sample_value_2"
}
}'
