Documents

Add a version to an existing document, as raw bytes

The large-file counterpart of documents_add_version. The document keeps its id, its type and its metadata; the new bytes become the current version and are reprocessed.

post/api/v1/documents/{id}/versions

Request

  • Base URL: https://api.custodo.ai
  • URL: https://api.custodo.ai/api/v1/documents/{id}/versions
  • Auth: HTTP bearer

Path parameters

idstring uuid required

Query parameters

filenamestring required

With its extension. The file type is decided by the BYTES, not by this.

contentTypestring

A hint only, for a client that can only send application/octet-stream.

Headers

X-Tenant-Idstring uuid

The organisation to act in. An API key is bound to exactly one, so this is optional for a key and must match the one it was minted for.

Response

Nothing was filed by this request: an Idempotency-Key replay (this exact file was already filed under that key), or — with skipDuplicates=true — the document whose current file already has these exact bytes, returned with duplicate: true.

oktrue required

Changes

No recorded changes to this operation across all 1 revision of this API.