GET /conversations
Lista conversaciones ordenadas por más recientes. Paginación cursor-based.
Scope requerido: conversations:read
Parámetros
| Parámetro | Tipo | Default | Descripción |
|---|
cursor | string | — | Cursor de la respuesta anterior |
limit | number | 50 | Resultados por página (máx 100) |
status | string | — | Filtrar por estado: open, pending, resolved, closed |
search | string | — | Buscar por nombre o teléfono del contacto |
Request
curl "https://api.waspytech.com/api/v2/conversations?limit=20&status=open" \
-H "Authorization: Bearer wspy_..."
Response 200
{
"data": [
{
"id": "conv-uuid",
"contactId": "contact-uuid",
"phoneNumberId": "channel-uuid",
"status": "open",
"assignedTo": "agent-uuid",
"lastMessageAt": "2026-04-13T14:32:00.000Z",
"lastMessagePreview": "Hola, quería consultar sobre mi pedido",
"lastMessageDirection": "inbound",
"lastMessageStatus": "delivered",
"serviceWindowExpiresAt": "2026-04-14T14:32:00.000Z",
"createdAt": "2026-04-10T10:00:00.000Z",
"contact": {
"id": "contact-uuid",
"phoneNumber": "+5491126032641",
"name": "María García"
}
}
],
"meta": { "requestId": "...", "cursor": "2026-04-13T14:32:00.000Z|conv-uuid", "hasMore": true }
}
GET /conversations/by-phone/:phone
Buscar una conversación por número de teléfono.
Scope requerido: conversations:read
curl "https://api.waspytech.com/api/v2/conversations/by-phone/5491126032641" \
-H "Authorization: Bearer wspy_..."
Este endpoint maneja variantes de números argentinos automáticamente (54 vs 549, con o sin +).
GET /conversations/:id
Obtener una conversación por ID.
Scope requerido: conversations:read
PATCH /conversations/:id
Actualizar estado o asignación de una conversación.
Scope requerido: conversations:write
Body (todos opcionales)
| Campo | Tipo | Descripción |
|---|
status | string | open, pending, resolved, closed |
assignedTo | string | null | UUID del agente, o null para desasignar |
Request
curl -X PATCH https://api.waspytech.com/api/v2/conversations/CONV_ID \
-H "Authorization: Bearer wspy_..." \
-H "Content-Type: application/json" \
-d '{
"status": "resolved",
"assignedTo": null
}'
GET /conversations/:id/messages
Listar mensajes de una conversación. Paginación cursor-based, orden: más antiguos primero.
Scope requerido: conversations:read
Parámetros
| Parámetro | Tipo | Default | Descripción |
|---|
cursor | string | — | Cursor de la respuesta anterior |
limit | number | 50 | Resultados por página (máx 100) |
curl "https://api.waspytech.com/api/v2/conversations/CONV_ID/messages?limit=50" \
-H "Authorization: Bearer wspy_..."
Response
{
"data": [
{
"id": "msg-uuid",
"conversationId": "conv-uuid",
"direction": "inbound",
"type": "text",
"content": { "text": "Hola, quería consultar sobre mi pedido" },
"status": "delivered",
"waMessageId": "wamid.xxx",
"createdAt": "2026-04-13T14:32:00.000Z"
}
],
"meta": { "requestId": "...", "cursor": "...", "hasMore": false }
}