Input data structures for POST and PUT methods are passed in the request body. Input structures match the output structures of the GET methods of the corresponding resources.
To properly form the input structure for a POST or PUT method, call the GET method for a resource that already exists. Copy the resulting structure and define all the necessary field values.
The API POST and PUT methods accept input data in the following formats:
The format of input data is specified in the HTTP Content-Type header. Possible header values:
Sample requests are provided in the section Results format.
If the Content-Type header is not included in the request, Yandex.Metrica determines the data format automatically. The service returns the HTTP status 400 Bad Request in the following cases: