Vexar API

Conversations & Leads

Read chat history, captured leads (contacts), and the messages of a conversation. Authentication required (site access).

GET /api/v1/sites/{id}/conversations Auth

List conversations (paginated) with last message and rating.

ParamTypeInDescription
pageintqueryPage (default 1)
per_pageintqueryPage size (default 20, max 100)
filterstringqueryall | operator | ai | closed
searchstringquerySearch visitor name/email/phone
periodstringqueryall | today | week | month
Response
{
  "success": true,
  "data": [ { "id": 50, "visitor_name": "Jane", "messages_count": 6, "mode": "ai", "status": "closed", "last_message": "…", "rating_score": 5 } ],
  "pagination": { "total": 320, "page": 1, "per_page": 20, "pages": 16 }
}
GET /api/v1/sites/{id}/leads Auth

List captured leads (deduplicated contacts), paginated.

Response
{
  "success": true,
  "data": [ { "id": 51, "visitor_name": "Bob", "visitor_email": "[email protected]", "visitor_phone": "+1…" } ],
  "pagination": { … }
}
GET /api/v1/conversations/{id}/messages Auth

Full message log of a conversation, plus ratings.

Response
{
  "success": true,
  "conversation": { … },
  "messages": [ { "id": 1, "role": "visitor", "content": "Hi", "created_at": "…" } ],
  "ratings": [ … ]
}