Creating a pixel

Creates a pixel with the specified parameters.

Request

POST

https://api-audience.yandex.com/v1/management/pixels

Body

application/json
{
    "pixel": {
        "name": "string"
    }
}

Name

Description

pixel*

Type: PixelRequest

Pixel.

PixelRequest

Pixel.

Name

Description

name*

Type: string

The pixel name.

Responses

200 OK

OK

Body

application/json
{
    "pixel": {
        "id": 0,
        "name": "string",
        "create_time": "2022-12-29T18:02:01Z",
        "segments": [
            {
                "id": 0,
                "name": "string",
                "type": "string",
                "status": "string",
                "create_time": "2022-12-29T18:02:01Z",
                "owner": "string",
                "pixel_id": 0,
                "period_length": 0,
                "times_quantity": 0,
                "times_quantity_operation": "string",
                "utm_source": "string",
                "utm_content": "string",
                "utm_campaign": "string",
                "utm_term": "string",
                "utm_medium": "string"
            }
        ],
        "user_quantity_7": 0,
        "user_quantity_30": 0,
        "user_quantity_90": 0
    }
}

Name

Description

pixel*

Type: Pixel

Pixel.

Pixel

Pixel.

Name

Description

name*

Type: string

The pixel name.

create_time

Type: string<date-time>

The time of pixel creation.

id

Type: integer<int32>

The pixel ID. Specify this parameter when updating a pixel.

segments

Type: PixelSegment[]

A segment created using a tracking pixel.
The segment description by type.

user_quantity_30

Type: integer<int64>

Coverage over one month.

user_quantity_7

Type: integer<int64>

Coverage over one week.

user_quantity_90

Type: integer<int64>

Coverage over 90 days.

PixelSegment

A segment created using a tracking pixel.

Name

Description

name*

Type: string

Segment name.

create_time

Type: string<date-time>

The time of segment creation.

id

Type: integer<int32>

ID of the segment. Specify this parameter when updating a segment.

owner

Type: string

The username of the segment owner.

period_length

Type: integer<int32>

The time period for tracking the user with the pixel. Acceptable values (in days): from 1 to 90 (inclusive).

pixel_id

Type: integer<int32>

The pixel ID.

status

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 – Uploading and processing the segment is complete. The segment is ready to use.
  • processing_failed – Processing the segment failed with an error.
  • is_updated — The segment is updated.
  • few_data – The segment doesn't have enough data.

times_quantity

Type: integer<int32>

Threshold value (M). This is the base number for comparing how many times the user was detected by the pixel during the period.

times_quantity_operation

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.

type

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.

utm_campaign

Type: string

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

utm_content

Type: string

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

utm_medium

Type: string

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

utm_source

Type: string

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

utm_term

Type: string

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

No longer supported, please use an alternative and newer version.