Skip to content

Download an attachment

GET
/attachments/{key}
curl --request GET \
--url https://api.clearance.rest/emails/attachments/1783459025000_1_invoice.pdf \
--header 'X-API-Key: <X-API-Key>'

Serves an attachment stored with an email. key is the last path segment of an attachment’s full_url in the get-email response.

key
required
string

Attachment key, the last segment of full_url.

The attachment bytes, with the content type it was stored with.

Media typeapplication/octet-stream
string format: binary

The X-API-Key header is missing or invalid.

Media typeapplication/json

Error envelope returned with a non-2xx status.

object
success
required
boolean
error
required

Human-readable error message.

string
Example
{
"success": false,
"error": "geçersiz API anahtarı"
}

No attachment with this key.

Media typetext/plain
string
Allowed value: not found