Skip to main content
Downloads a file attached to a message. Get the attachment IDs from the attachments of each message in List messages.
The API does not send the file itself. It responds 302 with a Location header that points to a download link, valid for 5 minutes. Follow the redirect to get the file.
  • Your API key is checked on every call, so a saved response never holds a link that keeps working.
  • Do not send the Authorization header to the redirected host. curl and fetch drop it across hosts by default.
  • Each call counts toward the rate limit.

Authentication

Bearer token in the Authorization header. A read-only key is enough. See Authentication.

Path parameters

string
required
Attachment ID prefixed with ea_.

Response

302 Found with no body.
header
The download link. Valid for 5 minutes. Call the endpoint again for a new one.
The filename, content type and size are on the message’s attachment.

Examples

Download a file

Response

Error responses

See Errors for the full error envelope reference.