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
Filter results to sessions with this user email. Optional.
Maximum number of sessions to return. Default: 50. Maximum: 500.
Number of sessions to skip (for pagination). Default: 0.
Request example
Response schema
Array of session objects.
The session ID.
The user’s email address associated with this session.
A unique identifier for the widget visitor (if chat came from the embedded widget).
Total number of messages in this session (both user and assistant).
When the session was first created.
When the last message was sent in this session.
When the session was closed.
null if the session is still active.Pagination metadata.
The limit used in the request.
The offset used in the request.
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