Ir al contenido
Octuvia

Enviar mensaje interactivo

Botones, lista, CTA URL, flow, ubicación, contacto, llamada, producto, catálogo o carrusel. Ventana de 24 h.

POSThttps://api.octuvia.com/v1/conversations/{conversation_id}/messages
JSON con type: interactive + objeto interactive. body es obligatorio salvo product. Máx. 3 botones; lista máx. 10 filas.

Parámetros del body

Campo
Descripción
conversation_id
stringrequerido
Id del hilo en la ruta (conv_…).Ej: conv_01J8Z3K4M5N6P7Q8R9S0T1U2V3
type
stringrequerido
Debe ser interactive.Ej: interactive
interactive
objectrequerido
Contenido interactivo.
type
stringrequerido
buttons | list | cta_url | flow | location_request | contact_request | voice_call | product | catalog | carousel.Ej: buttons
header
stringopcional
Texto de cabecera. Máx. 60.
body
stringrequerido
Cuerpo. Máx. 1024. Obligatorio salvo product.
footer
stringopcional
Pie. Máx. 60.
buttons
arrayopcional
Si type=buttons: 1–3 ítems { id, title } (title ≤ 20).
list
objectopcional
Si type=list: { button_text, sections: [{ title, rows: [{ id, title, description? }] }] }.
cta_url
objectopcional
Si type=cta_url: { display_text, url } (http/https).
flow
objectopcional
Si type=flow: { id, cta, name?, token?, mode?, action?, screen?, data? }.
reply_to
stringopcional
msg_… a citar (opcional).

Request

Elige interactive.type y manda solo la rama que corresponda (buttons, list, cta_url, …).

Botonesjson
{
  "type": "interactive",
  "interactive": {
    "type": "buttons",
    "header": "Hola",
    "body": "¿Cómo quieres continuar?",
    "footer": "OCTUVIA",
    "buttons": [
      { "id": "btn_1", "title": "Botón 1" },
      { "id": "btn_2", "title": "Botón 2" }
    ]
  }
}
Listajson
{
  "type": "interactive",
  "interactive": {
    "type": "list",
    "body": "Elige una opción",
    "list": {
      "button_text": "Ver opciones",
      "sections": [
        {
          "title": "Servicios",
          "rows": [
            { "id": "row_1", "title": "Soporte", "description": "24/7" },
            { "id": "row_2", "title": "Ventas" }
          ]
        }
      ]
    }
  }
}
CTA URLjson
{
  "type": "interactive",
  "interactive": {
    "type": "cta_url",
    "body": "Revisa tu pedido",
    "cta_url": {
      "display_text": "Abrir",
      "url": "https://example.com/pedido/1042"
    }
  }
}

Response

CampoUso
idmsg_… encolado.
typeSiempre interactive.
statusqueued → webhooks message.sent / message.failed.

Respuesta del contacto

Cuando pulse un botón o fila, llega message.received con type: interactive_reply (o flow_reply en Flows).

Language

Credentials

Header

Authorization

Token de la empresa · HTTP directo

Fetch Request
$ # Node 18+ fetch
const response = await fetch("https://api.octuvia.com/v1/conversations/conv_01J8Z3K4M5N6P7Q8R9S0T1U2V3/messages", {
  method: "POST",
  headers: {
    "Authorization": "Bearer octuvia_live_…",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "type": "interactive",
    "interactive": {
      "type": "buttons",
      "header": "Hola",
      "body": "¿Cómo quieres continuar?",
      "footer": "OCTUVIA",
      "buttons": [
        {
          "id": "btn_1",
          "title": "Botón 1"
        },
        {
          "id": "btn_2",
          "title": "Botón 2"
        }
      ]
    }
  })
});

const data = await response.json();
console.log(data);
HTTP directo · funciona con cualquier cliente HTTP
Response

Elige un ejemplo de respuesta:

application/json
202OK
{
  "object": "message",
  "id": "msg_01J8Z3K4M5N6P7Q8R9S0T1U2V6",
  "type": "interactive",
  "status": "queued"
}