Adding representative

Attention.

Access tokens will not be accepted in URL parameters starting February 13, 2019. To continue working with the Yandex.Metrica API, set up authorization by passing the token in the HTTP header.

The outdated authorization method will be temporarily disabled on January 23, January 30, and February 6 for maintenance. Authorization using URL parameters will be unavailable on these dates.

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

  1. Request syntax
  2. Request message body
  3. Response format

Request syntax

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

Request message body


{
    "delegate" : {
        "user_login" :  < string > ,
        "comment" :  < string > 
    }
}
Parameters Description
delegate no description
delegate
user_login

User login, which is necessary to provide full access to the account of the current user.

comment

Any comment. 255 characters maximum.

Request example

POST https://api-metrica.yandex.net/management/v1/delegates?

Response format


{
    "delegates" : [ {
        "user_login" :  < string > ,
        "created_at" :  < date > ,
        "comment" :  < string > 
    }, ... ]
}
Parameters Description
delegates List of representatives who have been granted full access to the current user account.
delegates
user_login

User login, which is necessary to provide full access to the account of the current user.

created_at

Date of granting access in the format YYYY-MM-DD'T'hh:mm:ssZ.

comment

Any comment. 255 characters maximum.