---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.ru/dev/audience/en/ref/openapi/delegates/addDelegate.md
  - https://yandex.ru/dev/audience/ru/ref/openapi/delegates/addDelegate.md
  - href: en/ref/openapi/delegates/addDelegate.md
    type: text/markdown
    title: Markdown version
  - href: ../../../llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/audience/en/llms.txt

<div class="openapi">

# Adding a delegate

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

Adds a username to the list of delegates for the current account.

## Request

<div class="openapi__requests">

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

<div class="openapi__request">

PUT {.openapi__method}
```text translate=no
https://api-audience.yandex.ru/v1/management/delegate
```

</div>

</div>

</div>

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "delegate": {
    "user_login": "example",
    "perm": "example",
    "created_at": "2025-01-01T00:00:00Z",
    "comment": "example"
  }
}
```

{% endcut %}

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

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

Information about the delegate.

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

```json translate=no
{
  "user_login": "example",
  "perm": "example",
  "created_at": "2025-01-01T00:00:00Z",
  "comment": "example"
}
```

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

</div>

<div class="openapi-entity">

### Delegate {#entity-Delegate}

Information about the delegate.

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

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

Access level. Acceptable values:
- `view`: Read-only access to the account.
- `edit`: Full access to the account.


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

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

The username of a user to grant access to the current user's account.

_Min length:_{.json-schema-reset .json-schema-assertion} `1`

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

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

Any comment. Maximum 255 characters.

_Min length:_{.json-schema-reset .json-schema-assertion} `0`

_Max length:_{.json-schema-reset .json-schema-assertion} `255`

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

_created_at_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

The date when permission was granted, in the format YYYY-MM-DD'T'hh:mm:ssZ.

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
|#{.json-schema-properties}

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

```json translate=no
{
  "user_login": "example",
  "perm": "example",
  "created_at": "2025-01-01T00:00:00Z",
  "comment": "example"
}
```

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "delegates": [
    {
      "user_login": "example",
      "perm": "example",
      "created_at": "2025-01-01T00:00:00Z",
      "comment": "example"
    }
  ]
}
```

{% endcut %}

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

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

The list of delegates.

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

```json translate=no
[
  {
    "user_login": "example",
    "perm": "example",
    "created_at": "2025-01-01T00:00:00Z",
    "comment": "example"
  }
]
```

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

</div>

</div>

</div>

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