Get attachment with download URL
Retrieves attachment metadata along with a pre-signed, time-limited download URL. The URL expires at the time indicated by `download_url_expires_at`.
Authorization
BearerAuth AuthorizationBearer <token>
API key passed as a Bearer token. Production keys start with
am_live_ and sandbox keys start with am_test_.
In: header
Path Parameters
attachment_id*string
The unique attachment ID (prefixed with att_).
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://secureagentmail.com/api/v1/attachments/string"{
"id": "att_f2g7h3",
"message_id": "msg_x7k9m2",
"filename": "invoice.pdf",
"content_type": "application/pdf",
"size_bytes": 245760,
"scan_status": "clean",
"created_at": "2026-02-25T10:15:00Z",
"download_url": "https://storage.agentmail.io/att_f2g7h3?token=abc123&expires=1740600000",
"download_url_expires_at": "2026-02-25T11:15:00Z"
}{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key.",
"status": 401
}
}{
"error": {
"code": "not_found",
"message": "The requested resource was not found.",
"status": 404
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded. Please retry after 30 seconds.",
"status": 429
}
}