Uploading and Downloading Documents

To create a new document, do a multipart/form-data POST with parameters:

name of the file, to be used in download links
description of the file
file data (as from a file upload control in an HTML form)

An example, assuming you have a file ‘requirements.xls’ to upload:

% curl \
-F 'document[attached_file]=@requirements.xls' -F 'document[file_name]=requirements.xls'

This action is an exception to the general rule that submitted data should be JSON-encoded; multipart/form-data supports a binary or raw encoding, and is therefore more efficient on both network and CPU than submitting the attached_file as e.g. a Base64 encoded string in JSON.

To download an existing document, do a GET with ‘download’ or ‘thumbnail’ appended, like:

% curl
% curl

You can also attach links to Box, DropBox, and Google Drive documents using a json POST with a document parameter:

It contains the following options:

            one of “box”, “dropbox” or “google drive”

            the url given by Box, DropBox, or Google Drive as the sharable url for the document.


           name of the file, to be used in download links

description (optional)

           description of the file

icon_url ( applies only to – and is required by - DropBox attachments )

            link to the image preview which is supplied by DropBox

For example:

% curl \
       -d '{ "document": { "browse_url": "", "file_name": "FileName.doc",
"description": "A description", "type" : "box"  } }'
Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request