Download a message attachment
The bytes of one attachment on a message in this mailbox — the url a message lists. Fetched from the mail server on demand.
The file and its declared Content-Type were chosen by the sender. The response carries X-Content-Type-Options: nosniff and a locked-down Content-Security-Policy, and only raster images that a message embeds inline are served with an inline disposition; everything else is attachment. Treat the content as untrusted.
It takes the same scope as reading the conversation, because it serves only files attached to messages that scope already lets the caller read.
No existing API key can call this. The scope is opt-in only: a key or an OAuth connection holds it only if it was ticked by name when the credential was created or approved — the legacy full-access key and the "Full access" preset do not carry it.
Requires the mailbox-conversations:read scope — Read the conversations in your hosted mailboxes — every message and attachment people have sent you.
API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.
In: header
Path Parameters
Response Body
*/*
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/mailboxes/497f6eca-6276-4993-bfeb-53cbbbba6f08/attachments/497f6eca-6276-4993-bfeb-53cbbbba6f08""string"{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}{
"success": false,
"error": {
"message": "string",
"code": "string",
"details": {
"errors": [
null
]
}
}
}