curl --location -g --request POST '/{{vendorUid}}/contact/send-carousel-template-message' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
// optional from phone number id is not given it will use default phone number id
"from_phone_number_id": "{{fromPhoneNumberId}}",
"phone_number": "{{phoneNumber}}",
"template_name" : "carsoule_template_131",
"template_language" : "ar_sa",
// If the carousel body contains a variable, include it. If not, omit it from the payload.
"field_1" : "{Age}",
"field_2" : "{full_name}",
"field_3" : "{last_name}",
// Atleast minimum 2 cards are required, maximum 10.
// The sequence of cards and buttons will remain the same as defined in the created template
"carousel_templates": [
{
"media_type": "IMAGE",
"media_url": "https://cdn.pixabay.com/photo/2015/01/07/15/51/woman-591576_1280.jpg",
// If the card body contains a variable, include it. If not, omit it from the payload.
// At least 1 button required, maximum 2; button types can be mixed
// "body_example_fields": [
// "first name",
// "last name"
// ],
"button_type": [
"QUICK_REPLY",
"PHONE_NUMBER",
"URL"
]
},
{
"media_type": "IMAGE",
"media_url": "https://cdn.pixabay.com/photo/2015/01/07/15/51/woman-591576_1280.jpg",
// If the card body contains a variable, include it. If not, omit it from the payload.
// At least 1 button required, maximum 2; button types can be mixed
// "body_example_fields": [
// "Address 1",
// "Address 2"
// ],
"button_type": [
"QUICK_REPLY",
"PHONE_NUMBER",
"URL"
]
}
],
// if you want to create contact if it does not exist
"contact": {
"first_name" : "Johan",
"last_name" : "Doe",
"email" : "johndoe@doamin.com",
"country" : "Saudi Arabia",
"language_code" : "ar",
"groups" : "examplegroup1,examplegroup2"
}
}'