Skip to main content

Add/Update Values in User Field

info

This method is available only for fields with the following types: Dropdown list (select), Related fields (hierarchy), Multi-button (multi_button)

POST /users/custom_fields/:field_id/options/


URL Example

https://system_domain/api/v2/users/custom_fields/123/options/


PATH Parameters

ParameterTypeRequiredDescription
field_idnumberYesID of the custom field

Request Body Parameters (JSON)

ParameterTypeRequiredDescription
optionsarrayYesArray of values

Request Body Examples (JSON):

{
"options": [ // Adding a new value
{
"name": {
"ru": "Новая опция",
"en": "New option"
}
}
]
}

{
"options": [ // Updating an existing value
{
"id": 11016, // ID of the value to update
"name": {
"ru": "Обновлённое значение",
"en": "Updated option"
}
}
]
}

{
"options": [ // Adding a new value for related fields at a specific level
{
"pid": 4588, // ID of the parent value
"name": {
"ru": "Новая опция",
"en": "New option"
}
}
]
}

Response Examples:

Response Example
{
"data": [ // Response to adding a new value
{
"id": 11016,
"name": {
"ru": "Новая опция",
"en": "New option"
}
}
]
}

{
"data": [ // Response to updating an existing value
{
"id": 11016,
"name": {
"ru": "Обновлённое значение",
"en": "Updated option"
}
}
]
}

{
"data": [ // Response to adding a new value for related fields at a specific level
{
"id": 11016,
"name": {
"ru": "Новая опция",
"en": "New option"
}
}
]
}