Updates directory attributes and/or fields. If `fields` is provided, it should contain the full fields list; omitted fields are soft-deleted (condition=removed). To choose a display field, set `is_display=true` for exactly one field in the list.
Requires custom-properties management permission. Send expected_field_ids together with fields to detect a changed field list (HTTP 409, code 16). This is not a general version check. Changing a field's type or a non-empty select/catalog/directory-link binding is rejected with HTTP 400, code 15, when the field has record values. The response contains fields and author.
| Name | Type | Reference |
|---|---|---|
| directory_idrequired | string | Directory ID |
| Name | Value |
|---|---|
| Content-Type | application/json |
| Name | Type | Constraints | Description |
|---|---|---|---|
name | string | minLength: 1 maxLength: 256 | Custom directory name |
| description | null | No description | |
string | Custom directory description | ||
condition | enum | [active,inactive,removed] | Custom directory condition |
multi_select | boolean | Allow selecting multiple directory records in a card's directory custom property | |
allow_editing | boolean | When enabled, directory records can be edited from cards without custom properties permission | |
expected_field_ids | array of strings | Optional snapshot of all active and inactive field IDs returned when the directory was loaded. Checked only when fields is supplied. A mismatch returns HTTP 409 with code 16; reload before retrying. This checks field membership, not concurrent edits to field attributes. | |
fields | array of objects | Full active and inactive fields list. Omitted fields are soft-deleted (condition=removed); an empty array removes all fields. Include existing IDs to update fields and omit IDs for new fields. Supply complete field definitions: omitted required/is_display flags become false, bindings become null and sort_order defaults to the array index. Omit fields entirely to leave the schema unchanged. |
| Description | Response type | Example |
|---|---|---|
| Success | Object |
| Name | Type | Description |
|---|---|---|
| id | string | Directory ID (UUID) |
| name | string | Directory name |
| description | null | string | Directory description |
| condition | enum | Directory condition: active | inactive | removed |
| settings | object | Directory settings |
| fields | array of objects | Directory fields |
| author | object | Author user object |
| Description | Response type | Example |
|---|---|---|
| Validation error | Object |
| Name | Type | Description |
|---|---|---|
| message | string | Error message |
| code | integer | Error code (customDirectoryErrorCodes) |
| Description | Response type | Example |
|---|---|---|
| The current field ids differ from expected_field_ids. reload the directory before retrying. | Object |
A schema has not been defined for this response code.
| Description | Response type | Example |
|---|---|---|
| Invalid token | String |
| Description | Response type | Example |
|---|---|---|
| Not found | Object |
A schema has not been defined for this response code.
Path Parameters
1 curl --request PATCH \
2 --url 'https://example.kaiten.ru/api/latest/company/custom-directories/{directory_id}' \
3 --header 'Accept: application/json' \
4 --header 'Content-Type: application/json'
5 Response
ClickTry It!to start a request and see the response here!