Responder a un mensaje
Cita un mensaje del hilo con `reply_to` (`msg_…`). Misma ventana de 24 h.
POSThttps://api.octuvia.com/v1/conversations/{conversation_id}/messages
Es el mismo endpoint que Responder en hilo: añade
reply_to. El mensaje citado debe ser del mismo conv_….Parámetros del body
Campo
Descripción
conversation_idstringrequerido
Id del hilo en la ruta (
conv_…).Ej: conv_01J8Z3K4M5N6P7Q8R9S0T1U2V3typestringrequerido
text | image | … | interactive.Ej: texttextobjectopcional
Si
type=text.bodystringrequerido
Texto de la respuesta.Ej:
¡Claro!preview_urlbooleanopcional
Preview de links.Ej:
falsereply_tostringrequerido
msg_… a citar (del mismo hilo).Ej: msg_01J8Z3K4M5N6P7Q8R9S0T1U2V3Request
Payload con citajson
{
"type": "text",
"text": { "body": "¡Claro!", "preview_url": false },
"reply_to": "msg_01J8Z3K4M5N6P7Q8R9S0T1U2V3"
}También puedes combinar reply_to con media (multipart: campo form reply_to) o interactivo.
Response
| Campo | Uso |
|---|---|
id | Nuevo msg_…. |
reply_to | Eco del msg_… citado. |
status | queued hasta el webhook de envío. |
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": "text",
"text": {
"body": "¡Claro!",
"preview_url": false
},
"reply_to": "msg_01J8Z3K4M5N6P7Q8R9S0T1U2V3"
})
});
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_01J8Z3K4M5N6P7Q8R9S0T1U2V7",
"reply_to": "msg_01J8Z3K4M5N6P7Q8R9S0T1U2V3",
"type": "text",
"status": "queued"
}