---
title: "Search Threads"
method: POST
path: "/threads/search"
tags: ["Threads"]
---

# Search Threads

`POST /threads/search`

Search for threads.

This endpoint also functions as the endpoint to list all threads.

## Request body

- ThreadSearchRequest — Payload for listing threads.
  - `metadata` object — Thread metadata to filter on.
  - `values` object — State values to filter on.
  - `status` 'idle' | 'busy' | 'interrupted' | 'error' — Thread status to filter on.
  - `limit` integer — Maximum number to return.
  - `offset` integer — Offset to start from.

## Response `200`

Success

- Thread[]
  - `thread_id` string, uuid, required — The ID of the thread.
  - `created_at` string, date-time, required — The time the thread was created.
  - `updated_at` string, date-time, required — The last time the thread was updated.
  - `metadata` object, required — The thread metadata.
  - `status` 'idle' | 'busy' | 'interrupted' | 'error', required — The status of the thread.
  - `values` object — The current state of the thread.

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/xpert-ai/apis/agent-protocol.md) · [All operations](https://skmtc.net/xpert-ai/apis/agent-protocol/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/xpert-ai/agent-protocol/versions/ac9dbe16ea2f/schema)
