Inbound Emails
Download Attachment
Downloads a single attachment from an inbound message by its zero-based index. Returns the binary attachment content with the appropriate Content-Type and Content-Disposition headers.
GET
This endpoint uses a standard project API key (
AS_ prefix). It streams the raw binary content of a single attachment, identified either by its zero-based index from the message’s attachments array or by its attachmentId. Response headers carry Content-Type and Content-Disposition: attachment; filename="…".Authorizations
Project API key header of the form Bearer
as_<key>. You can also pass the key via the x-api-key header.Path Parameters
The unique identifier of the inbound message. The message must belong to the authenticated project.Example:
"60d5ec49f1b2c72d9c8b1234"Identifies the attachment to download. Accepts either a zero-based index into the message’s
attachments array (e.g. 0) or the attachment’s attachmentId (e.g. att_60d5ec49f1b2c72d9c8b9999).Example: 0Response
Attachment streamed successfully. The body is the raw binary content; theContent-Type and Content-Disposition response headers describe the file.
Error Responses
Returned when
id is not valid or idx is neither a non-negative integer nor a valid attachmentId.Returned when the message does not exist or does not belong to the authenticated project.
Returned when no attachment exists at the given index.