Skip to main content
Document Operations

Store a file in a document's file storage

<small>Requires an API token with the Document Manager role.</small>

POST
/documents/{document}/file-storage

Associates a previously uploaded file with the document referred to by the URL.

This endpoint requires a three-step upload process:

  1. Generate upload URL: Call the Create document file storage upload URL endpoint to get a presigned upload URL
  2. Upload file: Make a POST request to the returned URL with the specified form fields, followed by the file contents in a file field
  3. Associate uploaded file with document: Call this endpoint with file_upload_uuid set to the uuid received in step 1

The file will be available in the file storage of the document referred to in the URL.

For a complete guide with examples, see How to store a file in a document's file storage.

Authorizationstringheaderrequired

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

documentstringrequired

The document UUID

Body

application/json
file_namestringrequired

The name of the file being uploaded

Maximum string length: 255
Example: NDA_BigCorp.pdf
file_upload_uuidstringrequired

The UUID received in the Create document file storage upload URL response

Example: d16017e0-f60d-45b6-98cf-b1f41d0747fa

Response

application/json

StoredFileMinimalResource

dataobjectrequired