Skip to main content
POST
/
threads
/
search
Search Threads
curl --request POST \
  --url https://api.example.com/threads/search \
  --header 'Content-Type: application/json' \
  --data '
{
  "metadata": {},
  "status": "<string>",
  "limit": 20,
  "offset": 0,
  "order_by": "created_at DESC"
}
'
[
  {
    "thread_id": "<string>",
    "user_id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "status": "idle",
    "metadata": {}
  }
]

Documentation Index

Fetch the complete documentation index at: https://docs.aegra.dev/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json

Request model for thread search

metadata
Metadata · object

Metadata filters

status
string | null

Thread status filter (idle, busy, interrupted, error)

limit
integer | null
default:20

Maximum results

Required range: 1 <= x <= 100
offset
integer | null
default:0

Results offset

Required range: x >= 0
order_by
string | null
default:created_at DESC
deprecated

DEPRECATED: use sort_by + sort_order. Legacy single-field form, e.g. 'updated_at ASC'.

sort_by
enum<string> | null

Field to sort by (SDK-compatible). Takes precedence over order_by.

Available options:
thread_id,
status,
created_at,
updated_at
sort_order
enum<string> | null

Sort direction (SDK-compatible). Defaults to 'desc' when sort_by is set.

Available options:
asc,
desc

Response

Successful Response

thread_id
string
required

Unique identifier for the thread.

user_id
string
required

Identifier of the user who owns this thread.

created_at
string<date-time>
required

Timestamp when the thread was created.

updated_at
string<date-time>
required

Timestamp when the thread was last updated.

status
string
default:idle

Current thread status: idle, busy, interrupted, or error.

metadata
Metadata · object

Arbitrary metadata attached to the thread.