Download an attachment
GET
/emails/attachments/{key}
const url = 'https://api.clearance.rest/emails/attachments/example';const options = {method: 'GET', headers: {'X-API-Key': '<X-API-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”key
required
string
Attachment key from the wait response.
Responses
Section titled “Responses”The attachment bytes.
Media typeapplication/octet-stream
string format: binary
Headers
Section titled “Headers”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}