Skip to main content
POST
Reserve an attachment upload
Replace {your-subdomain} with your workspace’s subdomain.
Learn how to find your subdomain in Workspace subdomain.

Sending the file

The response tells you where to send the bytes. Send them with a PUT, carrying every header from upload_headers unchanged.
checksum is the base64-encoded MD5 digest, not the hex digest. The storage service verifies it, so a hex digest fails at step 2 rather than at step 1.
Send the headers from upload_headers rather than composing your own. Their values are covered by the upload signature, so an altered or missing one is refused. Which headers appear depends on how the workspace stores files, so read them from the response rather than hardcoding the set above.

Headers

X-Api-Key
string
default:your-api-key
required

Use the X-Api-Key header to provide your workspace API key. Refer to Authentication for more information.

Body

application/json
filename
string
required

Name the file should carry in the workspace.

Example:

"report.pdf"

byte_size
integer
required

Size of the file in bytes.

Example:

20481

checksum
string
required

Base64-encoded MD5 digest of the file, which is the form Content-MD5 takes. Not the hex digest. Generate it with openssl dgst -md5 -binary report.pdf | base64.

Example:

"Y2hlY2tzdW1leGFtcGxl"

content_type
string

Media type of the file. Inferred from the filename when omitted.

Example:

"application/pdf"

Response

Created - Upload reserved successfully

signed_id
string

Pass this to attachments on ticket or comment create once the file's bytes have been sent to upload_url. It is only accepted in the workspace that reserved it, and attaching it before the bytes arrive is rejected.

Example:

"eyJfcmFpbHMiOnsiZGF0YSI6IjEyMyJ9fQ=="

upload_url
string

Send the file's bytes here with an HTTP PUT. The URL is short-lived.

Example:

"https://neeto-desk.s3.amazonaws.com/3ieihu6erxcialumauhj1pqs07hr?X-Amz-Signature=..."

upload_headers
object

Headers the PUT must carry, exactly as given. Send them unchanged - the signature covers them, so an altered or missing header is refused by the storage service.

Example:
filename
string
Example:

"report.pdf"

content_type
string
Example:

"application/pdf"

byte_size
integer
Example:

20481

checksum
string
Example:

"Y2hlY2tzdW1leGFtcGxl"