Saving a segment created from a file
Saves a segment created from a file with data.
Request
POST
https://api-audience.yandex.ru/v1/management/segment/{segmentId}/confirm
Path parameters
|
Name |
Description |
|
segmentId |
Type: integer ID of the segment that you want to save. |
Query parameters
|
Name |
Description |
|
check_size |
Type: boolean You can create segments with less than 100 records using this parameter. However, you can't use these segments for promotion in Yandex Direct until their size exceeds 100 records. Default: |
Body
application/json
{
"segment": {
"id": 0,
"name": "example",
"hashed": true,
"hashing_alg": "example",
"content_type": "example"
}
}
|
Name |
Description |
|
segment |
Type: SegmentRequestUploading The segment with the specified parameters. Example
|
SegmentRequestUploading
The segment with the specified parameters.
|
Name |
Description |
|
content_type |
Type: string Type of file content. Acceptable values:
Example: |
|
name |
Type: string Segment name Example: |
|
hashed |
Type: boolean Whether every string in the uploaded file is hashed. Acceptable values:
|
|
hashing_alg |
Type: string The hashing algorithm used for the data is sent for Alert Starting January_2025, uploading new MD5 hashes is no longer supported. To upload new data, use SHA‑256. Example: |
|
id |
Type: integer ID of the segment. Specify this parameter when updating a segment. |
Example
{
"id": 0,
"name": "example",
"hashed": true,
"hashing_alg": "example",
"content_type": "example"
}
Responses
200 OK
OK
Body
application/json
{
"segment": {
"type": "example",
"id": 0,
"name": "example",
"status": "example",
"create_time": "2025-01-01T00:00:00Z",
"owner": "example",
"hashed": true,
"used_hashing_alg": "example",
"content_type": "example"
}
}
|
Name |
Description |
|
segment |
Type: UploadingSegment A segment created from a file with user data. Example
|
BaseSegment
The segment description by type.
|
Name |
Description |
|
name |
Type: string Segment name. Example: |
|
create_time |
Type: string<date-time> The time of segment creation. Example: |
|
id |
Type: integer ID of the segment. Specify this parameter when updating a segment. |
|
owner |
Type: string The username of the segment owner. Example: |
|
status |
Type: string Status of processing the segment. Acceptable values:
Example: |
|
type |
Type: string Segment type. Acceptable values:
Example: |
Example
{
"type": "example",
"id": 0,
"name": "example",
"status": "example",
"create_time": "2025-01-01T00:00:00Z",
"owner": "example"
}
UploadingSegment
A segment created from a file with user data.
All of 2 types
-
Type: BaseSegment
The segment description by type.
Example
{ "type": "example", "id": 0, "name": "example", "status": "example", "create_time": "2025-01-01T00:00:00Z", "owner": "example" } -
Type: object
content_type
Type: string
Type of file content. Acceptable values:
idfa_gaid: Device IDs.mac: MAC addresses.crm: CRM data.
Example:
examplehashed
Type: boolean
Whether every string in the uploaded file is hashed. Acceptable values:
true: Hashed. -false: Unhashed.
used_hashing_alg
Type: string
The hashing algorithm used for the data is sent for
hashed: true. Acceptable values:SHA256.Alert
Starting January_2025, uploading new MD5 hashes is no longer supported. To upload new data, use SHA‑256.
Example:
exampleExample
{ "hashed": true, "used_hashing_alg": "example", "content_type": "example" }
Example
{
"type": "example",
"id": 0,
"name": "example",
"status": "example",
"create_time": "2025-01-01T00:00:00Z",
"owner": "example",
"hashed": true,
"used_hashing_alg": "example",
"content_type": "example"
}