Messages
Send Carousel Message
POST
/api/v1/chat/send/carouselSend a carousel of 2–10 cards, each with an image, text and buttons.
Parameters
- PhonestringRequired
Who gets it: phone number with country code, or a person's chat id. Groups are not supported.
- BodystringRequired
Text above the cards.
- CardsarrayRequired
2–10 cards. Each has an Image, a Body and Buttons. A button has type, title and id; cta_url also needs url, cta_call needs phone_number, copy needs copy_code.
- IdstringOptional
Your own id for the message (no spaces).
| Name | Type | Required | Description |
|---|---|---|---|
| Phone | string | Yes | Who gets it: phone number with country code, or a person's chat id. Groups are not supported. |
| Body | string | Yes | Text above the cards. |
| Cards | array | Yes | 2–10 cards. Each has an Image, a Body and Buttons. A button has type, title and id; cta_url also needs url, cta_call needs phone_number, copy needs copy_code. |
| Id | string | No | Your own id for the message (no spaces). |
Code Examples
cURL
curl -X POST "https://orvachat.com/api/v1/chat/send/carousel" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"Phone": "923001234567",
"Body": "Our best sellers",
"Cards": [
{
"Image": "data:image/jpeg;base64,/9j/…",
"Body": "Sneakers",
"Buttons": [
{
"type": "reply",
"title": "Buy",
"id": "buy-1"
}
]
},
{
"Image": "data:image/jpeg;base64,/9j/…",
"Body": "Sandals",
"Buttons": [
{
"type": "reply",
"title": "Buy",
"id": "buy-2"
}
]
}
]
}'Response Example
200 OK
{
"code": 200,
"data": {
"Details": "Sent",
"Id": "carousel-example-1",
"Timestamp": 1700000000
},
"success": true
}