Download a retained attachment
GET/api/messages/:id/attachments/:attachmentId
x-audience: "management"
x-required-scope: "messages:read"
Streams a retained attachment while the account's current retention policy permits access. Requires the account's messages:read scope or a signed-in session. The response uses a safe Content-Disposition filename and private, no-store caching.
Request
Responses
- 200
- 401
- 403
- 404
- 410
- 429
- 503
Attachment bytes.
Missing, invalid or revoked credentials.
Required API key scope is missing.
Message or attachment not found.
Attachment content is no longer available under the current retention policy.
Shared client-IP or account request allowance exhausted. Retry after the indicated number of seconds. Browser authentication errors can use a different response format.
Response Headers
Cache-Control
no-store
Retry-After
Seconds to wait before retrying.
Request limiting cannot be enforced. Retry later with backoff.
Response Headers
Cache-Control
no-store