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

<div class="openapi">

# Создание сегмента с типом "pixel"

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

Создает сегмент типа `pixel` с заданными параметрами. Если при создании сегмента используются различные условия (например, заданы несколько меток), то в сегмент попадет пользователь, который удовлетворяет **одновременно** всем заданным условиям.

## Request

<div class="openapi__requests">

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

<div class="openapi__request">

POST {.openapi__method}
```text translate=no
https://api-audience.yandex.ru/v1/management/segments/create_pixel
```

</div>

</div>

</div>

<div class="openapi-entity">

### Body

{% cut "application/json" %}

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

{% endcut %}

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

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

Сегмент с заданными параметрами.

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

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

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

</div>

<div class="openapi-entity">

### SegmentRequestPixel {#entity-SegmentRequestPixel}

Сегмент с заданными параметрами.

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

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

Название сегмента.

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

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

Идентификатор пикселя.
{.table-cell}
||
||

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

Период, за время которого пользователь был замечен пикселем. Допустимые значения (в сутках): от 1 до 90 (включительно).

_Min value:_{.json-schema-reset .json-schema-assertion} `1`

_Max value:_{.json-schema-reset .json-schema-assertion} `90`
{.table-cell}
||
||

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

Пороговое значение (M). С этим значением сравнивается количество раз, когда пользователь был замечен пикселем за период.
{.table-cell}
||
||

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

Условие попадания пользователей в сегмент из пикселя. Допустимые значения:

- `lt` — меньше. Пользователь был замечен пикселем меньше, чем M раз за период.
- `eq` — равно. Пользователь был замечен пикселем M раз за период.
- `gt` — больше. Пользователь был замечен пикселем больше, чем M раз за период.


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

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

Метка `utm_campaign`. Может использоваться как условие попадания пользователей в сегмент из пикселя.

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

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

Метка `utm_content`. Может использоваться как условие попадания пользователей в сегмент из пикселя.

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

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

Метка `utm_medium`. Может использоваться как условие попадания пользователей в сегмент из пикселя.

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

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

Метка `utm_source`. Может использоваться как условие попадания пользователей в сегмент из пикселя.

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

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

Метка `utm_term`. Может использоваться как условие попадания пользователей в сегмент из пикселя.

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

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

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

{% endcut %}

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "segment": {
    "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 %}

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

_segment_{.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}
||
|#{.json-schema-properties}

</div>

<div class="openapi-entity">

### BaseSegment {#entity-BaseSegment}

Тип для описания сегмента.

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

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

Название сегмента.

_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;

Время создания сегмента.

_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

Идентификатор сегмента. Укажите данный параметр при обновлении сегмента.
{.table-cell}
||
||

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

Логин владельца сегмента.

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

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

Статус обработки сегмента. Допустимые значения:

- `uploaded` — сегмент с данными пользователя загружен.
- `is_processed` — сегмент с заданными параметрами обрабатывается.
- `processed` — загрузка и обработка сегмента завершена. Сегмент готов для работы.
- `processing_failed` — обработка сегмента завершилась с ошибкой.
- `is_updated` — сегмент обновляется.
- `few_data` — сегмент содержит мало данных для работы.


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

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

Тип сегмента. Допустимые значения:

- `uploading` — сегмент, созданный из файла с пользовательскими данными.
- `metrika` — сегмент, импортируемый из Яндекс Метрики.
- `appmetrica` — сегмент, импортируемый из AppMetrica.
- `lookalike` — сегмент из пользователей, «похожих» на другой сегмент клиента (технология Look-alike).
- `geo` — сегмент на основе данных о геолокации по полигонам и по окружностям.
- `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}

Сегмент, созданный по пикселю.

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

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

  Тип для описания сегмента.

  {% 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

  Период, за время которого пользователь был замечен пикселем. Допустимые значения (в сутках): от 1 до 90 (включительно).
  {.table-cell}
  ||
  ||

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

  Идентификатор пикселя.
  {.table-cell}
  ||
  ||

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

  Пороговое значение (M). С этим значением сравнивается количество раз, когда пользователь был замечен пикселем за период.
  {.table-cell}
  ||
  ||

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

  Условие попадания пользователей в сегмент из пикселя. Допустимые значения:

  - `lt` — меньше. Пользователь был замечен пикселем меньше, чем M раз за период.
  - `eq` — равно. Пользователь был замечен пикселем M раз за период.
  - `gt` — больше. Пользователь был замечен пикселем больше, чем M раз за период.


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

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

  Метка `utm_campaign`. Может использоваться как условие попадания пользователей в сегмент из пикселя.

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

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

  Метка `utm_content`. Может использоваться как условие попадания пользователей в сегмент из пикселя.

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

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

  Метка `utm_medium`. Может использоваться как условие попадания пользователей в сегмент из пикселя.

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

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

  Метка `utm_source`. Может использоваться как условие попадания пользователей в сегмент из пикселя.

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

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

  Метка `utm_term`. Может использоваться как условие попадания пользователей в сегмент из пикселя.

  _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>

</div>

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