Skip to main content

Overview

This endpoint returns a paginated list of chat sessions for a site. Use it to:
  • Retrieve conversation history for a user
  • Track session activity over time
  • Monitor which sessions have active conversations
  • Recover session IDs for follow-up questions
A session groups messages from a single conversation context. You can have multiple sessions per user (e.g., one per channel or topic).

Authentication

Requires API key in the X-API-Key header:

Query parameters

email
string
Filter results to sessions with this user email. Optional.
limit
integer
Maximum number of sessions to return. Default: 50. Maximum: 500.
offset
integer
Number of sessions to skip (for pagination). Default: 0.

Request example

Response schema

sessions
array of objects
Array of session objects.
sessions[].id
string
The session ID.
sessions[].email
string
The user’s email address associated with this session.
sessions[].visitor_id
string
A unique identifier for the widget visitor (if chat came from the embedded widget).
sessions[].message_count
integer
Total number of messages in this session (both user and assistant).
sessions[].created_at
string (ISO 8601 timestamp)
When the session was first created.
sessions[].updated_at
string (ISO 8601 timestamp)
When the last message was sent in this session.
sessions[].closed_at
string (ISO 8601 timestamp)
When the session was closed. null if the session is still active.
pagination
object
Pagination metadata.
pagination.limit
integer
The limit used in the request.
pagination.offset
integer
The offset used in the request.
pagination.total
integer
Total number of sessions matching the filter (if any).

Response example

Error responses

400 Bad Request

Invalid query parameters.

401 Unauthorized

API key is missing, invalid, expired, or revoked.

403 Forbidden

The API key’s plan does not include M2M API access.

404 Not Found

The site does not exist.

500 Internal Server Error

An unexpected error occurred.

Implementation tips

Pagination

For sites with many sessions, use pagination to avoid large responses:

Finding a session by email

Retrieve all sessions for a user:

Analytics: session activity

Analyze session patterns:

Session timeout strategy

Manually close stale sessions using the session close endpoint: