Adding a delegate

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

Request

PUT

https://api-audience.yandex.ru/v1/management/delegate

Body

application/json
{
  "delegate": {
    "user_login": "example",
    "perm": "example",
    "created_at": "2025-01-01T00:00:00Z",
    "comment": "example"
  }
}

Name

Description

delegate

Type: Delegate

Information about the delegate.

Example
{
  "user_login": "example",
  "perm": "example",
  "created_at": "2025-01-01T00:00:00Z",
  "comment": "example"
}

Delegate

Information about the delegate.

Name

Description

perm

Type: string

Access level. Acceptable values:

  • view: Read-only access to the account.
  • edit: Full access to the account.

Example: example

user_login

Type: string

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

Min length: 1

Example: example

comment

Type: string

Any comment. Maximum 255 characters.

Min length: 0

Max length: 255

Example: example

created_at

Type: string<date-time>

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

Example: 2025-01-01T00:00:00Z

Example
{
  "user_login": "example",
  "perm": "example",
  "created_at": "2025-01-01T00:00:00Z",
  "comment": "example"
}

Responses

200 OK

OK

Body

application/json
{
  "delegates": [
    {
      "user_login": "example",
      "perm": "example",
      "created_at": "2025-01-01T00:00:00Z",
      "comment": "example"
    }
  ]
}

Name

Description

delegates

Type: Delegate[]

The list of delegates.

Example
[
  {
    "user_login": "example",
    "perm": "example",
    "created_at": "2025-01-01T00:00:00Z",
    "comment": "example"
  }
]

No longer supported, please use an alternative and newer version.