---
metadata:
  - name: generator
    content: Diplodoc Platform v5.70.0
alternate:
  - https://yandex.ru/dev/api360/doc/ru/federations/patch-organization.md
  - href: https://yandex.ru/dev/api360/doc/ru/federations/patch-organization.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/federations/patch-organization.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/api360/doc/ru/llms.txt?revision=r22091678

<!-- source: ru/openapi/v1directoryfederationsfederation_idorganizationsorganization_id-patch.md -->
<div class="openapi">

# Отмена приглашения или исключение организации из федерации

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

Отменяет приглашение организации в федерацию или исключает организацию из федерации. Запрос выполняется от имени организации, указанной в заголовке `X-Yandex360-Org-Id`. Для закрытой федерации доступна только отмена приглашения, причем только организацией-инициатором приглашения.

Требуется разрешение `directory:write_federations` — управление федерациями.

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


## Request

<div class="openapi__requests">

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

<div class="openapi__request">

PATCH {.openapi__method}
```text translate=no
https://cloud-api.yandex.net/v1/directory/federations/{federation_id}/organizations/{organization_id}
```

</div>

</div>

</div>

### Path parameters

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

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

Идентификатор федерации (UUID).

_Pattern:_{.json-schema-reset .json-schema-assertion} `^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$`

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

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

Идентификатор организации-участника.

_Min value:_{.json-schema-reset .json-schema-assertion} `1`
{.table-cell}
||
|#{.json-schema-properties}

### Headers

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

_X-Yandex360-Org-Id_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

Организация, от имени которой выполняется запрос.

_Min value:_{.json-schema-reset .json-schema-assertion} `1`
{.table-cell}
||
|#{.json-schema-properties}

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "status": "rejected",
  "blacklist_scope": "example"
}
```

{% endcut %}

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

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

Действие над участием — `rejected` (отменить приглашение) или `terminated` (исключить организацию из федерации).

_Enum:_{.json-schema-reset .json-schema-value} `rejected`, `terminated`
{.table-cell}
||
||

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

Передавать запрещено. При наличии поля запрос отклоняется.

_Pattern:_{.json-schema-reset .json-schema-assertion} `(?!)`

_Example:_{.json-schema-reset .json-schema-example} `example`
{.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
{
  "membership_id": "example",
  "federation_id": "example",
  "member_organization_id": 0,
  "initiator_organization_id": 0,
  "status": "requested",
  "created_at": "example",
  "updated_at": "example"
}
```

{% endcut %}

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

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

Дата и время создания участия.

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

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

Идентификатор федерации (UUID).

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

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

Идентификатор организации-инициатора приглашения.
{.table-cell}
||
||

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

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

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

Идентификатор участия (UUID).

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

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

Статус участия. Возможные значения:
- `requested` — приглашение отправлено;
- `accepted` — приглашение принято, организация участвует в федерации;
- `rejected` — приглашение отклонено или отменено;
- `terminated` — участие прекращено.


_Enum:_{.json-schema-reset .json-schema-value} `requested`, `accepted`, `rejected`, `terminated`
{.table-cell}
||
||

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

Дата и время последнего изменения участия.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.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": "bad_request",
  "description": "Bad request",
  "message": "Bad request",
  "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} `Bad request`
{.table-cell}
||
||

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

Код ошибки

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

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

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

_Example:_{.json-schema-reset .json-schema-example} `Bad request`
{.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__401">

## 401 Unauthorized

Пользователь не авторизован.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": "unauthorized",
  "description": "Unauthorized",
  "message": "Unauthorized",
  "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} `Unauthorized`
{.table-cell}
||
||

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

Код ошибки

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

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

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

_Example:_{.json-schema-reset .json-schema-example} `Unauthorized`
{.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": "forbidden",
  "description": "Forbidden",
  "message": "Forbidden",
  "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} `Forbidden`
{.table-cell}
||
||

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

Код ошибки

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

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

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

_Example:_{.json-schema-reset .json-schema-example} `Forbidden`
{.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": "Not found",
  "message": "Not found",
  "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} `Not found`
{.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} `Not found`
{.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

Возможные ошибки:

- Federation membership already exists
- Federation membership already exists

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": "conflict",
  "description": "Conflict",
  "message": "Conflict",
  "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} `Conflict`
{.table-cell}
||
||

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

Код ошибки

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

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

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

_Example:_{.json-schema-reset .json-schema-example} `Conflict`
{.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__422">

## 422 Unprocessable Entity

Возможные ошибки:

- Feature unavailable
- Invalid data

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "error": "feature_unavailable",
  "description": "Feature unavailable",
  "message": "Feature unavailable",
  "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} `Feature unavailable`
{.table-cell}
||
||

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

Код ошибки

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

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

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

_Example:_{.json-schema-reset .json-schema-example} `Feature unavailable`
{.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/v1directoryfederationsfederation_idorganizationsorganization_id-patch.md -->


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