Изменение параметров сотрудника организации
Изменяет адрес электронной почты для отправки писем по умолчанию и отображаемое имя сотрудника организации. Чтобы изменить остальные параметры, воспользуйтесь запросом «Изменить информацию» на хост api360.yandex.net.
Отправить запрос может администратор организации или сотрудник с ролью Менеджер пользователей.
Request
PATCH
https://cloud-api.yandex.net/v1/directory/organizations/{org_id}/users/{user_id}
Path parameters
|
Name |
Description |
|
org_id |
Type: integer Идентификатор организации. |
|
user_id |
Type: integer Идентификатор пользователя. |
Body
application/json
{
"default_email": "user@example.com",
"display_name": "Иван Иванов"
}
|
Name |
Description |
|
default_email |
Type: string Адрес электронной почты сотрудника для рабочей переписки по умолчанию. Example: |
|
display_name |
Type: string Отображаемое имя сотрудника. Example: |
Responses
200 OK
Параметры пользователя изменены.
Body
application/json
{
"id": 7654321,
"nickname": "user",
"department_id": 7654321,
"email": "user@example.com",
"default_email": "user@example.com",
"name": {
"first": "Иван",
"middle": "Иванович",
"last": "Иванов"
},
"display_name": "Иван Иванов",
"gender": "male",
"position": "Специалист",
"avatar_id": "1234567890abcdef",
"about": "Специалист отдела разработки.",
"birthday": "1990-05-01",
"contacts": [
{
"type": "email",
"value": "user@example.com",
"main": true,
"alias": false,
"synthetic": false,
"is_for_completion_key_link": false
}
],
"aliases": [
"employee"
],
"external_id": "employee-123",
"is_admin": false,
"is_robot": false,
"is_dismissed": false,
"is_2fa_enabled": true,
"is_enabled": true,
"is_agreement_accepted": true,
"timezone": "Europe/Moscow",
"language": "ru",
"created_at": "2026-05-01T10:00:00+00:00",
"updated_at": "2026-05-02T10:00:00+00:00",
"completion_key_link_sending_status": {
"attempts": 1,
"created_at": "2026-05-01T10:00:00+00:00",
"last_attempt_at": "2026-05-01T10:05:00+00:00",
"last_sending_status": "success",
"link_expires_at": "2026-05-02T10:00:00+00:00"
}
}
|
Name |
Description |
|
about |
Type: string Описание сотрудника. Example: |
|
aliases |
Type: string[] Список алиасов сотрудника. Example
|
|
avatar_id |
Type: string Идентификатор аватара сотрудника. Example: |
|
birthday |
Type: string Дата рождения сотрудника. Формат: Example: |
|
completion_key_link_sending_status |
Type: CompletionKeyLinkSendingStatus Статус отправки ссылки на активацию аккаунта. Example
|
|
contacts |
Type: Contacts Список контактов сотрудника. Example
|
|
created_at |
Type: string Дата и время создания сотрудника. Example: |
|
default_email |
Type: string Адрес электронной почты сотрудника для рабочей переписки по умолчанию. Example: |
|
department_id |
Type: integer Идентификатор подразделения сотрудника. |
|
display_name |
Type: string Отображаемое имя сотрудника. Example: |
|
|
Type: string Адрес электронной почты сотрудника на основном домене организации. Example: |
|
external_id |
Type: string Произвольный внешний идентификатор. Example: |
|
gender |
Type: string Пол сотрудника. Example: |
|
id |
Type: integer Идентификатор сотрудника. |
|
is_2fa_enabled |
Type: boolean Статус обязательной персональной двухфакторной аутентификации:
|
|
is_admin |
Type: boolean Признак администратора организации:
|
|
is_agreement_accepted |
Type: boolean Принял ли сотрудник пользовательское соглашение:
Для портальных сотрудников всегда false. |
|
is_dismissed |
Type: boolean Статус сотрудника:
|
|
is_enabled |
Type: boolean Статус аккаунта:
|
|
is_robot |
Type: boolean Признак служебного бота:
|
|
language |
Type: string Язык сотрудника. Example: |
|
name |
Type: Name ФИО сотрудника. Example
|
|
nickname |
Type: string Логин сотрудника. Example: |
|
position |
Type: string Должность сотрудника. Example: |
|
timezone |
Type: string Часовой пояс сотрудника. Example: |
|
updated_at |
Type: string Дата и время изменения данных сотрудника. Example: |
Name
ФИО сотрудника.
|
Name |
Description |
|
first |
Type: string Имя сотрудника. Example: |
|
last |
Type: string Фамилия сотрудника. Example: |
|
middle |
Type: string Отчество сотрудника. Example: |
Example
{
"first": "Иван",
"middle": "Иванович",
"last": "Иванов"
}
ContactItem
Контакт сотрудника.
|
Name |
Description |
|
alias |
Type: boolean Признак алиаса:
|
|
is_for_completion_key_link |
Type: boolean Использовать ли контакт для отправки ссылки на активацию аккаунта. Применимо только для телефонных номеров. |
|
main |
Type: boolean Признак основного контакта:
|
|
synthetic |
Type: boolean Признак автоматически созданного контакта:
|
|
type |
Type: string Тип контакта. Example: |
|
value |
Type: string Значение контакта. Example: |
Example
{
"type": "email",
"value": "user@example.com",
"main": true,
"alias": false,
"synthetic": false,
"is_for_completion_key_link": false
}
Contacts
Список контактов сотрудника.
Type: ContactItem[]
Example
[
{
"type": "email",
"value": "user@example.com",
"main": true,
"alias": false,
"synthetic": false,
"is_for_completion_key_link": false
}
]
CompletionKeyLinkSendingStatus
Статус отправки ссылки на активацию аккаунта.
|
Name |
Description |
|
attempts |
Type: integer Количество попыток отправки ссылки. |
|
created_at |
Type: string Дата и время создания сотрудника. Example: |
|
last_attempt_at |
Type: string Дата и время последней попытки отправки ссылки. Example: |
|
last_sending_status |
Type: string Статус последней попытки отправки ссылки. Enum: |
|
link_expires_at |
Type: string Дата и время истечения срока действия ссылки на активацию аккаунта. Example: |
Example
{
"attempts": 1,
"created_at": "2026-05-01T10:00:00+00:00",
"last_attempt_at": "2026-05-01T10:05:00+00:00",
"last_sending_status": "success",
"link_expires_at": "2026-05-02T10:00:00+00:00"
}
400 Bad Request
Некорректный запрос.
Body
application/json
{
"error": "bad_request",
"description": "Bad request",
"message": "Bad request",
"details": {}
}
|
Name |
Description |
|
description |
Type: string Техническое описание ошибки. Example: |
|
error |
Type: string Код ошибки Example: |
|
message |
Type: string Сообщение об ошибке. Example: |
|
details |
Type: objectДополнительные детали ошибки Example
|
403 Forbidden
Возможные ошибки:
- Authorization error
- SSO user default email change is prohibited
- SSO user personal info change is prohibited
Body
application/json
{
"error": "forbidden",
"description": "Forbidden",
"message": "Forbidden",
"details": {}
}
|
Name |
Description |
|
description |
Type: string Техническое описание ошибки. Example: |
|
error |
Type: string Код ошибки Example: |
|
message |
Type: string Сообщение об ошибке. Example: |
|
details |
Type: objectДополнительные детали ошибки Example
|
404 Not Found
Запрашиваемый ресурс не найден.
Body
application/json
{
"error": "not_found",
"description": "Not found",
"message": "Not found",
"details": {}
}
|
Name |
Description |
|
description |
Type: string Техническое описание ошибки. Example: |
|
error |
Type: string Код ошибки Example: |
|
message |
Type: string Сообщение об ошибке. Example: |
|
details |
Type: objectДополнительные детали ошибки Example
|
409 Conflict
The feature required for this operation is not enabled for this organization
Body
application/json
{
"error": "feature_disabled",
"description": "The feature required for this operation is not enabled for this organization",
"message": "The feature required for this operation is not enabled for this organization",
"details": {}
}
|
Name |
Description |
|
description |
Type: string Техническое описание ошибки. Example: |
|
error |
Type: string Код ошибки Example: |
|
message |
Type: string Сообщение об ошибке. Example: |
|
details |
Type: objectДополнительные детали ошибки Example
|
422 Unprocessable Entity
Возможные ошибки:
- Invalid data
- Missing required field
- Invalid field value
- Invalid request body
- Default email must be one of the user's existing emails
- Invalid default email
- Default email cannot be empty
- Invalid display name
- Display name cannot be empty
Body
application/json
{
"error": "invalid_data",
"description": "Invalid data",
"message": "Invalid data",
"details": {}
}
|
Name |
Description |
|
description |
Type: string Техническое описание ошибки. Example: |
|
error |
Type: string Код ошибки Example: |
|
message |
Type: string Сообщение об ошибке. Example: |
|
details |
Type: objectДополнительные детали ошибки Example
|