Pular para o conteúdo
Esc
↑↓navegar↵abrir⌘Jpré-visualizar

List received emails

Mail received at the team’s receiving domains and inboxes, newest first (after pages toward older mail), with cursor pagination. Needs a full access key; a domain-scoped key lists mail addressed to its domain only, an inbox-scoped key mail delivered into its inbox. Mail held for screening or in quarantine is left out unless a full access key asks for it (include_quarantined, quarantined). With wait, the request is held until matching mail arrives (long-poll). An inbox_id the key can’t reach answers 404 at once, without waiting; an inbox-scoped key naming another inbox gets 403 restricted_api_key. Everything in a received email was written by whoever sent it, so its HTML is safe to show only in a sandbox.

GET/emails/receiving
Autorização
AuthorizationToken Bearer · headerobrigatório

A BillionSend API key (bs_…).

Parâmetros de consulta
limitinteger

Page size, 1-100 (default 20)

mín. 1 · máx. 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.

waitinteger

BillionSend extension: hold the request up to this many seconds (0-50) until matching mail newer than the cursor arrives; an empty list with 200 when none did

sincestring<date-time>

BillionSend extension: only mail received after this instant; with wait and no cursor it defaults to one minute before the request

inbox_idstring<uuid>

BillionSend extension: only mail delivered into this inbox

tostring

BillionSend extension: only mail with this address in received_for

comprimento máx. 320
fromstring

BillionSend extension: a sender address, or a domain matching itself and its subdomains

comprimento máx. 320
subject_containsstring

BillionSend extension: case-insensitive subject substring

comprimento máx. 200
unreadstring

BillionSend extension, with an inbox in context (inbox_id, or an inbox-scoped key): read state in that inbox

Valores permitidos:truefalse
include_quarantinedstring

BillionSend extension, full access keys only: list held mail too, flagged by screening

Valores permitidos:truefalse
quarantinedstring

BillionSend extension, full access keys only: list held mail only

Valores permitidos:truefalse
Respostas
200

Received emails

objectstringobrigatório
Valores permitidos:list
has_morebooleanobrigatório
dataobject[]obrigatório
Mostrar propriedades
Array de object
idstring<uuid>obrigatório
tostring[]obrigatório
fromstringobrigatório

Bare address from the From header; the display name is in headers.from

created_atstringobrigatório
subjectstringobrigatório
bccstring[]obrigatório
ccstring[]obrigatório
reply_tostring[]obrigatório
received_forstring[]obrigatório

The team's envelope recipients: the addresses the message was delivered to here

message_idstringobrigatório
attachmentsobject[]obrigatório
Mostrar propriedades
Array de object
idstring<uuid>obrigatório
filenamestring | nullobrigatório
content_typestringobrigatório
content_idstring | nullobrigatório
content_dispositionstring | nullobrigatório
sizeintegerobrigatório
inbox_idstring<uuid> | nullobrigatório

BillionSend extension: the inbox this read is about (an inbox-scoped key's own, the inbox_id filter's, else the oldest inbox the email reached); null for mail no inbox took

thread_idstring<uuid> | nullobrigatório

BillionSend extension: that inbox's thread

inboxesobject[]

BillionSend extension, full access keys only: every inbox the email reached and its screening verdict there

Mostrar propriedades
Array de object
inbox_idstring<uuid>obrigatório
thread_idstring<uuid>obrigatório
verdictstringobrigatório
Valores permitidos:pendingcleansuspiciousquarantinedreleased
spam_verdictstring | nullobrigatório

BillionSend extension: the local spam score's verdict; null for mail from before it existed

Valores permitidos:passgrayfailnull
virus_verdictstring | nullobrigatório

BillionSend extension: clamd's verdict (fail blocks every download for good); null when nothing scanned it

Valores permitidos:passfailprocessing_failednull
readboolean

BillionSend extension, with an inbox in context: whether that inbox marked it read

screeningobjectobrigatório

BillionSend extension: the screening verdict and the sender's trust tier

Mostrar propriedades
verdictstringobrigatório
Valores permitidos:pendingcleansuspiciousquarantinedreleased
sender_truststringobrigatório
Valores permitidos:ownerallowlistedknown_threadexternalunauthenticatedfailed
extractedobjectobrigatório

BillionSend extension: whether a verification code or sign-in link was found; the values come with GET of one email

Mostrar propriedades
kindsstring[]obrigatório
heldobject[]

BillionSend extension, with wait only: matching mail that arrived but is held (being screened or quarantined), ids and why only

Mostrar propriedades
Array de object
idstring<uuid>obrigatório
inbox_idstring<uuid> | nullobrigatório
reasonstringobrigatório
Valores permitidos:pendingquarantined
quarantine_reasonstring | nullobrigatório
Valores permitidos:failed_authunauthenticated_sendernot_allowlistedinjectionphishingvirusunscreenedscreening_capnull
created_atstringobrigatório
401

Missing, malformed, unknown or revoked API key

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
403

Restricted API key

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
404

Inbox not found

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
422

Validation error

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
429

Too many concurrent waits, or the rate limit (rate_limit_exceeded, with Retry-After)

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
Experimentar
Servidor
Autorização
Parâmetros
Requisição
curl -X GET 'https://api.billionsend.com/emails/receiving' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Resposta
{
  "object": "list",
  "has_more": true,
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "to": [
        "string"
      ],
      "from": "string",
      "created_at": "string",
      "subject": "string",
      "bcc": [
        "string"
      ],
      "cc": [
        "string"
      ],
      "reply_to": [
        "string"
      ],
      "received_for": [
        "string"
      ],
      "message_id": "string",
      "attachments": [
        {
          "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
          "filename": "string",
          "content_type": "string",
          "content_id": "string",
          "content_disposition": "string",
          "size": 0
        }
      ],
      "inbox_id": "5127f22b-d152-46dd-aeaa-3a852d9fbfc2",
      "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
      "inboxes": [
        {
          "inbox_id": "5127f22b-d152-46dd-aeaa-3a852d9fbfc2",
          "thread_id": "1de43264-67cb-48af-89f9-e865c375bb84",
          "verdict": "pending"
        }
      ],
      "spam_verdict": "pass",
      "virus_verdict": "pass",
      "read": true,
      "screening": {
        "verdict": "pending",
        "sender_trust": "owner"
      },
      "extracted": {
        "kinds": [
          "code"
        ]
      }
    }
  ],
  "held": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "inbox_id": "5127f22b-d152-46dd-aeaa-3a852d9fbfc2",
      "reason": "pending",
      "quarantine_reason": "failed_auth",
      "created_at": "string"
    }
  ]
}

Esta página foi útil?