Find all the Request samples for all the Netcore CPaaS APIs
Create Template
Refer to the document here for details on Create Template API.
Template Message With Button
Text Message With CTA
curl --location --request POST 'https://cpaaswa.netcorecloud.net/api/v2/message/nc' \
--header 'Authorization: <BEARER_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"message": [
{
"recipient_whatsapp": "919999339598",
"recipient_type": "individual",
"message_type": "media_template",
"source": "461089f9-1000-4211-b182-c7f0291f3d45",
"x-apiheader": "custom_data",
"type_template": [{
"name": "thankyou_button",
"language": {
"locale": "en",
"policy": "deterministic"
}
}]
}
]
}'
Text Template With Quick Reply
curl --location --request POST 'https://cpaaswa.netcorecloud.net/api/v2/message/nc' \
--header 'Authorization: <BEARER_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"message": [
{
"recipient_whatsapp": "919999339598",
"recipient_type": "individual",
"message_type": "media_template",
"source": "461089f9-1000-4211-b182-c7f0291f3d45",
"x-apiheader": "custom_data",
"type_template": [{
"name": "button_quick_reply",
"attributes" : ["August"],
"language": {
"locale": "en",
"policy": "deterministic"
}
}]
}
]
}'
Text Template with Dynamic CTA with Link Tracking
curl --location --request POST 'https://cpaaswa.netcorecloud.net/api/v2/message/nc' \
--header 'Authorization: <BEARER_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"message": [
{
"recipient_whatsapp": "919999339598",
"message_type": "media_template",
"recipient_type": "individual",
"source": "4a617382eddf22b33ec5fad4b8573706",
"cta_link_track": "1"
"type_media_template": {
"type": "text",
"button": [
{
"index": "1",
"payload": "https://netcorecloud.com/home"
}
]},
"type_template": [
{
"name": "button_dynamic_url",
"attributes": ["March"],
"language": {
"locale": "en",
"policy": "deterministic"
}
}
]
}
]
}'
Media Template with Dynamic CTA with Link Tracking
curl --location --request POST 'https://cpaaswa.netcorecloud.net/api/v2/message/nc' \
--header 'Authorization: <BEARER_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"message": [
{
"recipient_whatsapp": "919876543210",
"message_type": "media_template",
"recipient_type": "individual",
"source": "4a617382eddf22b33ec5fad4b8573706",
"cta_link_track": "1"
"type_media_template": {
"type": "image",
"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/4/41/Sunflower_from_Silesia2.jpg/800px-Sunflower_from_Silesia2.jpg",
"filename": "Sunflower image.jpg",
"button": [
{
"index": "0",
"payload": "Complete_url"
}
]
},
"type_template": [
{
"name": "sandbox_dynamic_url_button",
"language": {
"locale": "en",
"policy": "deterministic"
}
}
]
}
]
}'
Conversation Messages
Text Messages
curl --location --request POST 'https://cpaaswa.netcorecloud.net/api/v2/message/nc/message/' \
--header 'Authorization: <BEARER_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"message": [
{
"recipient_whatsapp": "919999339598",
"recipient_type": "individual",
"message_type": "text",
"source": "461089f9-1000-4211-b182-c7f0291f3d45",
"x-apiheader": "custom_data",
"type_text": [
{
"preview_url": "false",
"content": "Hi, from Salman"
}]
}
]
}'
Dynamic Quick Reply
curl --location --request POST 'https://cpaaswa.netcorecloud.net/api/v2/message/nc' \
--header 'Authorization: <BEARER_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"message": [{
"recipient_whatsapp": "919999339598",
"message_type": "interactive",
"recipient_type" : "individual",
"source": "e4aba266d56a3726c36a2053d70c989d",
"x-apiheader": "custom_data",
"type_interactive": [{
"type": "button",
"header": {
"type": "image",
"url": "https://res.cloudinary.com/demo/image/upload/v1312461204/sample.jpg"
},
"body": "body text here",
"action": [{
"buttons": [{
"type": "reply",
"reply": {
"id": "1",
"title": "hi"
}
}, {
"type": "reply",
"reply": {
"id": "2",
"title": "hello"
}
}]
}]
}]
}]
}'
List Menu
curl --location --request POST 'https://cpaaswa.netcorecloud.net/api/v2/message/nc' \
--header 'Authorization: <BEARER_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"message": [{
"recipient_whatsapp": "919999339598",
"message_type": "interactive",
"recipient_type" : "individual",
"source": "e4aba266d56a3726c36a2053d70c989d",
"x-apiheader": "custom_data",
"type_interactive": [{
"type": "list",
"header": {
"type": "text",
"text": "header text"
},
"body": "body text hereeeee",
"action": [{
"button": "Menu List",
"sections": [{
"title": "Menu Items",
"rows": [
{
"id": "text",
"title": "text",
"description": "text1"
},
{
"id": "text 2",
"title": "text 2",
"description": "text 2"
},
{
"id": "text 3",
"title": "text 3",
"description": "text 3"
}
]
}]
}]
}]
}]
}'
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"
}
}
'
Limited Time Offer(LTO)
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"
}
}'
List LTO Template Request
curl --request GET \
--url https://cpaaswa.netcorecloud.net/api/v3/metainfo/template/list \
--header 'Authorization: ' \
--header 'Content-Type: '
Preview LTO Template Request
curl --request GET \
--url https://cpaaswa.netcorecloud.net/api/v3/metainfo/template/preview \
--header 'Authorization: ' \
--header 'Content-Type: '
Opt In/Out
curl --location --request POST 'https://waapi.pepipost.com/api/v2/consent/manage' \
--header 'Authorization: <BEARER_TOKEN>' \
--header 'Content-Type: application/json' \
--data-raw '{
"type":"optout",
"recipients":[
{"recipient":"919876543210",
"source":"WEB",
"user_agent":"Mozilla",
"ip":"192.168.7.26"
}]
}'
