Skip to content

Download an attachment

GET
/v1/attachments/{id}
curl --request GET \
--url https://api.inboxcnx.com/v1/attachments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \
--header 'Authorization: Bearer <token>'

Streams the bytes of one attachment of a stored message, to save or process the file. Take the URL from attachments[].downloadUrl on a message rather than building it. The content type is the one the sender declared.

Requires the read:messages scope.

id
required
string format: uuid

The bytes, streamed as a download (Content-Disposition: attachment)

Media type*/*
string format: binary

The credential lacks the read:messages scope, the Application requires a grant token (grant_token_required), or the credential is blocked

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

blob_not_found: no such blob for the caller, or its bytes are gone

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}

blob_too_large: the blob exceeds the download limit

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string

Example generated

{
"error": {
"code": "example",
"message": "example"
}
}