# GET /api/v1/inboxes/:id/threads/search?q=invoice

Auth: Bearer

HTML: https://cooperemail.com/docs/reference/search-threads

## Summary

Threads in this inbox with at least one message matching q (subject, extracted_text, from, or to). Ordered by the best match. limit is 1–50 (default 20). Empty q returns 400 missing_query. Thread ids are thr_…, so this static search path does not hide a real thread.

## Query

```json
?q=invoice&limit=20
```

## Response

The OpenAPI document does not declare a JSON response schema for this call. The summary is the contract.

## Errors

- HTTP 400 missing_query

The live `message` is the sentence for that code. Branch on `code`.

```json
{
  "error": {
    "type": "invalid_request",
    "code": "missing_query",
    "docs_url": "https://cooperemail.com/docs#missing_query"
  }
}
```

## Idempotency

This route does not document Idempotency-Key or client_id.
