Adding a representative

Adds a user login to the list of representatives for the current account.

Request

POST

https://api-metrika.yandex.net/management/v1/delegates

Body

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

Name

Description

delegate

Type: DelegateE

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

DelegateE

Name

Description

user_login

Type: string

The login of the user who requires full access to the current user account.

Min length: 1

Example: example

comment

Type: string

Custom comment. The maximum number of characters is 255.

Min length: 0

Max length: 255

Example: example

created_at

Type: string<date-time>

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

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

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

Responses

200 OK

OK

Body

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

Name

Description

delegates

Type: DelegateE[]

List of representatives who were granted full access to the current user account.

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

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