When updating data, send the full document in ProseMirror JSON format. A 400 response such as "Document content is incompatible with schema v1: Unknown node type: file." means that the selected schema does not support a node or mark type in your payload. To resolve it, either adapt the content to the schema named in the error, or retrieve a supported newer schema using GET /api/latest/document-schemas/latest and resend the full data together with schema_version set to the returned version (for example, "v28", not "latest"). The entire payload must already match the requested schema: the server does not migrate it. Only the current or a newer supported version is accepted; downgrades are rejected. Content and schema version are saved together, so opening the document in the browser first is not required. A rejected update leaves the document unchanged.
| Name | Type | Reference |
|---|---|---|
| document_uidrequired | string (uuid) | Document UID |
| Name | Value |
|---|---|
| Content-Type | application/json |
| Name | Type | Constraints | Description |
|---|---|---|---|
title | string | minLength: 0 maxLength: 256 | Title of the document |
sort_order | number | minimum: 0 exclusiveMinimum: 0 | |
| publish_date | string | Deadline. ISO 8601 format | |
null | Empty card description | ||
data | object | Document content in ProseMirror JSON format. Unknown node or mark types in the selected schema return 400 with the schema version and unsupported type. With an explicit schema_version, ProseMirror parsing and content-validation errors return 400 with the original error message. For legacy documents, the message also explains how to provide compatible data or use schema_version with full content matching a supported newer schema. Without schema_version, existing validation error handling is preserved. See document-schemas API to retrieve a schema. | |
schema_version | string | Explicit ProseMirror schema version of the full data payload, for example v28. Requires data and cannot be combined with backup_version. Only the current or a newer supported version is accepted; downgrades and unknown versions return 400. The payload must satisfy that schema; the server does not migrate it. Content and schema version are saved atomically. Without this field, the existing schema selection is used. See document-schemas to retrieve supported schemas. | |
access | string (enum) | [for_everyone,by_invite] | |
parent_entity_uid | string | null | ||
for_everyone_access_role_id | string | ||
public | boolean | ||
redirect_url | string | null | ||
hidden_on_public_site | boolean | ||
settings | object | Server-side shallow merge: only the key(s) sent are changed, other existing settings are preserved. Sending a key with value null removes it (for keys whose schema allows null). | |
backup_version | number | ||
| published_version | number | Version to publish on public site | |
null | No spicific version to publish on public site, current version will be published | ||
string (enum) | [current] | ||
| key | string | minLength: 2 maxLength: 10 | Unique key for document, used in API and web interface. Must be unique across entire company |
null | Reset existing key | ||
| icon_type | string (enum) | [emoji,material_icon] | Type of icon |
null | No icon | ||
| icon_value | string | maxLength: 100 | Icon value (emoji character or material icon name) |
null | No icon value | ||
| icon_color | integer | minimum: 1 maximum: 17 | Icon color index (1-17) |
null | No icon color | ||
| notification_period_start | string | Notification period start date | |
null | Reset notification period start date | ||
| notification_period_end | string | Notification period end date | |
null | Reset notification period end date | ||
| slug | string | minLength: 3 maxLength: 128 | Human-readable URL slug. Lowercase latin letters, digits and hyphens only. Must be unique within the public site subtree |
null | Reset slug (fall back to auto-slug generated from title) |
| Description | Response type | Example |
|---|---|---|
| Success | Object |
| Name | Type | Description |
|---|---|---|
| uid | string | Document uid |
| id | string | Document UID. Same value as uid. |
| title | string | Document title |
| created | string | Create date |
| updated | string | Last update timestamp |
| archived | boolean | Document archived flag |
| company_id | integer | Company id |
| author_id | integer | Author user id |
| parent_entity_uid | null | string | Parent tree entity uid |
group_idDeprecated: use parent_entity_uid instead | null | string | Deprecated alias for parent_entity_uid |
| entity_type | string | Entity type. Always "document" |
| sort_order | number | Document sort order |
| access | enum | Document access type |
| for_everyone_access_role_id | null | string | Role id for everyone access |
| data | null | string | JSON-encoded ProseMirror document, or null if no content has been saved. |
| version | integer | Current document version number |
| published_version | null | integer | Published version number |
| publish_date | null | string | Publication date |
| public | boolean | Is document publicly available (legacy field) |
| hidden_on_public_site | boolean | Document is hidden on public site |
| settings | object | Document appearance settings |
| key | null | string | Unique document key within company |
| redirect_url | null | string | Redirect URL |
| icon_type | null | string | Icon type. "material_icon" or null |
| icon_value | null | string | Icon value (icon name for material_icon type) |
| icon_color | null | integer | Icon color |
| path | string | Inner path to entity in tree |
| schema_version | string | ProseMirror schema version |
| notification_period_start | null | string | Notification period start date |
| notification_period_end | null | string | Notification period end date |
| Description | Response type | Example |
|---|---|---|
| Validation error | Object |
| Name | Type | Description |
|---|---|---|
| message | string | Error message |
| code | string | Error code (optional) |
| Description | Response type | Example |
|---|---|---|
| Invalid token | String |
| Description | Response type | Example |
|---|---|---|
| Feature is not supported by tariff | Object |
| Name | Type | Description |
|---|---|---|
| message | string | Error message |
| Description | Response type | Example |
|---|---|---|
| Forbidden | Response body does not exist |
| Description | Response type | Example |
|---|---|---|
| Not found | Response body does not exist |
| Description | Response type | Example |
|---|---|---|
| Conflict — key already in use or has unfinished key operations | Object |
| Name | Type | Description |
|---|---|---|
| message | string | Error message |
| code | string | Error code |
Path Parameters
1 curl --request PATCH \
2 --url 'https://example.kaiten.ru/api/latest/documents/{document_uid}' \
3 --header 'Accept: application/json' \
4 --header 'Content-Type: application/json'
5 Response
ClickTry It!to start a request and see the response here!