Skip to main content
Version: 56.0.0

Upload a document's primary file

PUT 

/api/v1/documents/:id/primary-file/content

Replaces the document's current primary file with the request body's raw bytes. The entire body is the file: it is stored as-is, under any declared Content-Type, with no envelope or wrapper format to parse. Content-Type: multipart/form-data is rejected, since this operation defines no multipart variant. The body is limited to 24 MiB by default, the same limit as the primaryFile part of a multipart document creation, and an environment can configure a different limit.

Request​

Responses​

The primary file was replaced. The response has no body.