---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.com/dev/metrika/en/management/formats.md
  - https://yandex.com/dev/metrika/ru/management/formats.md
  - href: en/management/formats.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.com/dev/metrika/en/llms.txt

# Formats for input data and results

## Format for input data {#input}

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.

{% note info %}

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.

{% endnote %}

The API POST and PUT methods accept input data in JSON format.

The format of input data is specified in the HTTP `Content-Type` header.

Acceptable header values: `application/x-yametrika+json` or `application/json`.

## Format of results {#result}

The Management API returns responses in UTF-8 encoding. Responses are in JSON format.

For example, the results for the following request will have information about a tag:

```no-highlight translate=no
GET https://api-metrika.yandex.net/management/v1/counter/<counter_id>
```

Example:

```no-highlight
POST /management/v1/counters HTTP/1.1
Host: api-metrika.yandex.net
Authorization: OAuth <access_token>
Content-Type: application/x-yametrika+json
Content-Length: 127

{
     "counter" : {
         "site" : "www.example.com",
         "name" : "Tag name",
    }
}
```

For debugging purposes, results can be formatted. To do this, pass the `pretty` parameter with the value set to `1` in any type of request:

```httpget translate=no
GET https://api-metrika.yandex.net/management/v1/counter/<counter_id>?pretty=1
PUT https://api-metrika.yandex.net/management/v1/counter/<counter_id>?pretty=1
```

When DELETE methods are executed successfully, the API returns the HTTP status with the code `200`. If the HTTP status contains a different code, deletion was not performed.
