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

<!-- source: ru/openapi/admin/v1adminorgorg_idmail-listsmail_list_idpermissions-get.md -->
<div class="openapi">

# Получение списка разрешенных отправителей рассылок на группы и подразделения

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

Возвращает список пользователей, групп и подразделений, имеющих право отправлять письма на адреса почтовых рассылок.

{% note info "" %}

Для выполнения запроса требуется одно из перечисленных прав: `ya360_admin:mail_read_mail_list_permissions` или `ya360_admin:mail_write_mail_list_permissions`.

{% endnote %}

## Request

<div class="openapi__requests">

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

<div class="openapi__request">

GET {.openapi__method}
```text translate=no
https://cloud-api.yandex.net/v1/admin/org/{org_id}/mail-lists/{mail_list_id}/permissions
```

</div>

</div>

</div>

### Path parameters

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

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

Идентификатор рассылки.

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

## Responses

<div class="openapi__response__code__200">

## 200 OK

Получен список субъектов с разрешениями на отправку писем на адрес рассылки.

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "grants": {
    "items": [
      {
        "subject": {
          "type": "user",
          "id": 1230000000000001,
          "org_id": 1234567
        },
        "roles": {
          "items": [
            null
          ]
        }
      }
    ]
  }
}
```

{% endcut %}

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

_grants_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [Grants](#entity-Grants)

Объект Grants с информацией о разрешениях.

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

```json translate=no
{
  "items": [
    {
      "subject": {
        "type": "user",
        "id": 1230000000000001,
        "org_id": 1234567
      },
      "roles": {
        "items": [
          {}
        ]
      }
    }
  ]
}
```

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

</div>

<div class="openapi-entity">

### A360subjectType {#entity-A360subjectType}

Информация о субъекте, имеющем разрешение.

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

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

Идентификатор субъекта. Для типа `anonymous` — всегда `null`.
{.table-cell}
||
||

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

Тип субъекта:

- `user` — пользователь;
- `shared_mailbox` — общий почтовый ящик;
- `group` — группа;
- `department` — подразделение;
- `organization` — вся организация;
- `anonymous` — любой пользователь.


_Enum:_{.json-schema-reset .json-schema-value} `organization`, `user`, `group`, `department`, `anonymous`, `shared_mailbox`
{.table-cell}
||
||

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

Идентификатор организации (`0` — если пользователь не относится ни к одной организации). Необязателен для `anonymous`.
{.table-cell}
||
|#{.json-schema-properties}

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

```json translate=no
{
  "type": "user",
  "id": 1230000000000001,
  "org_id": 1234567
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### RoleItem {#entity-RoleItem}

Объект Role Item со списком разрешений субъекта.

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

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

Описание разрешения — параметр не используется.

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

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

Наименование разрешения — параметр не используется.

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

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

Тип разрешения:

- `mail_list_sender` — разрешение на отправку писем на адрес рассылки;
- `mail_list_half_sender` — дополнительный тип разрешения на отправку писем.


_Enum:_{.json-schema-reset .json-schema-value} `mail_list_sender`, `mail_list_half_sender`
{.table-cell}
||
|#{.json-schema-properties}

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

```json translate=no
{
  "slug": "mail_list_sender",
  "name": "",
  "description": ""
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### RolesItems {#entity-RolesItems}

Массив объектов Role Item со списком разрешений субъекта.

**Type**: [RoleItem](#entity-RoleItem)[]

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

```json translate=no
[
  {
    "slug": "mail_list_sender",
    "name": "",
    "description": ""
  }
]
```

{% endcut %}

</div>

<div class="openapi-entity">

### Roles {#entity-Roles}

Объект Roles с информацией о разрешениях субъекта.

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

_items_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [RolesItems](#entity-RolesItems)

Массив объектов Role Item со списком разрешений субъекта.

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

```json translate=no
[
  {
    "slug": "mail_list_sender",
    "name": "",
    "description": ""
  }
]
```

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

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

```json translate=no
{
  "items": [
    {
      "slug": "mail_list_sender",
      "name": "",
      "description": ""
    }
  ]
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### GrantItem {#entity-GrantItem}

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

_roles_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [Roles](#entity-Roles)

Объект Roles с информацией о разрешениях субъекта.

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

```json translate=no
{
  "items": [
    {
      "slug": "mail_list_sender",
      "name": "",
      "description": ""
    }
  ]
}
```

{% endcut %}
{.table-cell}
||
||

_subject_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [A360subjectType](#entity-A360subjectType)

Информация о субъекте, имеющем разрешение.

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

```json translate=no
{
  "type": "user",
  "id": 1230000000000001,
  "org_id": 1234567
}
```

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

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

```json translate=no
{
  "subject": {
    "type": "user",
    "id": 1230000000000001,
    "org_id": 1234567
  },
  "roles": {
    "items": [
      {
        "slug": "mail_list_sender",
        "name": "",
        "description": ""
      }
    ]
  }
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### GrantsItems {#entity-GrantsItems}

Массив объектов Grant Item со списками разрешений.

**Type**: [GrantItem](#entity-GrantItem)[]

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

```json translate=no
[
  {
    "subject": {
      "type": "user",
      "id": 1230000000000001,
      "org_id": 1234567
    },
    "roles": {
      "items": [
        {
          "slug": "mail_list_sender",
          "name": "",
          "description": ""
        }
      ]
    }
  }
]
```

{% endcut %}

</div>

<div class="openapi-entity">

### Grants {#entity-Grants}

Объект Grants с информацией о разрешениях.

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

_items_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [GrantsItems](#entity-GrantsItems)

Массив объектов Grant Item со списками разрешений.

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

```json translate=no
[
  {
    "subject": {
      "type": "user",
      "id": 1230000000000001,
      "org_id": 1234567
    },
    "roles": {
      "items": [
        {
          "slug": "mail_list_sender",
          "name": "",
          "description": ""
        }
      ]
    }
  }
]
```

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

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

```json translate=no
{
  "items": [
    {
      "subject": {
        "type": "user",
        "id": 1230000000000001,
        "org_id": 1234567
      },
      "roles": {
        "items": [
          {}
        ]
      }
    }
  ]
}
```

{% endcut %}

</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": "Неверный формат запроса",
  "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} `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} `Неверный формат запроса`
{.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": "Доступ запрещен",
  "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} `forbidden`
{.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": "conflict",
  "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} `conflict`
{.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/admin/v1adminorgorg_idmail-listsmail_list_idpermissions-get.md -->


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