---
metadata:
  - name: generator
    content: Diplodoc Platform v5.70.0
alternate:
  - https://yandex.ru/dev/api360/doc/ru/directory/post-group-members.md
  - href: https://yandex.ru/dev/api360/doc/ru/directory/post-group-members.md
    type: text/markdown
    title: Markdown version
  - href: https://yandex.ru/dev/api360/doc/ru/llms.txt?revision=r22091678
    rel: describedby
sourcePath: docs/dev/api360/concepts/gw/directory/post-group-members.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/api360/doc/ru/llms.txt?revision=r22091678

<!-- source: ru/openapi/directory/v1api360directoryorgorg_idgroupsgroup_idmembers-post.md -->
<div class="openapi">

# Добавление участника в группу

<!-- markdownlint-disable-file -->

Добавляет участника в группу. Участником группы может быть сотрудник организации, отдельное подразделение или другая группа.

Отправить запрос может администратор организации или сотрудник с ролью **Менеджер пользователей**.

{% note info "" %}

Для выполнения запроса требуется одно из перечисленных прав: `directory:read_groups` или `directory:write_groups`.

{% endnote %}

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-post);margin-bottom: 12px">

<div class="openapi__request">

POST {.openapi__method}
```text translate=no
https://cloud-api.yandex.net/v1/api360/directory/org/{org_id}/groups/{group_id}/members
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_group_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Идентификатор группы.

_Example:_{.json-schema-reset .json-schema-example} `7654321`
{.table-cell}
||
||

_org_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Идентификатор организации.

_Example:_{.json-schema-reset .json-schema-example} `1234567`
{.table-cell}
||
|#{.json-schema-properties}

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "type": "user",
  "id": 3456789
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Идентификатор участника группы.
{.table-cell}
||
||

_type_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Тип участника группы:

- `user` — сотрудник;
- `group` — группа;
- `department` — подразделение.


_Enum:_{.json-schema-reset .json-schema-value} `user`, `group`, `department`
{.table-cell}
||
|#{.json-schema-properties}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

Результат добавления участника в группу получен.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "id": 3456789,
  "type": "user",
  "added": true
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_added_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: boolean

Признак добавления участника:

- `true` — добавлен;
- `false` — не добавлен.

{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Идентификатор участника группы.
{.table-cell}
||
||

_type_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Тип участника группы.

_Example:_{.json-schema-reset .json-schema-example} `user`
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__400">

## 400 Bad Request

Неверные параметры запроса

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": "invalid_argument",
  "description": "Неверные параметры запроса",
  "message": "Неверные параметры запроса",
  "details": {}
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_description_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Техническое описание ошибки.

_Example:_{.json-schema-reset .json-schema-example} `Неверные параметры запроса`
{.table-cell}
||
||

_error_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Код ошибки

_Example:_{.json-schema-reset .json-schema-example} `invalid_argument`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Сообщение об ошибке.

_Example:_{.json-schema-reset .json-schema-example} `Неверные параметры запроса`
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: object" %}

#|
|#{.json-schema-properties}

{% endcut %}

Дополнительные детали ошибки

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__403">

## 403 Forbidden

Доступ запрещен

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": "permission_denied",
  "description": "Доступ запрещен",
  "message": "Доступ запрещен",
  "details": {}
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_description_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Техническое описание ошибки.

_Example:_{.json-schema-reset .json-schema-example} `Доступ запрещен`
{.table-cell}
||
||

_error_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Код ошибки

_Example:_{.json-schema-reset .json-schema-example} `permission_denied`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Сообщение об ошибке.

_Example:_{.json-schema-reset .json-schema-example} `Доступ запрещен`
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: object" %}

#|
|#{.json-schema-properties}

{% endcut %}

Дополнительные детали ошибки

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__404">

## 404 Not Found

Ресурс не найден

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": "not_found",
  "description": "Ресурс не найден",
  "message": "Ресурс не найден",
  "details": {}
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_description_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Техническое описание ошибки.

_Example:_{.json-schema-reset .json-schema-example} `Ресурс не найден`
{.table-cell}
||
||

_error_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Код ошибки

_Example:_{.json-schema-reset .json-schema-example} `not_found`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Сообщение об ошибке.

_Example:_{.json-schema-reset .json-schema-example} `Ресурс не найден`
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: object" %}

#|
|#{.json-schema-properties}

{% endcut %}

Дополнительные детали ошибки

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__409">

## 409 Conflict

Конфликт - ресурс уже существует

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": "already_exists",
  "description": "Конфликт - ресурс уже существует",
  "message": "Конфликт - ресурс уже существует",
  "details": {}
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_description_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Техническое описание ошибки.

_Example:_{.json-schema-reset .json-schema-example} `Конфликт - ресурс уже существует`
{.table-cell}
||
||

_error_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Код ошибки

_Example:_{.json-schema-reset .json-schema-example} `already_exists`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Сообщение об ошибке.

_Example:_{.json-schema-reset .json-schema-example} `Конфликт - ресурс уже существует`
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: object" %}

#|
|#{.json-schema-properties}

{% endcut %}

Дополнительные детали ошибки

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__412">

## 412 Precondition Failed

Функция недоступна или не оплачена

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": "failed_precondition",
  "description": "Функция недоступна или не оплачена",
  "message": "Функция недоступна или не оплачена",
  "details": {}
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_description_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Техническое описание ошибки.

_Example:_{.json-schema-reset .json-schema-example} `Функция недоступна или не оплачена`
{.table-cell}
||
||

_error_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Код ошибки

_Example:_{.json-schema-reset .json-schema-example} `failed_precondition`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Сообщение об ошибке.

_Example:_{.json-schema-reset .json-schema-example} `Функция недоступна или не оплачена`
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: object" %}

#|
|#{.json-schema-properties}

{% endcut %}

Дополнительные детали ошибки

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

<div class="openapi__response__code__429">

## 429 Too Many Requests

Превышен лимит запросов

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": "resource_exhausted",
  "description": "Превышен лимит запросов",
  "message": "Превышен лимит запросов",
  "details": {}
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_description_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Техническое описание ошибки.

_Example:_{.json-schema-reset .json-schema-example} `Превышен лимит запросов`
{.table-cell}
||
||

_error_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Код ошибки

_Example:_{.json-schema-reset .json-schema-example} `resource_exhausted`
{.table-cell}
||
||

_message_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Сообщение об ошибке.

_Example:_{.json-schema-reset .json-schema-example} `Превышен лимит запросов`
{.table-cell}
||
||

_details_{.json-schema-reset .json-schema-property}
{.table-cell}|
{% cut "**Type**: object" %}

#|
|#{.json-schema-properties}

{% endcut %}

Дополнительные детали ошибки

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

</div>

</div>
<!-- endsource: ru/openapi/directory/v1api360directoryorgorg_idgroupsgroup_idmembers-post.md -->


[*Deprecated]: No longer supported, please use an alternative and newer version.