Documents

Correct a document’s title, type or direction

Renames a document, retypes it, or fixes its in_entrata / in_uscita direction — the archive is flat and has no folders, so retyping is how a misfiled document moves. Retyping WIPES the old type’s extracted fields (they answered a different schema) and, on a tenant with AI extraction, queues a fresh extraction against the new type; poll documents_get afterwards to read the result. To correct individual field VALUES without changing the type, use documents_update_metadata instead.

patch/api/v1/rest/documents/{id}

Request

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

Path parameters

idstring uuid required

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.

Request body

titlestring
type_idstring uuid

A type id from documents_list_types. Retyping re-runs extraction (see above).

direction'in_entrata' | 'in_uscita' nullable

Only meaningful for a type that requires one. null clears it, which only a type that does NOT require a direction will accept.

Response

Done. data is the tool’s own answer.

oktrue required
dataunknown required

Changes

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