Enviar carrossel
Envia um carrossel de cartões, cada um com texto, uma miniatura opcional e seus próprios botões.
curl --request POST \
--url https://pilotstatus.com.br/api/layer/evolution-v2/message/sendCarousel/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"number": "5511999999999",
"cards": [
{
"text": "Starter plan",
"thumbnailUrl": "https://media.pilotstatus.com.br/starter.png",
"footerText": "Best for small teams",
"buttons": [
{
"type": "url",
"displayText": "Learn more",
"url": "https://pilotstatus.com.br/starter"
}
]
}
],
"cards[].text": "<string>",
"cards[].thumbnailUrl": "<string>",
"cards[].footerText": "<string>",
"cards[].buttons": [
{}
],
"title": "Featured products",
"description": "Swipe to browse",
"footer": "Pilot Status",
"delay": 123,
"everyOne": true,
"mentioned": [
"<string>"
]
}
'import requests
url = "https://pilotstatus.com.br/api/layer/evolution-v2/message/sendCarousel/{instance}"
payload = {
"number": "5511999999999",
"cards": [
{
"text": "Starter plan",
"thumbnailUrl": "https://media.pilotstatus.com.br/starter.png",
"footerText": "Best for small teams",
"buttons": [
{
"type": "url",
"displayText": "Learn more",
"url": "https://pilotstatus.com.br/starter"
}
]
}
],
"cards[].text": "<string>",
"cards[].thumbnailUrl": "<string>",
"cards[].footerText": "<string>",
"cards[].buttons": [{}],
"title": "Featured products",
"description": "Swipe to browse",
"footer": "Pilot Status",
"delay": 123,
"everyOne": True,
"mentioned": ["<string>"]
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
number: '5511999999999',
cards: [
{
text: 'Starter plan',
thumbnailUrl: 'https://media.pilotstatus.com.br/starter.png',
footerText: 'Best for small teams',
buttons: [
{
type: 'url',
displayText: 'Learn more',
url: 'https://pilotstatus.com.br/starter'
}
]
}
],
'cards[].text': '<string>',
'cards[].thumbnailUrl': '<string>',
'cards[].footerText': '<string>',
'cards[].buttons': [{}],
title: 'Featured products',
description: 'Swipe to browse',
footer: 'Pilot Status',
delay: 123,
everyOne: true,
mentioned: ['<string>']
})
};
fetch('https://pilotstatus.com.br/api/layer/evolution-v2/message/sendCarousel/{instance}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pilotstatus.com.br/api/layer/evolution-v2/message/sendCarousel/{instance}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'number' => '5511999999999',
'cards' => [
[
'text' => 'Starter plan',
'thumbnailUrl' => 'https://media.pilotstatus.com.br/starter.png',
'footerText' => 'Best for small teams',
'buttons' => [
[
'type' => 'url',
'displayText' => 'Learn more',
'url' => 'https://pilotstatus.com.br/starter'
]
]
]
],
'cards[].text' => '<string>',
'cards[].thumbnailUrl' => '<string>',
'cards[].footerText' => '<string>',
'cards[].buttons' => [
[
]
],
'title' => 'Featured products',
'description' => 'Swipe to browse',
'footer' => 'Pilot Status',
'delay' => 123,
'everyOne' => true,
'mentioned' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/api/layer/evolution-v2/message/sendCarousel/{instance}"
payload := strings.NewReader("{\n \"number\": \"5511999999999\",\n \"cards\": [\n {\n \"text\": \"Starter plan\",\n \"thumbnailUrl\": \"https://media.pilotstatus.com.br/starter.png\",\n \"footerText\": \"Best for small teams\",\n \"buttons\": [\n {\n \"type\": \"url\",\n \"displayText\": \"Learn more\",\n \"url\": \"https://pilotstatus.com.br/starter\"\n }\n ]\n }\n ],\n \"cards[].text\": \"<string>\",\n \"cards[].thumbnailUrl\": \"<string>\",\n \"cards[].footerText\": \"<string>\",\n \"cards[].buttons\": [\n {}\n ],\n \"title\": \"Featured products\",\n \"description\": \"Swipe to browse\",\n \"footer\": \"Pilot Status\",\n \"delay\": 123,\n \"everyOne\": true,\n \"mentioned\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pilotstatus.com.br/api/layer/evolution-v2/message/sendCarousel/{instance}")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"5511999999999\",\n \"cards\": [\n {\n \"text\": \"Starter plan\",\n \"thumbnailUrl\": \"https://media.pilotstatus.com.br/starter.png\",\n \"footerText\": \"Best for small teams\",\n \"buttons\": [\n {\n \"type\": \"url\",\n \"displayText\": \"Learn more\",\n \"url\": \"https://pilotstatus.com.br/starter\"\n }\n ]\n }\n ],\n \"cards[].text\": \"<string>\",\n \"cards[].thumbnailUrl\": \"<string>\",\n \"cards[].footerText\": \"<string>\",\n \"cards[].buttons\": [\n {}\n ],\n \"title\": \"Featured products\",\n \"description\": \"Swipe to browse\",\n \"footer\": \"Pilot Status\",\n \"delay\": 123,\n \"everyOne\": true,\n \"mentioned\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/api/layer/evolution-v2/message/sendCarousel/{instance}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": \"5511999999999\",\n \"cards\": [\n {\n \"text\": \"Starter plan\",\n \"thumbnailUrl\": \"https://media.pilotstatus.com.br/starter.png\",\n \"footerText\": \"Best for small teams\",\n \"buttons\": [\n {\n \"type\": \"url\",\n \"displayText\": \"Learn more\",\n \"url\": \"https://pilotstatus.com.br/starter\"\n }\n ]\n }\n ],\n \"cards[].text\": \"<string>\",\n \"cards[].thumbnailUrl\": \"<string>\",\n \"cards[].footerText\": \"<string>\",\n \"cards[].buttons\": [\n {}\n ],\n \"title\": \"Featured products\",\n \"description\": \"Swipe to browse\",\n \"footer\": \"Pilot Status\",\n \"delay\": 123,\n \"everyOne\": true,\n \"mentioned\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"key": {
"remoteJid": "5511999999999@s.whatsapp.net",
"fromMe": true,
"id": "3EB0CAROUSEL99AABBCCDD"
},
"pushName": "Você",
"status": "PENDING",
"message": {
"interactiveMessage": {
"body": {
"text": "Confira nossos destaques"
},
"footer": {
"text": "Pilot Status"
},
"carouselMessage": {
"cards": [
{
"header": {
"hasMediaAttachment": true,
"imageMessage": {
"url": "https://mmg.whatsapp.net/v/t62.7118-24/card1_112233445566778899_n.enc",
"mimetype": "image/jpeg"
}
},
"body": {
"text": "*Produto A*\n\nO mais vendido da semana\n"
},
"footer": {
"text": "R$ 99,90"
},
"nativeFlowMessage": {
"buttons": [
{
"name": "cta_url",
"buttonParamsJson": "{\"display_text\":\"Comprar\",\"url\":\"https://loja.example.com/a\"}"
}
]
}
},
{
"header": {
"hasMediaAttachment": true,
"imageMessage": {
"url": "https://mmg.whatsapp.net/v/t62.7118-24/card2_998877665544332211_n.enc",
"mimetype": "image/jpeg"
}
},
"body": {
"text": "*Produto B*\n\nNovidade em estoque\n"
},
"footer": {
"text": "R$ 149,90"
},
"nativeFlowMessage": {
"buttons": [
{
"name": "cta_url",
"buttonParamsJson": "{\"display_text\":\"Comprar\",\"url\":\"https://loja.example.com/b\"}"
}
]
}
}
]
}
}
},
"contextInfo": null,
"messageType": "interactiveMessage",
"messageTimestamp": 1720483920,
"instanceId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"source": "web"
}{
"status": 400,
"error": "Bad Request",
"message": "Invalid payload"
}Autorizações
Your Pilot Status API key (ps_...). Evolution GO also accepts Authorization: Bearer <key>.
Parâmetros de caminho
O nome de exibição do número no painel do Pilot Status.
Corpo
Telefone do destinatário em E.164 sem +, ou um JID.
"5511999999999"
Array de objetos de cartão (veja os campos abaixo).
[
{
"text": "Starter plan",
"thumbnailUrl": "https://media.pilotstatus.com.br/starter.png",
"footerText": "Best for small teams",
"buttons": [
{
"type": "url",
"displayText": "Learn more",
"url": "https://pilotstatus.com.br/starter"
}
]
}
]
Texto do corpo do cartão.
URL da imagem de miniatura do cartão.
Texto de rodapé do cartão.
Botões do cartão (mesmo formato de sendButtons).
Título do carrossel.
"Featured products"
Texto do corpo do carrossel.
"Swipe to browse"
Texto de rodapé do carrossel.
"Pilot Status"
Atraso antes do envio, em milissegundos.
Mencionar todos no grupo.
Array de strings numéricas a mencionar.
Resposta
Sucesso — corpo de resposta nativo do provedor.
Sent a carousel message (multiple interactive cards). Returns the persisted Baileys messageRaw envelope containing an interactiveMessage with a carouselMessage of cards.
Esta página foi útil?
curl --request POST \
--url https://pilotstatus.com.br/api/layer/evolution-v2/message/sendCarousel/{instance} \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"number": "5511999999999",
"cards": [
{
"text": "Starter plan",
"thumbnailUrl": "https://media.pilotstatus.com.br/starter.png",
"footerText": "Best for small teams",
"buttons": [
{
"type": "url",
"displayText": "Learn more",
"url": "https://pilotstatus.com.br/starter"
}
]
}
],
"cards[].text": "<string>",
"cards[].thumbnailUrl": "<string>",
"cards[].footerText": "<string>",
"cards[].buttons": [
{}
],
"title": "Featured products",
"description": "Swipe to browse",
"footer": "Pilot Status",
"delay": 123,
"everyOne": true,
"mentioned": [
"<string>"
]
}
'import requests
url = "https://pilotstatus.com.br/api/layer/evolution-v2/message/sendCarousel/{instance}"
payload = {
"number": "5511999999999",
"cards": [
{
"text": "Starter plan",
"thumbnailUrl": "https://media.pilotstatus.com.br/starter.png",
"footerText": "Best for small teams",
"buttons": [
{
"type": "url",
"displayText": "Learn more",
"url": "https://pilotstatus.com.br/starter"
}
]
}
],
"cards[].text": "<string>",
"cards[].thumbnailUrl": "<string>",
"cards[].footerText": "<string>",
"cards[].buttons": [{}],
"title": "Featured products",
"description": "Swipe to browse",
"footer": "Pilot Status",
"delay": 123,
"everyOne": True,
"mentioned": ["<string>"]
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
number: '5511999999999',
cards: [
{
text: 'Starter plan',
thumbnailUrl: 'https://media.pilotstatus.com.br/starter.png',
footerText: 'Best for small teams',
buttons: [
{
type: 'url',
displayText: 'Learn more',
url: 'https://pilotstatus.com.br/starter'
}
]
}
],
'cards[].text': '<string>',
'cards[].thumbnailUrl': '<string>',
'cards[].footerText': '<string>',
'cards[].buttons': [{}],
title: 'Featured products',
description: 'Swipe to browse',
footer: 'Pilot Status',
delay: 123,
everyOne: true,
mentioned: ['<string>']
})
};
fetch('https://pilotstatus.com.br/api/layer/evolution-v2/message/sendCarousel/{instance}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://pilotstatus.com.br/api/layer/evolution-v2/message/sendCarousel/{instance}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'number' => '5511999999999',
'cards' => [
[
'text' => 'Starter plan',
'thumbnailUrl' => 'https://media.pilotstatus.com.br/starter.png',
'footerText' => 'Best for small teams',
'buttons' => [
[
'type' => 'url',
'displayText' => 'Learn more',
'url' => 'https://pilotstatus.com.br/starter'
]
]
]
],
'cards[].text' => '<string>',
'cards[].thumbnailUrl' => '<string>',
'cards[].footerText' => '<string>',
'cards[].buttons' => [
[
]
],
'title' => 'Featured products',
'description' => 'Swipe to browse',
'footer' => 'Pilot Status',
'delay' => 123,
'everyOne' => true,
'mentioned' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/api/layer/evolution-v2/message/sendCarousel/{instance}"
payload := strings.NewReader("{\n \"number\": \"5511999999999\",\n \"cards\": [\n {\n \"text\": \"Starter plan\",\n \"thumbnailUrl\": \"https://media.pilotstatus.com.br/starter.png\",\n \"footerText\": \"Best for small teams\",\n \"buttons\": [\n {\n \"type\": \"url\",\n \"displayText\": \"Learn more\",\n \"url\": \"https://pilotstatus.com.br/starter\"\n }\n ]\n }\n ],\n \"cards[].text\": \"<string>\",\n \"cards[].thumbnailUrl\": \"<string>\",\n \"cards[].footerText\": \"<string>\",\n \"cards[].buttons\": [\n {}\n ],\n \"title\": \"Featured products\",\n \"description\": \"Swipe to browse\",\n \"footer\": \"Pilot Status\",\n \"delay\": 123,\n \"everyOne\": true,\n \"mentioned\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://pilotstatus.com.br/api/layer/evolution-v2/message/sendCarousel/{instance}")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"number\": \"5511999999999\",\n \"cards\": [\n {\n \"text\": \"Starter plan\",\n \"thumbnailUrl\": \"https://media.pilotstatus.com.br/starter.png\",\n \"footerText\": \"Best for small teams\",\n \"buttons\": [\n {\n \"type\": \"url\",\n \"displayText\": \"Learn more\",\n \"url\": \"https://pilotstatus.com.br/starter\"\n }\n ]\n }\n ],\n \"cards[].text\": \"<string>\",\n \"cards[].thumbnailUrl\": \"<string>\",\n \"cards[].footerText\": \"<string>\",\n \"cards[].buttons\": [\n {}\n ],\n \"title\": \"Featured products\",\n \"description\": \"Swipe to browse\",\n \"footer\": \"Pilot Status\",\n \"delay\": 123,\n \"everyOne\": true,\n \"mentioned\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/api/layer/evolution-v2/message/sendCarousel/{instance}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"number\": \"5511999999999\",\n \"cards\": [\n {\n \"text\": \"Starter plan\",\n \"thumbnailUrl\": \"https://media.pilotstatus.com.br/starter.png\",\n \"footerText\": \"Best for small teams\",\n \"buttons\": [\n {\n \"type\": \"url\",\n \"displayText\": \"Learn more\",\n \"url\": \"https://pilotstatus.com.br/starter\"\n }\n ]\n }\n ],\n \"cards[].text\": \"<string>\",\n \"cards[].thumbnailUrl\": \"<string>\",\n \"cards[].footerText\": \"<string>\",\n \"cards[].buttons\": [\n {}\n ],\n \"title\": \"Featured products\",\n \"description\": \"Swipe to browse\",\n \"footer\": \"Pilot Status\",\n \"delay\": 123,\n \"everyOne\": true,\n \"mentioned\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"key": {
"remoteJid": "5511999999999@s.whatsapp.net",
"fromMe": true,
"id": "3EB0CAROUSEL99AABBCCDD"
},
"pushName": "Você",
"status": "PENDING",
"message": {
"interactiveMessage": {
"body": {
"text": "Confira nossos destaques"
},
"footer": {
"text": "Pilot Status"
},
"carouselMessage": {
"cards": [
{
"header": {
"hasMediaAttachment": true,
"imageMessage": {
"url": "https://mmg.whatsapp.net/v/t62.7118-24/card1_112233445566778899_n.enc",
"mimetype": "image/jpeg"
}
},
"body": {
"text": "*Produto A*\n\nO mais vendido da semana\n"
},
"footer": {
"text": "R$ 99,90"
},
"nativeFlowMessage": {
"buttons": [
{
"name": "cta_url",
"buttonParamsJson": "{\"display_text\":\"Comprar\",\"url\":\"https://loja.example.com/a\"}"
}
]
}
},
{
"header": {
"hasMediaAttachment": true,
"imageMessage": {
"url": "https://mmg.whatsapp.net/v/t62.7118-24/card2_998877665544332211_n.enc",
"mimetype": "image/jpeg"
}
},
"body": {
"text": "*Produto B*\n\nNovidade em estoque\n"
},
"footer": {
"text": "R$ 149,90"
},
"nativeFlowMessage": {
"buttons": [
{
"name": "cta_url",
"buttonParamsJson": "{\"display_text\":\"Comprar\",\"url\":\"https://loja.example.com/b\"}"
}
]
}
}
]
}
}
},
"contextInfo": null,
"messageType": "interactiveMessage",
"messageTimestamp": 1720483920,
"instanceId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
"source": "web"
}{
"status": 400,
"error": "Bad Request",
"message": "Invalid payload"
}