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
Authentication
Requires API key in theX-API-Key header:
Query parameters
string
Filter results to sessions with this user email. Optional.
integer
Maximum number of sessions to return. Default: 50. Maximum: 500.
integer
Number of sessions to skip (for pagination). Default: 0.
Request example
Response schema
array of objects
Array of session objects.
string
The session ID.
string
The user’s email address associated with this session.
string
A unique identifier for the widget visitor (if chat came from the embedded widget).
integer
Total number of messages in this session (both user and assistant).
string (ISO 8601 timestamp)
When the session was first created.
string (ISO 8601 timestamp)
When the last message was sent in this session.
string (ISO 8601 timestamp)
When the session was closed.
null if the session is still active.object
Pagination metadata.
integer
The limit used in the request.
integer
The offset used in the request.
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:Related endpoints
- M2M Chat (Sync) — Send a message in a session
- M2M Chat (Async) — Async message in a session
- M2M Chat Feedback — Rate a response
- M2M Site Statistics — Session metrics