Skip to content
Esc
↑↓navigate↵open⌘Jpreview

List attachments

The attachments and inline parts of one received email, each with a signed download link valid for one hour; all of them unless limit is given. Needs a full access key. The links of an email that carries malware answer 410.

GET/emails/receiving/{email_id}/attachments
Authorization
AuthorizationBearer token · headerrequired

A BillionSend API key (bs_…).

Path parameters
email_idstring<uuid>required
Query parameters
limitinteger

Page size, 1-100 (default 20)

min 1 · max 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.

Responses
200

Attachments

objectstringrequired
Allowed:list
has_morebooleanrequired
dataobject[]required
Show properties
Array of object
idstring<uuid>required
filenamestring
sizeintegerrequired
content_typestringrequired
content_dispositionstringrequired
Allowed:inlineattachment
content_idstring
download_urlstringrequired

Signed link to the file's bytes, valid for one hour; it needs no API key

expires_atstringrequired
401

Missing, malformed, unknown or revoked API key

statusCodenumberrequired
namestringrequired
messagestringrequired
403

Restricted API key

statusCodenumberrequired
namestringrequired
messagestringrequired
404

Not found

statusCodenumberrequired
namestringrequired
messagestringrequired
422

Validation error

statusCodenumberrequired
namestringrequired
messagestringrequired
429

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

statusCodenumberrequired
namestringrequired
messagestringrequired
Try it
Server
Authorization
Parameters
Request
curl -X GET 'https://api.billionsend.com/emails/receiving/497f6eca-6276-4993-bfeb-53cbbbba6f08/attachments' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json'
Response
{
  "object": "list",
  "has_more": true,
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "filename": "string",
      "size": 0,
      "content_type": "string",
      "content_disposition": "inline",
      "content_id": "string",
      "download_url": "string",
      "expires_at": "string"
    }
  ]
}

Was this page helpful?