Creates a custom directory (catalog) with optional fields. Use `display_field_index` to choose which field is used as the display field; otherwise the first field is used.
| Name | Value |
|---|---|
| Content-Type | application/json |
| Name | Type | Constraints | Description |
|---|---|---|---|
name required | string | minLength: 1 maxLength: 256 | Custom directory name |
| description | null | No description | |
string | Custom directory description | ||
multi_select | boolean default:false | When enabled, directory records can store multiple values per field | |
allow_editing | boolean default:false | When enabled, directory records can be edited from cards without custom properties permission | |
display_field_index | integer | minimum: 0 | Index of the field to use as a display field. If omitted, the first field is used. |
fields | array of objects | Directory fields definition |
| 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 |
| author_uid | string | Author user UID (UUID) |
| company_uid | string | Company UID (UUID) |
| created | string | Create date |
| updated | string | Last update timestamp |
| fields | array of objects | Directory fields |
| Description | Response type | Example |
|---|---|---|
| Validation error | Object |
| Name | Type | Description |
|---|---|---|
| message | string | Error message |
| Description | Response type | Example |
|---|---|---|
| Invalid token | String |
A schema has not been defined for this response code.
| Description | Response type | Example |
|---|---|---|
| Forbidden | Response body does not exist |
A schema has not been defined for this response code.
Create custom directory
{
"name": "Contacts",
"description": "Company contacts directory",
"multi_select": false,
"allow_editing": false,
"fields": [
{
"name": "Name",
"type": "string",
"required": true
},
{
"name": "Email",
"type": "email"
},
{
"name": "Phone",
"type": "phone"
}
]
} 1 curl --request POST \
2 --url 'https://example.kaiten.ru/api/latest/company/custom-directories' \
3 --header 'Accept: application/json' \
4 --header 'Content-Type: application/json'
5 Response
ClickTry It!to start a request and see the response here!