Todos los endpoints requieren autenticación via API key. Base URL: https://vendaq-api.fly.dev/api/v1/public
/conversations Listar conversaciones con paginación y filtros.
Query params: page, limit, status, channel, from, to
{ data: [{ id, status, channel, summary, intent, startedAt, lastMessageAt, customerId, customerName }], meta: { page, limit, total } } curl -H "X-API-Key: vdq_live_xxx" "https://vendaq-api.fly.dev/api/v1/public/conversations?status=active&limit=10" /conversations/:id Obtener conversación con todos los mensajes.
{ data: { id, status, channel, ..., messages: [{ id, role, type, content, createdAt }] } } curl -H "X-API-Key: vdq_live_xxx" "https://vendaq-api.fly.dev/api/v1/public/conversations/UUID" /conversations/:id/messages Enviar un mensaje a una conversación.
{ "content": "Hola, tu pedido está en camino", "role": "agent" } { data: { id, conversationId, role, type, content, createdAt } } curl -X POST -H "X-API-Key: vdq_live_xxx" -H "Content-Type: application/json" -d '{"content":"Hola"}' "https://vendaq-api.fly.dev/api/v1/public/conversations/UUID/messages" /customers Listar clientes con búsqueda.
Query params: page, limit, search
{ data: [...], meta: { page, limit, total } } curl -H "X-API-Key: vdq_live_xxx" "https://vendaq-api.fly.dev/api/v1/public/customers?search=juan" /customers/:id Obtener cliente con conversaciones recientes.
{ data: { id, name, phone, email, ..., recentConversations: [...] } } curl -H "X-API-Key: vdq_live_xxx" "https://vendaq-api.fly.dev/api/v1/public/customers/UUID" /customers Crear cliente.
{ "name": "Juan Pérez", "phone": "+56912345678", "email": "[email protected]" } { data: { id, name, phone, email, createdAt, ... } } curl -X POST -H "X-API-Key: vdq_live_xxx" -H "Content-Type: application/json" -d '{"name":"Juan","phone":"+56912345678"}' "https://vendaq-api.fly.dev/api/v1/public/customers" /customers/:id Actualizar campos del cliente.
{ "name": "Juan P.", "tags": ["vip"] } { data: { ...updated customer } } curl -X PATCH -H "X-API-Key: vdq_live_xxx" -H "Content-Type: application/json" -d '{"name":"Juan P."}' "https://vendaq-api.fly.dev/api/v1/public/customers/UUID" /products Listar productos.
Query params: page, limit, search
{ data: [...], meta: { page, limit, total } } curl -H "X-API-Key: vdq_live_xxx" "https://vendaq-api.fly.dev/api/v1/public/products" /products/:id Obtener producto.
{ data: { id, title, description, price, currency, inStock, ... } } curl -H "X-API-Key: vdq_live_xxx" "https://vendaq-api.fly.dev/api/v1/public/products/UUID" /products Crear producto (source=api).
{ "title": "Camiseta Negra", "price": "19990", "currency": "CLP", "inStock": true } { data: { id, title, price, source: "api", ... } } curl -X POST -H "X-API-Key: vdq_live_xxx" -H "Content-Type: application/json" -d '{"title":"Camiseta","price":"19990"}' "https://vendaq-api.fly.dev/api/v1/public/products" /products/:id Actualizar producto.
{ "price": "14990", "inStock": false } curl -X PATCH -H "X-API-Key: vdq_live_xxx" -H "Content-Type: application/json" -d '{"price":"14990"}' "https://vendaq-api.fly.dev/api/v1/public/products/UUID" /products/:id Eliminar producto.
{ data: { id, deleted: true } } curl -X DELETE -H "X-API-Key: vdq_live_xxx" "https://vendaq-api.fly.dev/api/v1/public/products/UUID" /knowledge Listar chunks de conocimiento.
Query params: page, limit
{ data: [{ id, sourceType, content, createdAt }], meta: { page, limit, total } } curl -H "X-API-Key: vdq_live_xxx" "https://vendaq-api.fly.dev/api/v1/public/knowledge" /knowledge Agregar documento. Se divide automáticamente en chunks.
{ "content": "Texto largo del documento...", "sourceType": "document", "sourceId": "faq-v2" } { data: [...chunks], meta: { chunksCreated: N } } curl -X POST -H "X-API-Key: vdq_live_xxx" -H "Content-Type: application/json" -d '{"content":"..."}' "https://vendaq-api.fly.dev/api/v1/public/knowledge" /knowledge/:id Eliminar chunk de conocimiento.
{ data: { id, deleted: true } } curl -X DELETE -H "X-API-Key: vdq_live_xxx" "https://vendaq-api.fly.dev/api/v1/public/knowledge/UUID" /escalations Listar escalaciones.
Query params: page, limit, status
{ data: [{ id, question, category, urgency, status, createdAt }], meta: {...} } curl -H "X-API-Key: vdq_live_xxx" "https://vendaq-api.fly.dev/api/v1/public/escalations?status=pending" /escalations/:id/resolve Resolver escalación con respuesta.
{ "resolution": "El producto estará disponible el lunes." } curl -X POST -H "X-API-Key: vdq_live_xxx" -H "Content-Type: application/json" -d '{"resolution":"..."}' "https://vendaq-api.fly.dev/api/v1/public/escalations/UUID/resolve" /escalations/:id/cancel Cancelar escalación pendiente.
curl -X POST -H "X-API-Key: vdq_live_xxx" "https://vendaq-api.fly.dev/api/v1/public/escalations/UUID/cancel" /agent Obtener configuración actual del agente AI.
{ data: { id, profile, personality, rules, knowledgeSettings, version } } curl -H "X-API-Key: vdq_live_xxx" "https://vendaq-api.fly.dev/api/v1/public/agent" /agent Actualizar campos de configuración.
{ "profile": { "greeting": "¡Bienvenido!" }, "personality": { "formality": "usted" } } curl -X PATCH -H "X-API-Key: vdq_live_xxx" -H "Content-Type: application/json" -d '{"profile":{"greeting":"Hola"}}' "https://vendaq-api.fly.dev/api/v1/public/agent" /webhooks Listar webhooks registrados.
{ data: [{ id, url, events, active, createdAt }] } curl -H "X-API-Key: vdq_live_xxx" "https://vendaq-api.fly.dev/api/v1/public/webhooks" /webhooks Registrar webhook.
{ "url": "https://myapp.com/webhook", "events": ["message.received", "escalation.created"], "secret": "my_secret" } { data: { id, url, events, active, createdAt } } curl -X POST -H "X-API-Key: vdq_live_xxx" -H "Content-Type: application/json" -d '{"url":"https://myapp.com/wh","events":["message.received"]}' "https://vendaq-api.fly.dev/api/v1/public/webhooks" /webhooks/:id Eliminar webhook.
{ data: { id, deleted: true } } curl -X DELETE -H "X-API-Key: vdq_live_xxx" "https://vendaq-api.fly.dev/api/v1/public/webhooks/UUID" /analytics/summary Resumen de métricas por rango de fechas.
Query params: from, to (ISO dates, default últimos 30 días)
{ data: { period, conversations: { total, resolved, resolutionRate, avgResponseMs }, escalations: { total, resolved }, topIntents: [...] } } curl -H "X-API-Key: vdq_live_xxx" "https://vendaq-api.fly.dev/api/v1/public/analytics/summary?from=2026-01-01&to=2026-01-31"