List email attachments
GET /emails/{email_id}/attachments
Returns a paginated list of attachments stored for one email belonging to the authenticated team. Use limit, after, and before to page through results; each entry includes filename, content type, byte size, optional inline content_id, and a short-lived signed download URL.
Send a full access API key as a bearer token in the Authorization header. A sending access key is refused.
| Name | Type | Required | Details |
|---|---|---|---|
email_id |
string | Yes | Format uuid. Matches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$. |
| Name | Type | Required | Details |
|---|---|---|---|
limit |
integer | No | 1 to 100. |
after |
string | No | Format uuid. Matches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$. |
before |
string | No | Format uuid. Matches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$. |
Status 200, a JSON object.
| Field | Type | Details |
|---|---|---|
object |
list |
|
has_more |
boolean | |
data |
array of object | |
data[].id |
string | Format uuid. Matches ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$. |
data[].filename |
string | |
data[].content_type |
string | |
data[].content_id |
string or null | |
data[].content_disposition |
string | One of inline, attachment. |
data[].download_url |
string | |
data[].expires_at |
string | Format date-time. Matches ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d:[0-5]\d\.\d{3}(?:Z))$. |
data[].size |
integer or null | 0 to 9007199254740991. |
Headers: x-request-id, ratelimit-limit, ratelimit-remaining, ratelimit-reset.
Each error answers with the status below and a JSON body naming the error. Every error has its own entry.
| Status | Names |
|---|---|
| 400 | validation_error |
| 401 | missing_api_key, validation_error, restricted_api_key |
| 403 | validation_error, restricted_api_key, suspended_api_key, terms_acceptance_required |
| 404 | not_found |
| 413 | validation_error |
| 415 | validation_error |
| 422 | validation_error, invalid_parameter |
| 429 | rate_limit_exceeded |
| 500 | application_error |
| 503 | service_unavailable |
Error headers: x-request-id, ratelimit-limit, ratelimit-remaining, ratelimit-reset, retry-after.
curl -X GET 'https://api.hermesmail.app/emails/<email_id>/attachments' \
-H "Authorization: Bearer $HERMESMAIL_API_KEY"