Enviar carrusel
Envía un carrusel de tarjetas, cada una con texto, una miniatura opcional y sus propios botones.
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"
}Autorizaciones
El token de la instancia, enviado en el encabezado apikey: el token de la instancia Evolution V2 que migraste en el panel (Números → Conectar → Migrar), o el token propio de la instancia de Pilot Status; y debe pertenecer a la {instance} de la ruta. Una clave de API ps_ de Pilot Status NO se acepta (404 Instance not found). Este es el único encabezado que lee el layer Evolution V2: Authorization: Bearer y x-api-key no se aceptan, y una solicitud sin apikey recibe 401.
Parámetros de ruta
Cuerpo
Arreglo de objetos de tarjeta (consulta los campos abajo).
[
{
"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"
}
]
}
]
Respuesta
Éxito: cuerpo de respuesta nativo del proveedor.
Se envió un mensaje de carrusel (varias tarjetas interactivas). Devuelve el envelope messageRaw de Baileys persistido, que contiene un interactiveMessage con un carouselMessage de tarjetas.
¿Esta página le ayudó?
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"
}