Referencia de endpoints
Referencia generada desde el OpenAPI de Dabar v1.2.0. No editar a mano: ejecutar npm run api:sync -- --source URL/api/v1/openapi.
Base: https://dabar.com.co/api/v1. Las rutas siguientes son relativas a esa base.
- OpenAPI para herramientas.
- Instrucciones para agentes.
- Autenticación y permisos.
- Errores, reintentos y eventos.
Los cuerpos son JSON Schema, no ejemplos con valores para enviar. Las respuestas generales se explican en las guías; el OpenAPI actual no define esquemas completos para todos los DTO de respuesta. No inventes campos de respuesta.
Para /snapshot y /resources/*, además de events:read, se necesita el permiso de lectura del recurso: conversations:read para conversaciones/snapshot y messages:read para mensajes. Son rutas de backend, no un reemplazo de las ACL de usuarios.
GET /me
Sección titulada «GET /me»Conexión y capacidades.
Permiso: conversations:read. Autenticación: Bearer de servidor.
GET /inboxes
Sección titulada «GET /inboxes»Bandejas autorizadas.
Permiso: conversations:read. Autenticación: Bearer de servidor.
GET /actors
Sección titulada «GET /actors»Consultar miembros delegados.
Permiso: actors:manage. Autenticación: Bearer de servidor.
POST /actors
Sección titulada «POST /actors»Registrar o actualizar una identidad delegada.
Permiso: actors:manage. Autenticación: Bearer de servidor.
Cuerpo application/json
Sección titulada «Cuerpo application/json»{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "externalId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string", "minLength": 1, "maxLength": 100 }, "role": { "type": "string", "enum": [ "agent", "admin" ] }, "active": { "default": true, "type": "boolean" } }, "required": [ "externalId", "name", "role", "active" ], "additionalProperties": false}GET /contacts
Sección titulada «GET /contacts»Consultar contactos autorizados (hasta 50).
Permiso: contacts:read. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
POST /contacts
Sección titulada «POST /contacts»Crear o encontrar por E.164; en pruebas solo contactos preautorizados.
Permiso: contacts:write. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
Cuerpo application/json
Sección titulada «Cuerpo application/json»{ "type": "object", "required": [ "phone", "name" ], "properties": { "phone": { "type": "string" }, "name": { "type": "string" } }, "additionalProperties": false}PATCH /contacts/{id}
Sección titulada «PATCH /contacts/{id}»Actualizar nombre, correo o etiquetas; identidad WhatsApp no se reasigna.
Permiso: contacts:write. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
Cuerpo application/json
Sección titulada «Cuerpo application/json»{ "type": "object", "properties": { "name": { "type": "string" }, "email": { "type": [ "string", "null" ], "format": "email" }, "tags": { "type": "array", "maxItems": 30, "items": { "type": "string" } } }, "additionalProperties": false}GET /conversations
Sección titulada «GET /conversations»Listar conversaciones y cola sin asignar.
Permiso: conversations:read. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
cursor |
query | No | string; Cursor opaco devuelto por la página anterior. |
limit |
query | No | integer; mín. 1; máx. 50 |
POST /conversations
Sección titulada «POST /conversations»Abrir o encontrar una conversación, sin fabricar una respuesta humana.
Permiso: conversations:write. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
Cuerpo application/json
Sección titulada «Cuerpo application/json»{ "type": "object", "required": [ "contactId", "inboxId" ], "properties": { "contactId": { "type": "string", "format": "uuid" }, "inboxId": { "type": "string", "format": "uuid" } }, "additionalProperties": false}GET /conversations/{id}
Sección titulada «GET /conversations/{id}»Detalle autorizado y ventana de WhatsApp.
Permiso: conversations:read. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
PATCH /conversations/{id}
Sección titulada «PATCH /conversations/{id}»Claim, asignación, humano/IA, resolución, lectura, lead o seguimiento.
Permiso: conversations:write. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
If-Match |
header | No | string; date-time; updatedAt ISO del detalle que se está modificando. |
Cuerpo application/json
Sección titulada «Cuerpo application/json»{ "$schema": "https://json-schema.org/draft/2020-12/schema", "oneOf": [ { "type": "object", "properties": { "action": { "type": "string", "const": "claim" } }, "required": [ "action" ], "additionalProperties": false }, { "type": "object", "properties": { "action": { "type": "string", "const": "assign" }, "externalId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "action", "externalId" ], "additionalProperties": false }, { "type": "object", "properties": { "action": { "type": "string", "const": "human" } }, "required": [ "action" ], "additionalProperties": false }, { "type": "object", "properties": { "action": { "type": "string", "const": "ai" }, "agentId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "action", "agentId" ], "additionalProperties": false }, { "type": "object", "properties": { "action": { "type": "string", "const": "resolve" } }, "required": [ "action" ], "additionalProperties": false }, { "type": "object", "properties": { "action": { "type": "string", "const": "reopen" } }, "required": [ "action" ], "additionalProperties": false }, { "type": "object", "properties": { "action": { "type": "string", "const": "read" } }, "required": [ "action" ], "additionalProperties": false }, { "type": "object", "properties": { "action": { "type": "string", "const": "followup" }, "at": { "anyOf": [ { "type": "string", "format": "date-time", "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$" }, { "type": "null" } ] }, "note": { "anyOf": [ { "type": "string", "maxLength": 500 }, { "type": "null" } ] } }, "required": [ "action", "at", "note" ], "additionalProperties": false }, { "type": "object", "properties": { "action": { "type": "string", "const": "link_lead" }, "leadId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "action", "leadId" ], "additionalProperties": false } ]}GET /conversations/{id}/messages
Sección titulada «GET /conversations/{id}/messages»Historial visible, autoría IA y citas disponibles; cursor hacia mensajes anteriores.
Permiso: messages:read. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
cursor |
query | No | string; Cursor opaco devuelto por la página anterior. |
limit |
query | No | integer; mín. 1; máx. 50 |
POST /conversations/{id}/messages
Sección titulada «POST /conversations/{id}/messages»Enviar texto, plantilla, adjunto, cita replyToId o reenvío forward. Citas/reenvíos también requieren messages:read; origen visible y destino autorizado con ventana activa..
Permiso: messages:send. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
Idempotency-Key |
header | Sí | string; uuid |
Cuerpo application/json
Sección titulada «Cuerpo application/json»{ "$schema": "https://json-schema.org/draft/2020-12/schema", "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "text" }, "content": { "type": "string", "minLength": 1, "maxLength": 4000 }, "replyToId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "type", "content" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "template" }, "templateId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "parameters": { "default": {}, "type": "object", "propertyNames": { "type": "string" }, "additionalProperties": { "type": "string", "maxLength": 1000 } } }, "required": [ "type", "templateId", "parameters" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "media" }, "uploadId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "caption": { "default": "", "type": "string", "maxLength": 1000 }, "replyToId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "type", "uploadId", "caption" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "forward" }, "sourceMessageId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "type", "sourceMessageId" ], "additionalProperties": false } ]}POST /conversations/{id}/messages/verify
Sección titulada «POST /conversations/{id}/messages/verify»Revalidar visibilidad de hasta 200 mensajes ya cargados.
Permiso: messages:read. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
Cuerpo application/json
Sección titulada «Cuerpo application/json»{ "type": "object", "required": [ "ids" ], "properties": { "ids": { "type": "array", "maxItems": 200, "items": { "type": "string", "format": "uuid" } } }, "additionalProperties": false}GET /conversations/{id}/templates
Sección titulada «GET /conversations/{id}/templates»Plantillas aprobadas de la bandeja y variables canónicas.
Permiso: conversations:read. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
GET /templates
Sección titulada «GET /templates»Catálogo de las bandejas autorizadas; agentes solo ven aprobadas. refresh=1 consulta Meta y requiere administrador delegado..
Permiso: conversations:read. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
refresh |
query | No | string; 1 |
POST /templates
Sección titulada «POST /templates»Crear borrador sin enviarlo a Meta; administrador delegado, cupo e idempotencia.
Permiso: conversations:write. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
Idempotency-Key |
header | Sí | string; uuid |
Cuerpo application/json
Sección titulada «Cuerpo application/json»{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "inboxId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string", "minLength": 1, "maxLength": 512, "pattern": "^[a-z0-9_]+$" }, "category": { "type": "string", "enum": [ "utility", "marketing" ] }, "language": { "type": "string", "pattern": "^[a-z]{2,3}(?:_[A-Z]{2})?$" }, "content": { "type": "object", "properties": { "header": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "text" }, "text": { "type": "string", "minLength": 1, "maxLength": 60 } }, "required": [ "type", "text" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "image" }, "assetId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "type", "assetId" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "video" }, "assetId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "type", "assetId" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "document" }, "assetId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "type", "assetId" ], "additionalProperties": false } ] }, "footer": { "type": "string", "minLength": 1, "maxLength": 60 }, "buttons": { "maxItems": 10, "type": "array", "items": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "url" }, "text": { "type": "string", "minLength": 1, "maxLength": 25 }, "url": { "type": "string", "maxLength": 2000, "format": "uri" } }, "required": [ "type", "text", "url" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "phone" }, "text": { "type": "string", "minLength": 1, "maxLength": 25 }, "phone": { "type": "string", "pattern": "^\\+[1-9]\\d{6,14}$" } }, "required": [ "type", "text", "phone" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "quick_reply" }, "text": { "type": "string", "minLength": 1, "maxLength": 25 } }, "required": [ "type", "text" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "request_contact_info" } }, "required": [ "type" ], "additionalProperties": false, "description": "Solicita el teléfono del destinatario. WhatsApp fija y traduce el texto; no admite text ni parámetros." } ] } } }, "additionalProperties": false }, "body": { "type": "string", "minLength": 1, "maxLength": 1024 }, "variables": { "maxItems": 20, "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$" }, "source": { "type": "string", "enum": [ "contact.first_name", "contact.name", "contact.phone", "contact.email", "organization.name" ] }, "sample": { "type": "string", "maxLength": 200 } }, "required": [ "key", "source", "sample" ], "additionalProperties": false } } }, "required": [ "inboxId", "name", "category", "language", "body", "variables" ], "additionalProperties": false}PATCH /templates/{id}
Sección titulada «PATCH /templates/{id}»Editar solo borrador autorizado; administrador delegado. Repetir el mismo contenido reconcilia una confirmación perdida..
Permiso: conversations:write. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
If-Match |
header | Sí | string; date-time |
Cuerpo application/json
Sección titulada «Cuerpo application/json»{ "$schema": "https://json-schema.org/draft/2020-12/schema", "type": "object", "properties": { "inboxId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" }, "name": { "type": "string", "minLength": 1, "maxLength": 512, "pattern": "^[a-z0-9_]+$" }, "category": { "type": "string", "enum": [ "utility", "marketing" ] }, "language": { "type": "string", "pattern": "^[a-z]{2,3}(?:_[A-Z]{2})?$" }, "content": { "type": "object", "properties": { "header": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "text" }, "text": { "type": "string", "minLength": 1, "maxLength": 60 } }, "required": [ "type", "text" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "image" }, "assetId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "type", "assetId" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "video" }, "assetId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "type", "assetId" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "document" }, "assetId": { "type": "string", "format": "uuid", "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$" } }, "required": [ "type", "assetId" ], "additionalProperties": false } ] }, "footer": { "type": "string", "minLength": 1, "maxLength": 60 }, "buttons": { "maxItems": 10, "type": "array", "items": { "oneOf": [ { "type": "object", "properties": { "type": { "type": "string", "const": "url" }, "text": { "type": "string", "minLength": 1, "maxLength": 25 }, "url": { "type": "string", "maxLength": 2000, "format": "uri" } }, "required": [ "type", "text", "url" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "phone" }, "text": { "type": "string", "minLength": 1, "maxLength": 25 }, "phone": { "type": "string", "pattern": "^\\+[1-9]\\d{6,14}$" } }, "required": [ "type", "text", "phone" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "quick_reply" }, "text": { "type": "string", "minLength": 1, "maxLength": 25 } }, "required": [ "type", "text" ], "additionalProperties": false }, { "type": "object", "properties": { "type": { "type": "string", "const": "request_contact_info" } }, "required": [ "type" ], "additionalProperties": false, "description": "Solicita el teléfono del destinatario. WhatsApp fija y traduce el texto; no admite text ni parámetros." } ] } } }, "additionalProperties": false }, "body": { "type": "string", "minLength": 1, "maxLength": 1024 }, "variables": { "maxItems": 20, "type": "array", "items": { "type": "object", "properties": { "key": { "type": "string", "pattern": "^[a-z][a-z0-9_]*$" }, "source": { "type": "string", "enum": [ "contact.first_name", "contact.name", "contact.phone", "contact.email", "organization.name" ] }, "sample": { "type": "string", "maxLength": 200 } }, "required": [ "key", "source", "sample" ], "additionalProperties": false } } }, "required": [ "inboxId", "name", "category", "language", "body", "variables" ], "additionalProperties": false}POST /templates/{id}/submit
Sección titulada «POST /templates/{id}/submit»Solicitar aprobación de Meta; administrador delegado, número conectado y ejemplos. Ante 202 consultar estados y operación; nunca reenviar con clave nueva..
Permiso: conversations:write. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
Idempotency-Key |
header | Sí | string; uuid |
Cuerpo application/json
Sección titulada «Cuerpo application/json»{ "type": "object", "additionalProperties": false}POST /conversations/{id}/uploads
Sección titulada «POST /conversations/{id}/uploads»Subir adjunto privado validado; capacidad vence en 15 minutos.
Permiso: messages:send. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
Idempotency-Key |
header | Sí | string; uuid |
Cuerpo multipart/form-data
Sección titulada «Cuerpo multipart/form-data»{ "type": "object", "required": [ "file" ], "properties": { "file": { "type": "string", "format": "binary" } }}POST /conversations/{id}/uploads/prepare
Sección titulada «POST /conversations/{id}/uploads/prepare»Reservar espacio y autorizar un solo objeto privado. Cuota compartida por organización: Semilla 1 GB, Cosecha 50 GB, Reino 100 GB; no se reinicia por ciclo. La reserva directa cubre el máximo del bucket mientras la autorización siga vigente..
Permiso: messages:send. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
Idempotency-Key |
header | Sí | string; uuid |
Cuerpo application/json
Sección titulada «Cuerpo application/json»{ "type": "object", "required": [ "filename", "mimeType", "size", "digest" ], "properties": { "filename": { "type": "string" }, "mimeType": { "type": "string" }, "size": { "type": "integer" }, "digest": { "type": "string", "description": "SHA-256 hexadecimal del archivo original" } }, "additionalProperties": false}POST /conversations/{id}/uploads/complete
Sección titulada «POST /conversations/{id}/uploads/complete»Verificar bytes, tamaño, digest y firma antes de permitir envío.
Permiso: messages:send. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
Cuerpo application/json
Sección titulada «Cuerpo application/json»{ "type": "object", "required": [ "uploadId" ], "properties": { "uploadId": { "type": "string", "format": "uuid" } }, "additionalProperties": false}POST /conversations/{id}/notes
Sección titulada «POST /conversations/{id}/notes»Nota privada, no respuesta de WhatsApp.
Permiso: conversations:write. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
Idempotency-Key |
header | Sí | string; uuid |
Cuerpo application/json
Sección titulada «Cuerpo application/json»{ "type": "object", "required": [ "content" ], "properties": { "content": { "type": "string", "maxLength": 4000 } }, "additionalProperties": false}GET /messages/{id}
Sección titulada «GET /messages/{id}»Mensaje exacto sujeto a permisos y retención.
Permiso: messages:read. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
GET /messages/{id}/media
Sección titulada «GET /messages/{id}/media»Ruta de descarga; download=1 transmite bytes con autorización actual.
Permiso: messages:read. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
download |
query | No | string; 1 |
GET /operations
Sección titulada «GET /operations»Consultar resultado tras timeout por Idempotency-Key.
Permiso: conversations:read. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
key |
query | Sí | string; uuid |
GET /operations/{id}
Sección titulada «GET /operations/{id}»Consultar resultado por operationId.
Permiso: conversations:read. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
GET /agents
Sección titulada «GET /agents»Configuración de agentes permitidos; administrador delegado.
Permiso: agents:manage. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
PATCH /agents/{id}
Sección titulada «PATCH /agents/{id}»Actualizar perfil, modelo permitido y activación.
Permiso: agents:manage. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
Cuerpo application/json
Sección titulada «Cuerpo application/json»{ "type": "object", "required": [ "name", "purpose", "businessContext", "behaviorRules", "businessFacts", "humanHandoffRules", "personalityTone", "modelId", "isActive" ], "properties": { "name": { "type": "string" }, "purpose": { "type": "string" }, "businessContext": { "type": "string" }, "behaviorRules": { "type": "string" }, "businessFacts": { "type": "string" }, "humanHandoffRules": { "type": "string" }, "personalityTone": { "type": "string" }, "modelId": { "type": "string" }, "isActive": { "type": "boolean" } }, "additionalProperties": false}GET /agents/{id}/knowledge
Sección titulada «GET /agents/{id}/knowledge»Estado de documentos comerciales.
Permiso: agents:manage. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
POST /agents/{id}/knowledge
Sección titulada «POST /agents/{id}/knowledge»Subir e indexar conocimiento; administrador delegado.
Permiso: agents:manage. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
Idempotency-Key |
header | Sí | string; uuid |
Cuerpo multipart/form-data
Sección titulada «Cuerpo multipart/form-data»{ "type": "object", "required": [ "file" ], "properties": { "file": { "type": "string", "format": "binary" } }}DELETE /agents/{id}/knowledge/{fileId}
Sección titulada «DELETE /agents/{id}/knowledge/{fileId}»Eliminar conocimiento autorizado.
Permiso: agents:manage. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
fileId |
path | Sí | string; uuid |
POST /agents/{id}/knowledge/prepare
Sección titulada «POST /agents/{id}/knowledge/prepare»Subida directa de documento con capacidad temporal de un objeto.
Permiso: agents:manage. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
Idempotency-Key |
header | Sí | string; uuid |
Cuerpo application/json
Sección titulada «Cuerpo application/json»{ "type": "object", "required": [ "filename", "mimeType", "size" ], "properties": { "filename": { "type": "string" }, "mimeType": { "type": "string" }, "size": { "type": "integer" } }, "additionalProperties": false}POST /agents/{id}/knowledge/{fileId}/complete
Sección titulada «POST /agents/{id}/knowledge/{fileId}/complete»Validar documento almacenado y encolar indexación.
Permiso: agents:manage. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
id |
path | Sí | string; uuid |
fileId |
path | Sí | string; uuid |
PATCH /connection
Sección titulada «PATCH /connection»Pausar o habilitar el módulo sin exponer credenciales.
Permiso: conversations:write. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
X-Dabar-Actor |
header | Sí | string; uuid; UUID del miembro externo, registrado por esta conexión. |
Cuerpo application/json
Sección titulada «Cuerpo application/json»{ "type": "object", "required": [ "enabled" ], "properties": { "enabled": { "type": "boolean" } }, "additionalProperties": false}GET /changes
Sección titulada «GET /changes»Referencias de cambios publicadas después del commit, sin textos.
Permiso: events:read. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
cursor |
query | No | integer; mín. 0 |
GET /snapshot
Sección titulada «GET /snapshot»Bootstrap de la proyección de conversaciones; principal de servidor.
Permiso: events:read. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
cursor |
query | No | string; Cursor opaco devuelto por la página anterior. |
limit |
query | No | integer; mín. 1; máx. 50 |
GET /resources/conversations/{id}
Sección titulada «GET /resources/conversations/{id}»Reconciliar recurso autorizado; principal de servidor.
Permiso: events:read. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
id |
path | Sí | string; uuid |
GET /resources/conversations/{id}/messages
Sección titulada «GET /resources/conversations/{id}/messages»Historial para reconciliación del servidor.
Permiso: events:read. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
id |
path | Sí | string; uuid |
cursor |
query | No | string; Cursor opaco devuelto por la página anterior. |
limit |
query | No | integer; mín. 1; máx. 50 |
GET /resources/messages/{id}
Sección titulada «GET /resources/messages/{id}»Reconciliar estado o retirada de mensaje.
Permiso: events:read. Autenticación: Bearer de servidor.
| Parámetro | Ubicación | Obligatorio | Contrato |
|---|---|---|---|
id |
path | Sí | string; uuid |
