Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Get messages from a lead
/backend/messages/{lead_id}
curl -X GET "https://api.leavo.ai/backend/messages/lead-uuid?limit=100" \ -H "Authorization: Bearer your_api_key_here"
const response = await fetch('https://api.leavo.ai/backend/messages/lead-uuid?limit=100', { headers: { 'Authorization': 'Bearer your_api_key_here' } });
{ "success": true, "data": [ { "id": "message-uuid-1", "content": "Hello, I would like information about the product", "role": "user", "type": "text", "timestamp": "2024-01-15T10:30:00Z", "status": "delivered" }, { "id": "message-uuid-2", "content": "Hello! Of course, I'd be happy to help...", "role": "assistant", "type": "text", "timestamp": "2024-01-15T10:30:05Z", "status": "delivered" }, { "id": "message-uuid-3", "content": null, "role": "user", "type": "image", "media_url": "https://storage.leavo.ai/messages/image.jpg", "timestamp": "2024-01-15T10:31:00Z", "status": "delivered" } ], "pagination": { "has_more": true, "oldest_timestamp": "2024-01-15T10:30:00Z" } }
pending
sent
delivered
read
failed