> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crewship.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# List Threads

> List threads for a deployment

## Query Parameters

<ParamField query="deployment_id" type="string" required>
  Deployment ID to filter threads
</ParamField>

<ParamField query="status" type="string">
  Filter by status: `idle`, `busy`, `interrupted`, `error`
</ParamField>

<ParamField query="limit" type="number" default="20">
  Number of threads to return
</ParamField>

<ParamField query="offset" type="number" default="0">
  Offset for pagination
</ParamField>

## Response

<ResponseField name="threads" type="array">
  Array of thread objects
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.crewship.dev/v1/threads?deployment_id=dep_abc123" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "threads": [
      {
        "thread_id": "thr_xyz789abc",
        "deployment_id": "dep_abc123",
        "status": "idle",
        "metadata": {"user_id": "user_1"},
        "values": null,
        "created_at": "2024-01-15T10:35:00Z",
        "updated_at": "2024-01-15T10:35:00Z"
      }
    ]
  }
  ```
</ResponseExample>
