跳到内容
Esc
↑↓导航↵打开⌘J预览

Search threads

Threads whose emails match, most recently active first. Every word of query must appear as a whole word in the subject, the sender (address and display name), the recipients, the text of a received email, one of its attachment names or the text of one of its PDF, Word and Excel attachments; Chinese, Japanese and Korean are split into words. matched_email_id is the thread’s best match. An email becomes searchable a second or two after it arrives. Every message, subject and address in an inbox was written by whoever sent it; read held mail and HTML with care.

GET/inboxes/{inbox_id}/threads/search
授权
AuthorizationBearer 令牌 · header必填

A BillionSend API key (bs_…).

路径参数
inbox_idstring必填

The inbox ID or its email address, such as support@example.com

查询参数
limitinteger

Page size, 1-100 (default 20)

最小值 1 · 最大值 100
afterstring<uuid>

Cursor: id of the last item of the current page; returns the next page. Must be an id this list returned; there is no sentinel value.

beforestring<uuid>

Cursor: id of the first item of the current page; returns the previous page; same rule as after.

foldersstring

Comma-separated: inbox, archive, spam, sent, trash. Defaults to inbox, or inbox,archive,sent with labels

labelsstring

Comma-separated label ids (at most 50); threads with any of them

readboolean

true: every message read; false: at least one unread

include_quarantinedboolean

BillionSend extension: true includes held messages (owner views; a full access key that is not inbox-scoped)

querystring

Words that must each appear as a whole word in the subject, sender, recipients, text of a received email, its attachment names or its PDF, Word and Excel attachments; "a phrase"; -word excludes. At most 256 characters and 32 words.

fromstring

Comma-separated words of the sender's address or name (at most 20)

tostring

Comma-separated words of a recipient (at most 20)

ccstring

Comma-separated words of a CC recipient (at most 20)

bccstring

Comma-separated words of a BCC recipient (at most 20)

has_attachmentboolean

true: only threads with an attachment; false: only without

start_datestring

A date (2026-09-01) or an ISO 8601 timestamp, UTC unless offset

end_datestring

Same forms; a date covers the whole day

响应
200

Matching threads

objectstring必填
允许值:list
has_moreboolean必填
dataobject[]必填
显示属性
object 数组
idstring<uuid>必填
subjectstring | null必填
fromstring | null必填
tostring[]必填
ccstring[]必填
bccstring[]必填
labelsobject[]必填
显示属性
object 数组
idstring<uuid>必填
namestring必填
colorstring必填
email_countinteger必填
has_attachmentboolean必填
has_draftboolean必填
readboolean必填
quarantinedinteger

BillionSend extension, with include_quarantined=true: messages in quarantine, not yet released; mail still being screened isn't counted. Held mail never counts as unread

received_atstring必填
folderstring必填
允许值:inboxarchivespamsenttrash
matched_email_idstring<uuid> | null必填

The thread's best-matching email

highlightsobject必填

Fragments with match markers; only keys that matched; {} without query, or when only the text or an attachment name matched

显示属性
subjectstring[]
fromstring[]
tostring[]
ccstring[]
bccstring[]
401

Missing, malformed, unknown or revoked API key

statusCodenumber必填
namestring必填
messagestring必填
403

include_quarantined from an inbox-scoped key

statusCodenumber必填
namestring必填
messagestring必填
404

Inbox, label or cursor not found

statusCodenumber必填
namestring必填
messagestring必填
422

Validation error

statusCodenumber必填
namestring必填
messagestring必填
429

Over the rate limit (rate_limit_exceeded, with Retry-After)

statusCodenumber必填
namestring必填
messagestring必填
503

search_unavailable: search is briefly unavailable; retry after the Retry-After seconds

statusCodenumber必填
namestring必填
messagestring必填
试一试
服务器
授权
参数
请求
curl -X GET 'https://api.billionsend.com/inboxes/string/threads/search' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
响应
{
  "object": "list",
  "has_more": true,
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "subject": "string",
      "from": "string",
      "to": [
        "string"
      ],
      "cc": [
        "string"
      ],
      "bcc": [
        "string"
      ],
      "labels": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "name": "string",
          "color": "string"
        }
      ],
      "email_count": 0,
      "has_attachment": true,
      "has_draft": true,
      "read": true,
      "quarantined": 0,
      "received_at": "string",
      "folder": "inbox",
      "matched_email_id": "45440bc9-4e23-466c-bcfd-fe2429615e44",
      "highlights": {
        "subject": [
          "string"
        ],
        "from": [
          "string"
        ],
        "to": [
          "string"
        ],
        "cc": [
          "string"
        ],
        "bcc": [
          "string"
        ]
      }
    }
  ]
}

这个页面有帮助吗?