Sazabi
APISearch

Search messages

GET
/search/messages

Search messages within one project.

Query Parameters

projectId?string

Project to search within. Auto-filled from CLI and SDK context when omitted.

Formatuuid
query*string
Length1 <= length <= 500
limit?number

Maximum number of search results to return.

Range1 <= value <= 100
Default20
page?number

One-based page number.

Range1 <= value
Default1
threadId?string

Optional thread restriction for message search.

Formatuuid
role?string

Optional message role filter.

Value in

  • "user"
  • "assistant"

Response Body

application/json

curl -X GET "https://example.com/search/messages?query=string"
{  "messages": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "threadId": "51f72284-0555-48fe-a20a-4369ee94dc3e",      "threadTitle": "string",      "role": "user",      "content": "string",      "createdAt": "2019-08-24T14:15:22Z",      "updatedAt": "2019-08-24T14:15:22Z",      "highlights": [        "string"      ],      "score": 0    }  ],  "pagination": {    "page": 0,    "limit": 0,    "totalResults": 0,    "totalPages": 0  }}