List Message Traces
Get message traces with filtering and pagination.
curl -X GET "http://localhost:8000/api/v1/traces?limit=10" \
-H "X-API-Key: your-api-key"
Query Parameters
Filter by status: sent, delivered, read, failed
Number of traces to return (max 500)
Response
{
"traces": [
{
"id": "trace_abc123",
"messageId": "3EB0ABC123...",
"instance": "my-whatsapp",
"to": "+1234567890",
"message": "Hello!",
"status": "delivered",
"sentAt": "2025-10-31T12:00:00Z",
"deliveredAt": "2025-10-31T12:00:05Z"
}
],
"total": 150,
"limit": 10,
"offset": 0
}
Get Specific Trace
curl -X GET http://localhost:8000/api/v1/traces/trace_abc123 \
-H "X-API-Key: your-api-key"
Response
{
"id": "trace_abc123",
"messageId": "3EB0ABC123...",
"instance": "my-whatsapp",
"to": "+1234567890",
"message": "Hello!",
"status": "delivered",
"sentAt": "2025-10-31T12:00:00Z",
"deliveredAt": "2025-10-31T12:00:05Z",
"readAt": "2025-10-31T12:01:00Z",
"payload": {
"headers": {},
"body": {}
}
}
Get Analytics
curl -X GET "http://localhost:8000/api/v1/traces/analytics?days=7" \
-H "X-API-Key: your-api-key"
Response
{
"period": {
"start": "2025-10-24T00:00:00Z",
"end": "2025-10-31T23:59:59Z"
},
"totalMessages": 1234,
"byStatus": {
"sent": 1000,
"delivered": 950,
"read": 800,
"failed": 50
},
"byInstance": {
"my-whatsapp": 800,
"discord-bot": 434
},
"byDay": [
{"date": "2025-10-24", "count": 150},
{"date": "2025-10-25", "count": 180}
]
}
Next Steps