---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://yandex.ru/dev/audience/en/ref/openapi/pixels/editPixel.md
  - https://yandex.ru/dev/audience/ru/ref/openapi/pixels/editPixel.md
  - href: en/ref/openapi/pixels/editPixel.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.ru/dev/audience/en/llms.txt

<div class="openapi">

# Editing a pixel

<!-- markdownlint-disable-file -->

Changes the specified pixel.

## Request

<div class="openapi__requests">

<div class="openapi__request__wrapper" style="--method: var(--dc-openapi-methods-put);margin-bottom: 12px">

<div class="openapi__request">

PUT {.openapi__method}
```text translate=no
https://api-audience.yandex.ru/v1/management/pixel/{pixelId}
```

</div>

</div>

</div>

### Path parameters

#|
|| **Name** | **Description** ||
||

_pixelId_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: integer

ID of the pixel that you want to change.
{.table-cell}
||
|#{.json-schema-properties}

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "pixel": {
    "name": "example"
  }
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_pixel_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [PixelRequest](#entity-PixelRequest)

Pixel.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "name": "example"
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### PixelRequest {#entity-PixelRequest}

Pixel.

#|
|| **Name** | **Description** ||
||

_name_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

The pixel name.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "name": "example"
}
```

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "pixel": {
    "id": 0,
    "name": "example",
    "create_time": "2025-01-01T00:00:00Z",
    "segments": [
      {
        "type": "example",
        "id": 0,
        "name": "example",
        "status": "example",
        "create_time": "2025-01-01T00:00:00Z",
        "owner": "example",
        "pixel_id": 0,
        "period_length": 0,
        "times_quantity": 0,
        "times_quantity_operation": "example",
        "utm_source": "example",
        "utm_content": "example",
        "utm_campaign": "example",
        "utm_term": "example",
        "utm_medium": "example"
      }
    ],
    "user_quantity_7": 0,
    "user_quantity_30": 0,
    "user_quantity_90": 0
  }
}
```

{% endcut %}

#|
|| **Name** | **Description** ||
||

_pixel_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: [Pixel](#entity-Pixel)

Pixel.

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "create_time": "2025-01-01T00:00:00Z",
  "segments": [
    {
      "type": "example",
      "id": 0,
      "name": "example",
      "status": "example",
      "create_time": "2025-01-01T00:00:00Z",
      "owner": "example",
      "pixel_id": 0,
      "period_length": 0,
      "times_quantity": 0,
      "times_quantity_operation": "example",
      "utm_source": "example",
      "utm_content": "example",
      "utm_campaign": "example",
      "utm_term": "example",
      "utm_medium": "example"
    }
  ],
  "user_quantity_7": 0,
  "user_quantity_30": 0,
  "user_quantity_90": 0
}
```

{% endcut %}
{.table-cell}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### BaseSegment {#entity-BaseSegment}

The segment description by type.

#|
|| **Name** | **Description** ||
||

_name_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

Segment name.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_create_time_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

The time of segment creation.

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

ID of the segment. Specify this parameter when updating a segment.
{.table-cell}
||
||

_owner_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

The username of the segment owner.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_status_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Status of processing the segment. Acceptable values:

- `uploaded`: The segment with the user's data has been uploaded.
- `is_processed`: The segment with the specified parameters is being processed.
- `processed`: The segment has been uploaded and processed. The segment is ready to use.
- `processing_failed`: Segment processing has failed.
- `is_updated`: The segment is updating.
- `few_data`: The segment has insufficient data.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_type_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string

Segment type. Acceptable values:

- `uploading`: A segment created from a file with user data.
- `metrika`: A segment imported from Yandex Metrica.
- `appmetrica`: A segment imported from AppMetrica.
- `lookalike`: A segment of users who "look like" one of the client's other segments (uses the "lookalike" technology).
- `geo`: A segment based on location data for polygons and circles.
- `pixel`: A segment created using a tracking pixel.


_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "type": "example",
  "id": 0,
  "name": "example",
  "status": "example",
  "create_time": "2025-01-01T00:00:00Z",
  "owner": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### PixelSegment {#entity-PixelSegment}

A segment created using a tracking pixel.

{% cut "**All of 2 types**" %}{.json-schema-combinators data-marker=and}

- **Type**: [BaseSegment](#entity-BaseSegment)

  The segment description by type.

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "type": "example",
    "id": 0,
    "name": "example",
    "status": "example",
    "create_time": "2025-01-01T00:00:00Z",
    "owner": "example"
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

  _period_length_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: integer

  The time period for tracking the user with the pixel. Acceptable values (in days): from 1 to 90 (inclusive).
  {.table-cell}
  ||
  ||

  _pixel_id_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: integer

  The pixel ID.
  {.table-cell}
  ||
  ||

  _times_quantity_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: integer

  Threshold value (M). This is the base number for comparing how many times the user was detected by the pixel during the period.
  {.table-cell}
  ||
  ||

  _times_quantity_operation_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  Condition for users to be included in the pixel segment. Acceptable values:

  - `lt`: Less than. The user was detected by the pixel less than M times during the period.
  - `eq`: Equal to. The user was detected by the pixel M times during the period.
  - `gt`: Greater than. The user was detected by the pixel more than M times during the period.


  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  ||

  _utm_campaign_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  `utm_campaign` tag. Can be used as a condition for including users in a pixel segment.

  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  ||

  _utm_content_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  `utm_content` tag. Can be used as a condition for including users in a pixel segment.

  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  ||

  _utm_medium_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  `utm_medium` tag. Can be used as a condition for including users in a pixel segment.

  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  ||

  _utm_source_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  `utm_source` tag. Can be used as a condition for including users in a pixel segment.

  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  ||

  _utm_term_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: string

  `utm_term` tag. Can be used as a condition for including users in a pixel segment.

  _Example:_{.json-schema-reset .json-schema-example} `example`
  {.table-cell}
  ||
  |#{.json-schema-properties}

  {% endcut %}

  {% cut "**Example**" %}{.json-schema-example}

  ```json translate=no
  {
    "pixel_id": 0,
    "period_length": 0,
    "times_quantity": 0,
    "times_quantity_operation": "example",
    "utm_source": "example",
    "utm_content": "example",
    "utm_campaign": "example",
    "utm_term": "example",
    "utm_medium": "example"
  }
  ```

  {% endcut %}

{% endcut %}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "type": "example",
  "id": 0,
  "name": "example",
  "status": "example",
  "create_time": "2025-01-01T00:00:00Z",
  "owner": "example",
  "pixel_id": 0,
  "period_length": 0,
  "times_quantity": 0,
  "times_quantity_operation": "example",
  "utm_source": "example",
  "utm_content": "example",
  "utm_campaign": "example",
  "utm_term": "example",
  "utm_medium": "example"
}
```

{% endcut %}

</div>

<div class="openapi-entity">

### Pixel {#entity-Pixel}

Pixel.

#|
|| **Name** | **Description** ||
||

_name_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string

The pixel name.

_Example:_{.json-schema-reset .json-schema-example} `example`
{.table-cell}
||
||

_create_time_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: string&lt;date-time&gt;

The time of pixel creation.

_Example:_{.json-schema-reset .json-schema-example} `2025-01-01T00:00:00Z`
{.table-cell}
||
||

_id_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

The pixel ID. Specify this parameter when updating a pixel.
{.table-cell}
||
||

_segments_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: [PixelSegment](#entity-PixelSegment)[]

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
[
  {
    "type": "example",
    "id": 0,
    "name": "example",
    "status": "example",
    "create_time": "2025-01-01T00:00:00Z",
    "owner": "example",
    "pixel_id": 0,
    "period_length": 0,
    "times_quantity": 0,
    "times_quantity_operation": "example",
    "utm_source": "example",
    "utm_content": "example",
    "utm_campaign": "example",
    "utm_term": "example",
    "utm_medium": "example"
  }
]
```

{% endcut %}
{.table-cell}
||
||

_user_quantity_30_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Coverage over one month.
{.table-cell}
||
||

_user_quantity_7_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Coverage over one week.
{.table-cell}
||
||

_user_quantity_90_{.json-schema-reset .json-schema-property}
{.table-cell}|
**Type**: integer

Coverage over 90 days.
{.table-cell}
||
|#{.json-schema-properties}

{% cut "**Example**" %}{.json-schema-example}

```json translate=no
{
  "id": 0,
  "name": "example",
  "create_time": "2025-01-01T00:00:00Z",
  "segments": [
    {
      "type": "example",
      "id": 0,
      "name": "example",
      "status": "example",
      "create_time": "2025-01-01T00:00:00Z",
      "owner": "example",
      "pixel_id": 0,
      "period_length": 0,
      "times_quantity": 0,
      "times_quantity_operation": "example",
      "utm_source": "example",
      "utm_content": "example",
      "utm_campaign": "example",
      "utm_term": "example",
      "utm_medium": "example"
    }
  ],
  "user_quantity_7": 0,
  "user_quantity_30": 0,
  "user_quantity_90": 0
}
```

{% endcut %}

</div>

</div>

</div>

[*Deprecated]: No longer supported, please use an alternative and newer version.