v1

latestOpenAPI 3.1.02026-08-066378446.6 KB
Document Operations

Store a file in a document's file storage

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

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 either PUT (deprecated) or POST request (depending on the "method" field) to the returned URL with the file contents and the specified headers/POST body fields
  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.

post/documents/{document}/file-storage

Path parameters

documentstring required

The document UUID

Request body

file_upload_uuidstring uuid required

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

file_namestring required

The name of the file being uploaded

Example request

{
  "file_upload_uuid": "d16017e0-f60d-45b6-98cf-b1f41d0747fa",
  "file_name": "NDA_BigCorp.pdf"
}

Response

StoredFileMinimalResource

Example response

{
  "data": {
    "uuid": "c3f8ca57-b1a4-4560-b3fe-5f3fffb333dd",
    "sha256": "697651f6ceea8a931289ff64cb62f78ceea5d36f7e84590fe9d5920b2dce52cf",
    "file_name": "NDA_BigCorp.pdf",
    "file_size": 544600,
    "mime_type": "application/pdf"
  }
}