update_document
Update a document's title, tags, correspondent, or custom fields; omitted fields stay unchanged. However, custom fields replace the full set.
Instructions
Update a specific document with new values (title, correspondent, document type, storage path, tags, custom fields, and more). Top-level fields you omit are left unchanged. IMPORTANT: custom_fields is the exception — see its parameter description; it replaces the document's entire custom-field set.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The ID of the document to update | |
| tags | No | Array of tag IDs to assign to the document | |
| owner | No | The ID of the user who owns the document | |
| title | No | The new title for the document (max 128 characters) | |
| content | No | The raw text content of the document (used for searching) | |
| created | No | The creation date in YYYY-MM-DD format | |
| storage_path | No | The ID of the storage path to assign | |
| correspondent | No | The ID of the correspondent to assign | |
| custom_fields | No | Custom field values for the document. ⚠️ REPLACES the document's entire custom-field set — any field not included here will be CLEARED. To update or add a single field without losing the others, first call get_document to read the existing custom_fields, then pass the full merged array. To add/set fields additively without fetching, use bulk_edit_documents with method 'modify_custom_fields' instead. | |
| document_type | No | The ID of the document type to assign | |
| archive_serial_number | No | The archive serial number (0-4294967295) |