Attachments
Retrieve an attachment
Inspect validation, retention, and expiry without exposing private storage details.
GET
/api/v1/attachments/{attachmentId}On this page
Authentication
Send a RouteKite API key as a Bearer token. This endpoint requires the email:send scope.
| Name | Type | Requirement | Description |
|---|---|---|---|
Authorization | string | Required | Bearer API key with the required workspace scope.Example: Bearer rk_your_key |
Path parameters
| Name | Type | Requirement | Description |
|---|---|---|---|
attachmentId | uuid | Required | The attachment identifier.Example: c6ea638c-28a4-4b0c-a39d-74f1d29e1e9f |
Response
| Name | Type | Requirement | Description |
|---|---|---|---|
id | uuid | Always | The attachment identifier. |
object | string | Always | Always attachment. |
filename | string | Ready response | The validated filename. |
content_type | string | Ready response | The validated MIME type. |
size_bytes | integer | Ready response | The validated byte size. |
status | enum | Always | pending, ready, rejected, expired, or deleted. |
retention | enum | Always | auto_delete or keep. |
expires_at | date-time | null | Always | Automatic deletion date when applicable. |
Lifecycle
Confirm that an attachment is ready before sending. The response never exposes a private storage path or public download URL.
Errors
| Status | Code | What it means | What to do |
|---|---|---|---|
| 400 | INVALID_REQUEST | Attachment metadata is invalid. | Confirm filename, type, size, and digest. |
| 401 | UNAUTHORIZED | The API key is invalid. | Check the Bearer header. |
| 403 | FORBIDDEN | The key cannot manage attachments. | Use email:send access. |
| 404 | ATTACHMENT_NOT_FOUND | The attachment is unavailable in this workspace. | Check the ID and workspace. |
| 410 | ATTACHMENT_EXPIRED | The upload instruction or file expired. | Prepare a new upload. |
| 413 | STORAGE_LIMIT_EXCEEDED | The account cannot reserve this file. | Remove unused files and retry. |
| 422 | ATTACHMENT_TYPE_UNSUPPORTED | The format is not accepted. | Use a supported format. |
| 422 | ATTACHMENT_INVALID | The bytes do not match the prepared metadata. | Recalculate and upload the exact file. |
| 500 / 503 | ATTACHMENT_UNAVAILABLE | The operation could not complete. | Retry after a short delay. |