Appearance
Get Attachment
GET /api/attachments/{id}
This endpoint returns the attachment for a specific id.
Attachment IDs are stored in the id
field of the attachments
array in the Search Inbox response.
Request
sh
curl --request GET \
--url https://api.mailisk.com/api/attachments/{id} \
--header 'Accept: application/json' \
--header 'X-Api-Key: {Api Key}'
Response
json
{
"data": {
"id": "6b3c85f7-7a52-43fd-a32c-c3eeccc8f04c",
"filename": "dummy.bin",
"content_type": "application/octet-stream",
"size": 1048576,
"expires_at": "Fri, 23 Jun 2025 02:29:13 GMT",
"download_url": "https://example.com.com/attachments/1750732153513_6b3c85f7-7a52-43fd-a32c-c3eeccc8f04c.bin"
}
}
Request
Path Params
Name | Description |
---|---|
id | The id of the attachment to get. |
Response
Typescript type
typescript
interface Attachment {
data: {
/** Unique identifier for the attachment */
id: string;
/** Filename of the attachment */
filename: string;
/** Content type of the attachment */
content_type: string;
/** Size in bytes of the attachment */
size: number;
/** The datetime when this attachment will be deleted */
expires_at: string | null;
/** The URL to the attachment */
download_url: string;
};
}