List conversations for a visitor

Fetch paginated list of conversations for a specific visitor with optional filters.

GET
/v1/conversations

Query Parameters

visitorId?string

Visitor ID to fetch conversations for.

page?number

Page number for pagination

Default1
Range1 <= value
limit?number

Number of conversations per page

Default6
Range1 <= value <= 100
status?string

Filter by conversation status

Value in"open" | "closed"
orderBy?string

Field to order conversations by

Default"updatedAt"
Value in"createdAt" | "updatedAt"
order?string

Order direction

Default"desc"
Value in"asc" | "desc"

Header Parameters

Authorization?string

Private API key in Bearer token format. Use this for server-to-server authentication. Format: Bearer sk_[live|test]_...

Match^Bearer sk_(live|test)_[a-f0-9]{64}$
X-Public-Key?string

Public API key for browser-based authentication. Can only be used from whitelisted domains. Format: pk_[live|test]_...

Match^pk_(live|test)_[a-f0-9]{64}$
X-Visitor-Id?string

Visitor ID from localStorage.

Match^[0-9A-HJKMNP-TV-Z]{26}$

Response Body

application/json

application/json

curl -X GET "https://api.cossistant.com/v1/v1/conversations"
{
  "conversations": [
    {
      "id": "string",
      "title": "string",
      "createdAt": "string",
      "updatedAt": "string",
      "visitorId": "string",
      "websiteId": "string",
      "status": "open",
      "deletedAt": null,
      "lastTimelineItem": {
        "id": "string",
        "conversationId": "string",
        "organizationId": "string",
        "visibility": "public",
        "type": "message",
        "text": "string",
        "tool": "string",
        "parts": [
          {
            "type": "text",
            "text": "string"
          }
        ],
        "userId": "string",
        "aiAgentId": "string",
        "visitorId": "string",
        "createdAt": "string",
        "deletedAt": "string"
      }
    }
  ],
  "pagination": {
    "page": 0,
    "limit": 0,
    "total": 0,
    "totalPages": 0,
    "hasMore": true
  }
}
{
  "error": "string"
}