Skip to navigation

Create Attachment

Beta
Create Attachment.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Headers

EARLY-ACCESSstringOptional

Set to true to access beta operations via /api/v3.

Request

This endpoint expects an object.
scratchFileIdstringRequired
ID of the ScratchFile to copy into the Attachment.
generateImagePreviewbooleanOptional
Whether to generate an image preview for the attachment. Defaults to false.
generatePdfPreviewbooleanOptional
Whether to generate a PDF preview for the attachment. Defaults to false.

Response

Created
__typenamestringOptional
createdAtstringOptional
creatorobject or nullOptional
downloadUrlstring or nullOptional

A pre-signed download URL. The URL may be null if the file did not upload successfully.

idstringOptional
mimeTypestringOptional

The MIME type of the file, e.g. ‘image/jpeg’

namestringOptional
uploadStatusenumOptional
Whether the attachment uploaded successfully, failed to upload or is still uploading.
Allowed values:

Errors

400
Attachment Create Request Bad Request Error
403
Attachment Create Request Forbidden Error
404
Attachment Create Request Not Found Error
409
Attachment Create Request Conflict Error
429
Attachment Create Request Too Many Requests Error
500
Attachment Create Request Internal Server Error