GET
GET /inboxes/{inbox_id}/threads/search — Resend API
Resend APISearch the threads of an inbox
- Base URL
- https://api.resend.com
- Auth
- Authorization: Bearer <RESEND_API_KEY>
- Last verified
- 2026-10-20 · upstream hash matched
Actions Try in browser→
Agents: curl -H "Accept: text/markdown" this URL
→ 208 tokens · Vary: Accept
→ 208 tokens · Vary: Accept
Critical gotchas
All requests must include a User-Agent header (e.g. User-Agent: my-app/1.0) or the API returns HTTP 403.
cURL
curl -X GET 'https://api.resend.com/inboxes/inbox-id/threads/search?query=example-query&from=Acme+%3Conboarding%40resend.dev%3E&to=delivered%40resend.dev&cc=example&bcc=example&has_attachment=true&start_date=example-start-date&end_date=example-end-date&folders=example&labels=example&read=true&limit=10&after=example-after&before=example-before' \ -H "Authorization: Bearer $RESEND_API_KEY" \ -H 'User-Agent: my-app/1.0'
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| inbox_id | path | string | Yes | The Inbox ID or the inbox email address, such as `[email protected]`. A value that contains `@` must be a valid email address, and any other value must be a UUID, or the request returns a 422. The address match is case-insensitive and never falls back to the inbox `name`. An address that matches no inbox returns a 404. |
| query | query | string | No | Free text to search for in the subject, body, sender, recipients, and attachment names. Every word must match. Wrap words in double quotes to match an exact phrase. Start a word or quoted phrase with `-` to exclude it. Max 256 characters and 32 words. |
| from | query | string[] | No | Comma-separated senders. Each value matches part of the sender's address or name, without case. Returns threads that match any of them. Up to 20 values. Repeating the parameter returns a 422 validation_error. |
| to | query | string[] | No | Comma-separated recipients, matched the same way as `from`. Up to 20 values. Repeating the parameter returns a 422 validation_error. |
| cc | query | string[] | No | Comma-separated CC recipients, matched the same way as `from`. Up to 20 values. Repeating the parameter returns a 422 validation_error. |
| bcc | query | string[] | No | Comma-separated BCC recipients, matched the same way as `from`. Up to 20 values. Repeating the parameter returns a 422 validation_error. |
| has_attachment | query | boolean | No | `true` matches emails with an attachment. `false` matches emails without one. Only the literal values `true` and `false` are accepted. |
| start_date | query | string | No | Matches emails sent on or after this date. Accepts a date like `2026-09-01` or an ISO 8601 timestamp, in UTC unless the timestamp has an offset. An empty value returns a 422. |
| end_date | query | string | No | Matches emails sent on or before this date. Same formats as `start_date`. A date covers that whole day, so `start_date=2026-09-01&end_date=2026-09-30` covers all of September. A timestamp is used as given. An `end_date` before `start_date` returns a 422 validation_error. An empty value returns a 422. |
| folders | query | string[] | No | Comma-separated folders to search, for example `inbox,sent`. Repeating the parameter returns a 422 validation_error. A thread is returned when any of its emails is in one of the folders. Defaults to `inbox`, or to `inbox,archive,sent` when `labels` is set. `spam` and `trash` are only included when you name them. |
| labels | query | string[] | No | Comma-separated label IDs. Returns threads with any of these labels. Up to 50 IDs. An ID that does not exist in the inbox returns a 404. Repeating the parameter returns a 422 validation_error. |
| read | query | boolean | No | `true` returns threads where every email is read. `false` returns threads with at least one unread email. Only the literal values `true` and `false` are accepted. |
| limit | query | integer | No | Number of items to return. |
| after | query | string | No | Return items after this cursor. |
| before | query | string | No | Return items before this cursor. |
Response 200 OK
{
"object": "list",
"has_more": true,
"data": [
{
"id": "4d8e2a1c-9b3f-4c6d-8a21-3e5f7c9c0d12",
"subject": "Refund for order 1041",
"from": "[email protected]",
"to": [
"[email protected]"
],
"cc": [],
"bcc": [],
"labels": [
{
"id": "7f9c1d2e-4a6b-4c3d-8e15-9b0a7c6d5e34",
"name": "Urgent",
"color": "#E93D82"
}
],
"email_count": 2,
"has_attachment": true,
"has_draft": false,
"read": false,
"received_at": "2026-08-05T14:03:11.229Z",
"folder": "inbox",
"matched_email_id": "e8a3f1c6-2b9d-4e5a-a7c4-9d1b6f3e2a80"
}
]
} Get a free Resend API key → sponsored Affiliate link - we may earn a commission, at no extra cost to you.