​

Update custom directory

PATCH
https://example.kaiten.ru/api/latest/company/custom-directories/{directory_id}

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.

Path parameters
NameTypeReference
directory_idrequiredstringDirectory ID
Headers
NameValue
Content-Typeapplication/json
Attributes
schema
NameTypeConstraintsDescription
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

Schema

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.

Responses

200
DescriptionResponse typeExample
SuccessObject
Open
Response Attributes
NameTypeDescription
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
400
DescriptionResponse typeExample
Validation errorObject
Open
Response Attributes
NameTypeDescription
message

string

Error message
code

integer

Error code (customDirectoryErrorCodes)
409
DescriptionResponse typeExample
The current field ids differ from expected_field_ids. reload the directory before retrying.Object
Open

A schema has not been defined for this response code.

401
DescriptionResponse typeExample
Invalid tokenString
Open
404
DescriptionResponse typeExample
Not foundObject
Open

A schema has not been defined for this response code.

logo
Kaiten
If you have any questions or need help with integration feel free to write us at support@kaiten.ru

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!