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

Get a received email

One received email with its html, text, headers, authentication results and a signed link to the original message, plus BillionSend’s screening, verdicts, the extracted read and, where allowed, its verification code or sign-in link. Needs a full access key. An inbox-scoped key or an MCP token gets 403 email_quarantined for held mail, and 404 while it is being screened. 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/{id}
Autorização
AuthorizationToken Bearer · headerobrigatório

A BillionSend API key (bs_…).

Parâmetros de caminho
idstring<uuid>obrigatório
Parâmetros de consulta
html_formatstring

data_uri (default) inlines images the HTML references by cid: as data: URIs; cid leaves the cid: references, the parts being in attachments

Valores permitidos:data_uricid
Respostas
200

Received email

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, the sender's trust tier, why it was held, the inbound judge's reasons and scores (0-100), and whether hidden text was removed from what agents read

Mostrar propriedades
verdictstringobrigatório
Valores permitidos:pendingcleansuspiciousquarantinedreleased
sender_truststringobrigatório
Valores permitidos:ownerallowlistedknown_threadexternalunauthenticatedfailed
quarantine_reasonstring | nullobrigatório
Valores permitidos:failed_authunauthenticated_sendernot_allowlistedinjectionphishingvirusunscreenedscreening_capnull
reasonsstring[]obrigatório
injection_scoreinteger | nullobrigatório
phishing_scoreinteger | nullobrigatório
hidden_text_removedbooleanobrigatório
spam_scoreinteger | nullobrigatório

BillionSend extension: the local spam score, 0-100

virus_signaturestring | nullobrigatório

BillionSend extension: clamd's signature name when it failed

extracted_textstring | nullobrigatório

BillionSend extension: what a person sees of the reply, as text with light markdown: hidden text, invisible characters, quoted history and signature taken out. null once the content retention removed it

extractedobjectobrigatório

BillionSend extension: the verification code or sign-in link, served only from delivered mail of a sender that did not fail authentication, in an inbox that extracts codes. Links are never fetched.

Mostrar propriedades
kindsstring[]obrigatório
codestring | nullobrigatório
linkstring | nullobrigatório
link_domain_matches_senderboolean | nullobrigatório
ambiguousbooleanobrigatório
objectstringobrigatório
Valores permitidos:email
htmlstring | nullobrigatório
html_formatstringobrigatório
Valores permitidos:data_uricid
textstring | nullobrigatório
headersobject | nullobrigatório

Top-level headers, lowercase names; a repeated header's values joined by newlines

authenticationobjectobrigatório

pass, fail, gray, processing_failed or unknown, checked when the message arrived

Mostrar propriedades
spfstringobrigatório
dkimstringobrigatório
dmarcstringobrigatório
rawobject | nullobrigatório

The original RFC 822 message: a signed link valid for one hour that needs no API key. null once the content retention period removed the message.

Mostrar propriedades
download_urlstringobrigatório
expires_atstringobrigatório
401

Missing, malformed, unknown or revoked API key

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
403

Restricted API key, or the email is quarantined

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
404

Not found

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
422

Validation error

statusCodenumberobrigatório
namestringobrigatório
messagestringobrigatório
429

Over 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/497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Resposta
{
  "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",
    "quarantine_reason": "failed_auth",
    "reasons": [
      "string"
    ],
    "injection_score": 0,
    "phishing_score": 0,
    "hidden_text_removed": true
  },
  "spam_score": 0,
  "virus_signature": "string",
  "extracted_text": "string",
  "extracted": {
    "kinds": [
      "code"
    ],
    "code": "string",
    "link": "string",
    "link_domain_matches_sender": true,
    "ambiguous": true
  },
  "object": "email",
  "html": "string",
  "html_format": "data_uri",
  "text": "string",
  "headers": {
    "property1": "string",
    "property2": "string"
  },
  "authentication": {
    "spf": "string",
    "dkim": "string",
    "dmarc": "string"
  },
  "raw": {
    "download_url": "string",
    "expires_at": "string"
  }
}

Esta página foi útil?