Send Carousel
#
Method#
/send-carouselPOST
https://api.z-api.io/instances/SUA_INSTANCIA/token/SEU_TOKEN/send-carousel
#
HeaderKey | Value |
---|---|
Client-Token | ACCOUNT SECURITY TOKEN |
Attention
Sending buttons accompanying the carousel is currently available, but there are some decisive factors for functionality. For more details, access the topic Button Functionality
#
ConceptWith this method, you can send carousel messages with images, text, and action buttons. Using action buttons, you can redirect to links, make calls, and also provide standard responses.
#
Attributes#
RequiredAttributes | Type | Description |
---|---|---|
phone | string | Phone number (or group ID in cases of sending to groups) of the recipient in the format DDI DDD NUMBER e.g., 551199999999. IMPORTANT Send only numbers, without formatting or mask |
message | string | Text to be sent |
carousel | carouselCard[] | Array of objects with carousel cards |
#
carouselCardAttributes | Type | Description |
---|---|---|
text | string | Card text |
image | string | Card image |
#
Optional carouselCardAttributes | Type | Description |
---|---|---|
buttons | buttonActions[] | Array of objects of type buttonActions |
#
buttonActionsAttributes | Type | Description |
---|---|---|
type | string | Button types to be sent (CALL, URL, REPLY) |
phone | string | Number assigned to the button if it is of type CALL |
url | string | Link assigned to the button if it is of type URL. |
label | string | Button text |
#
Optional buttonActionsAttributes | Type | Description |
---|---|---|
id | string | Button identifier |
#
OptionalAttributes | Type | Description |
---|---|---|
delayMessage | number | In this attribute, a delay is added to the message. You can choose a range from 1~15 sec, meaning how many seconds it will wait to send the next message. (e.g., "delayMessage": 5). The default delay if not specified is 1~3 sec |
#
Request Body#
Response#
200Attributes | Type | Description |
---|---|---|
zaapId | string | id in z-api |
messageId | string | id in WhatsApp |
id | string | Added for compatibility with Zapier, it has the same value as messageId |
Example
#
405In this case, ensure that you are correctly sending the method specification, i.e., check if you sent POST or GET as specified at the beginning of this topic.
#
415If you receive a 415 error, make sure to add the "Content-Type" header in the request with the object type you are sending, which in most cases is "application/json".
#
Webhook ResponseLink to the webhook response (upon receipt)