Skip to content

Download an attachment

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

Streams an attachment of one of the project’s emails. The key comes from the attachments of the wait response.

key
required
string
>= 1 characters

Attachment key from the wait response.

The attachment bytes.

Media typeapplication/octet-stream
string format: binary
Content-Disposition
string

attachment; filename*=UTF-8''<file name>.

X-Content-Type-Options
string

Always nosniff.

Default Response

Media typeapplication/json

Error envelope returned by every JSON endpoint.

object
success
required
boolean
error
required
object
code
required

Machine-readable error code (snake_case).

string
message
required

Human-readable message.

string
details

Extra context for the error.

object
key
additional properties
Example
{
"success": false
}

Default Response

Media typeapplication/json

Error envelope returned by every JSON endpoint.

object
success
required
boolean
error
required
object
code
required

Machine-readable error code (snake_case).

string
message
required

Human-readable message.

string
details

Extra context for the error.

object
key
additional properties
Example
{
"success": false
}

Default Response

Media typeapplication/json

Error envelope returned by every JSON endpoint.

object
success
required
boolean
error
required
object
code
required

Machine-readable error code (snake_case).

string
message
required

Human-readable message.

string
details

Extra context for the error.

object
key
additional properties
Example
{
"success": false
}