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
- 204
- 400
- 401
- 403
- 404
- 406
- 413
- 500
- 503
The primary file was replaced. The response has no body.
The request is invalid (invalid_request): the body or a parameter failed validation, or the multipart body or a request header is malformed. A body that is not valid JSON uses invalid_json.
The authentication credential is invalid or has expired (unauthorized).
The request has no authentication credential, or the user is not allowed to use the API (forbidden).
The addressed resource does not exist, or no route matches the request method and path (not_found).
The request does not accept any representation the operation can produce (not_acceptable).
The request content exceeds a size limit (payload_too_large).
An unexpected server error occurred (internal_error).
The service is temporarily unavailable, for example while it restarts (service_unavailable). Retry the request later.