Editing a segment
Modifies the specified segment.
Request
PUT
https://api-audience.yandex.ru/v1/management/segment/{segmentId}
Path parameters
|
Name |
Description |
|
segmentId* |
Type: integer<int32> ID of the segment that you want to edit. |
Body
application/json
{
"segment": {
"name": "string"
}
}
|
Name |
Description |
|
segment |
Type: SegmentName The segment with the specified parameters. |
SegmentName
The segment with the specified parameters.
|
Name |
Description |
|
name* |
Type: string Segment name. |
Responses
200 OK
OK
Body
application/json
{
"segment": {
"type": "string",
"id": 0,
"name": "string",
"status": "string",
"create_time": "2022-12-29T18:02:01Z",
"owner": "string",
"app_metrica_segment_type": "string",
"app_metrica_segment_id": 0
}
}
|
Name |
Description |
|
segment |
Type: AppMetricaSegment or GeoSegment or LookalikeSegment or MetrikaSegment or PixelSegment or PolygonGeoSegment or UploadingSegment |
AppMetricaSegment
A segment imported from AppMetrica.
|
Name |
Description |
|
name* |
Type: string Segment name. |
|
app_metrica_segment_id |
Type: integer<int32> ID of the object from AppMetrica. |
|
app_metrica_segment_type |
Type: string Object type in AppMetrica. Acceptable values:
|
|
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. |
|
status |
Type: string Status of processing the segment. Acceptable values:
|
|
type |
Type: string Segment type. Acceptable values:
|
GeoSegment
Segment based on location data for circles.
|
Name |
Description |
|
name* |
Type: string Segment name. |
|
create_time |
Type: string<date-time> The time of segment creation. |
|
geo_segment_type |
Type: string Coordinate type. Acceptable values:
|
|
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 period for visits to the specified places. This parameter is required if you are creating the condition "User visited the specified places N time(s) during the period". Acceptable values for the time period (in days): from 1 to 90 (inclusive). |
|
status |
Type: string Status of processing the segment. Acceptable values:
|
|
times_quantity |
Type: integer<int32> Frequency of visits to the specified places. This parameter is required if you are creating the condition "User visited the specified places N time(s) during the period". Note Only one visit per day is counted. |
|
type |
Type: string Segment type. Acceptable values:
|
LookalikeSegment
A segment of users who are similar to one of the client's other segments (look-alike technology).
|
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. |
|
lookalike_link |
Type: integer<int32> ID of the segment that the created segment should be similar to. |
|
lookalike_value |
Type: integer<int32> The degree of similarity. Accepts the values 1, 2, 3, 4, and 5. |
|
maintain_device_distribution |
Type: boolean Distribute users by device type. Acceptable values:
Default value: |
|
maintain_geo_distribution |
Type: boolean Distribute users by city. Acceptable values:
Default value: |
|
owner |
Type: string The username of the segment owner. |
|
status |
Type: string Status of processing the segment. Acceptable values:
|
|
type |
Type: string Segment type. Acceptable values:
|
MetrikaSegment
A segment imported from Yandex Metrica.
|
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. |
|
metrika_segment_id |
Type: integer<int64> ID of the object from Yandex Metrica. |
|
metrika_segment_type |
Type: string Object type in Yandex Metrica. Acceptable values:
|
|
owner |
Type: string The username of the segment owner. |
|
status |
Type: string Status of processing the segment. Acceptable values:
|
|
type |
Type: string Segment type. Acceptable values:
|
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:
|
|
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:
|
|
type |
Type: string Segment type. Acceptable values:
|
|
utm_campaign |
Type: string
|
|
utm_content |
Type: string
|
|
utm_medium |
Type: string
|
|
utm_source |
Type: string
|
|
utm_term |
Type: string
|
PolygonGeoSegment
Segment based on location data for polygons.
|
Name |
Description |
|
name* |
Type: string Segment name. |
|
create_time |
Type: string<date-time> The time of segment creation. |
|
geo_segment_type |
Type: string Coordinate type. Acceptable values:
|
|
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 period for visits to the specified places. This parameter is required if you are creating the condition "User visited the specified places N time(s) during the period". Acceptable values for the time period (in days): from 1 to 90 (inclusive). |
|
polygons |
Type: GeoPolygon[] List of polygons. You cannot add more than 10 polygons to a segment. |
|
status |
Type: string Status of processing the segment. Acceptable values:
|
|
times_quantity |
Type: integer<int32> Frequency of visits to the specified places. This parameter is required if you are creating the condition "User visited the specified places N time(s) during the period". Note Only one visit per day is counted. |
|
type |
Type: string Segment type. Acceptable values:
|
UploadingSegment
A segment created from a file with user data.
|
Name |
Description |
|
name* |
Type: string Segment name. |
|
used_hashing_alg* |
Type: string The hashing algorithm used for the data is sent for Starting January 2025, uploading new MD5 hashes is no longer supported. To upload new data, use SHA‑256. |
|
content_type |
Type: string Type of file content. Acceptable values:
|
|
create_time |
Type: string<date-time> The time of segment creation. |
|
device_matching_type |
Type: string Device search mode for the segment. Acceptable values:
|
|
hashed |
Type: boolean Whether every string in the uploaded file is hashed. Acceptable values:
|
|
id |
Type: integer<int32> ID of the segment. Specify this parameter when updating a segment. |
|
owner |
Type: string The username of the segment owner. |
|
status |
Type: string Status of processing the segment. Acceptable values:
|
|
type |
Type: string Segment type. Acceptable values:
|
GeoPolygon
List of polygons. You cannot add more than 10 polygons to a segment.
|
Name |
Description |
|
points* |
Type: GeoPoint[] The coordinates of the points. Min items: Max items: |
GeoPoint
The coordinates of the points.
|
Name |
Description |
|
description |
Type: string Any comment up to 200 characters. Min length: Max length: |
|
latitude |
Type: number Latitude. |
|
longitude |
Type: number Longitude. |
No longer supported, please use an alternative and newer version.