Pular para o conteúdo principal
POST
/
v1
/
bots
/
{botId}
/
messages
curl --request POST \
  --url https://api.jelou.ai/v1/bots/BOT_ID/messages \
  --header 'Authorization: Basic <Base64Encoded clientId:clientSecret>' \
  --header 'Content-Type: application/json' \
  --data '{
    "type": "CAROUSEL",
    "userId": "USER_ID",
    "text": "Confira nossas ofertas",
    "parameters": {
      "cards": [
        {
          "card_index": 0,
          "type": "cta_url",
          "header": {
            "type": "image",
            "image": { "link": "https://example.com/image1.png" }
          },
          "body": { "text": "Oferta exclusiva #1" },
          "action": {
            "name": "cta_url",
            "parameters": {
              "display_text": "Comprar",
              "url": "https://shop.example.com/deal1"
            }
          }
        },
        {
          "card_index": 1,
          "type": "cta_url",
          "header": {
            "type": "image",
            "image": { "link": "https://example.com/image2.png" }
          },
          "body": { "text": "Oferta exclusiva #2" },
          "action": {
            "name": "cta_url",
            "parameters": {
              "display_text": "Comprar",
              "url": "https://shop.example.com/deal2"
            }
          }
        }
      ]
    }
  }'
{
  "success": true,
  "messageId": "msg_123456789"
}

Documentation Index

Fetch the complete documentation index at: https://docs.jelou.ai/llms.txt

Use this file to discover all available pages before exploring further.

curl --request POST \
  --url https://api.jelou.ai/v1/bots/BOT_ID/messages \
  --header 'Authorization: Basic <Base64Encoded clientId:clientSecret>' \
  --header 'Content-Type: application/json' \
  --data '{
    "type": "CAROUSEL",
    "userId": "USER_ID",
    "text": "Confira nossas ofertas",
    "parameters": {
      "cards": [
        {
          "card_index": 0,
          "type": "cta_url",
          "header": {
            "type": "image",
            "image": { "link": "https://example.com/image1.png" }
          },
          "body": { "text": "Oferta exclusiva #1" },
          "action": {
            "name": "cta_url",
            "parameters": {
              "display_text": "Comprar",
              "url": "https://shop.example.com/deal1"
            }
          }
        },
        {
          "card_index": 1,
          "type": "cta_url",
          "header": {
            "type": "image",
            "image": { "link": "https://example.com/image2.png" }
          },
          "body": { "text": "Oferta exclusiva #2" },
          "action": {
            "name": "cta_url",
            "parameters": {
              "display_text": "Comprar",
              "url": "https://shop.example.com/deal2"
            }
          }
        }
      ]
    }
  }'

Estrutura de cada cartão

CampoTipoDescrição
card_indexnumberPosição do cartão (começando em 0).
typestringTipo de ação: cta_url ou quick_reply.
header.typestringimage ou video.
header.image.link / header.video.linkstringURL pública do header.
body.textstringTexto do corpo do cartão.
actionobjectAção ao interagir com o cartão.

Cartão com botões de resposta rápida

{
  "card_index": 0,
  "type": "quick_reply",
  "header": {
    "type": "image",
    "image": { "link": "https://example.com/image.png" }
  },
  "body": { "text": "Você tem interesse nesta oferta?" },
  "action": {
    "buttons": [
      {
        "type": "quick_reply",
        "quick_reply": { "id": "BUY_1", "title": "Sim, comprar" }
      },
      {
        "type": "quick_reply",
        "quick_reply": { "id": "SKIP_1", "title": "Não, obrigado" }
      }
    ]
  }
}

Restrições

  • Cartões: mínimo 1, máximo 10 por carrossel.
  • Header: apenas image ou video são suportados.
  • Providers compatíveis: WhatsApp Cloud API e Gupshup CAPI.
Este é um carrossel interativo enviado dentro de uma sessão ativa do WhatsApp. Não requer template HSM aprovado pela Meta.

Casos de Uso

  • Catálogos de produtos com CTA para a loja
  • Comparação de planos ou serviços
  • Promoções múltiplas com botões de compra
  • Seleção rápida entre opções com imagem associada

Autorizações

Authorization
string
header
obrigatório

Basic authentication using Base64 encoded clientId:clientSecret

Parâmetros de caminho

botId
string
obrigatório

The unique identifier of the bot

Corpo

application/json

Message payload. The structure varies based on the message type.

type
enum<string>
obrigatório

Type of message to send

Opções disponíveis:
text
Exemplo:

"text"

userId
string
obrigatório

Unique identifier of the user receiving the message

Exemplo:

"USER_ID"

text
string
obrigatório

Text content of the message

Exemplo:

"Hello, this is a text message"

botId
string

Unique identifier of the bot sending the message

Exemplo:

"BOT_ID"

Resposta

Message sent successfully

success
boolean
Exemplo:

true

messageId
string
Exemplo:

"msg_123456789"