Skip to main content
POST
Search Sessions
Deprecated. This endpoint is deprecated and will be sunset on 2026-07-11. It still works until then. Migrate to the V1 path — see the migration guide for the old -> new path table.
Search across all sessions to find matches based on string content in session data.

Base URL

Search Sessions

Path Parameters

string
required
The ID of your project

Request Headers

string
required
Bearer token authentication using your Project API Key (starts with sk_). Format: Bearer {your-api-key}

Request Body

string
required
The string to search for in session data. This will match against all session content including variables, messages, and other stored information.
number
Maximum number of results to return. Default: 50
number
Number of results to skip for pagination. Default: 0

Response

array
Array of matching sessions, ordered by most recently updated first
object
Pagination information

Example

Request

Response

Usage Notes

  • Search String: The search is case-sensitive and matches against the entire JSON content of the session data
  • Ordering: Results are ordered by updatedAt in descending order (most recent first)
  • Pagination: Use limit and offset to paginate through large result sets
  • Performance: For large datasets, consider using more specific search strings to improve query performance

Error Responses

Example error responses: 400 Bad Request:
401 Unauthorized: