Saltar al contenido 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": "Mira nuestras 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": "Mira nuestras 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"
            }
          }
        }
      ]
    }
  }'

Estructura de cada tarjeta

CampoTipoDescripción
card_indexnumberPosición de la tarjeta (empezando en 0).
typestringTipo de acción: cta_url o quick_reply.
header.typestringimage o video.
header.image.link / header.video.linkstringURL pública del header.
body.textstringTexto del cuerpo de la tarjeta.
actionobjectAcción al interactuar con la tarjeta.

Tarjeta con botones de respuesta rápida

{
  "card_index": 0,
  "type": "quick_reply",
  "header": {
    "type": "image",
    "image": { "link": "https://example.com/image.png" }
  },
  "body": { "text": "¿Te interesa esta oferta?" },
  "action": {
    "buttons": [
      {
        "type": "quick_reply",
        "quick_reply": { "id": "BUY_1", "title": "Sí, comprar" }
      },
      {
        "type": "quick_reply",
        "quick_reply": { "id": "SKIP_1", "title": "No, gracias" }
      }
    ]
  }
}

Restricciones

  • Tarjetas: mínimo 1, máximo 10 por carrusel.
  • Header: solo image o video.
  • Providers compatibles: WhatsApp Cloud API y Gupshup CAPI.
Este es un carrusel interactivo enviado dentro de una sesión activa de WhatsApp. No requiere plantilla HSM aprobada por Meta.

Casos de Uso

  • Catálogos de productos con CTA a la tienda
  • Comparación de planes o servicios
  • Promociones múltiples con botones de compra
  • Selección rápida entre opciones con imagen

Autorizaciones

Authorization
string
header
requerido

Basic authentication using Base64 encoded clientId:clientSecret

Parámetros de ruta

botId
string
requerido

The unique identifier of the bot

Cuerpo

application/json

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

type
enum<string>
requerido

Type of message to send

Opciones disponibles:
text
Ejemplo:

"text"

userId
string
requerido

Unique identifier of the user receiving the message

Ejemplo:

"USER_ID"

text
string
requerido

Text content of the message

Ejemplo:

"Hello, this is a text message"

botId
string

Unique identifier of the bot sending the message

Ejemplo:

"BOT_ID"

Respuesta

Message sent successfully

success
boolean
Ejemplo:

true

messageId
string
Ejemplo:

"msg_123456789"