Creating a segment from a CSV file

Creates a segment from a file with data. There must be at least 100 entries in the file.

  1. Request syntax
  2. In the request body
  3. Response format

Request syntax

https://api-audience.yandex.ru/v1/management/segments/upload_csv_file
 ? 

In the request body


POST http://api-audience.yandex.ru/v1/management/segments/upload_csv_file
Content-Type: multipart/form-data; boundary=--------------------------5b2a52c5c90f668a
Context-Length: 331

--------------------------5b2a52c5c90f668a
Content-Disposition: form-data; name="file"; filename="data.csv"
Content-Type: application/octet-stream

"email","phone","ext_id","key1","key2"
"abc@inbox.ru","111","1","q","w"
"abc@mail.ru","222","2","q","w"
"bcd@mail.ru","333","3","q","w"
"abc@yandex.ru","444","4","q","w"
"bcd@yandex.ru","555","5","q","w"
"cde@mail.ru","666","6","q","w"
"cde@yandex.ru","777","7","q","w"
"def@mail.ru","888","8","q","w"
"def@yandex.ru","999","9","q","w"
--------------------------5b2a52c5c90f668a--

Sample request

POST https://api-audience.yandex.ru/v1/management/segments/upload_file?

Response format


{
    "segment" :  < _uploading_segment > 
}
Parameters Description
segment The segment with the specified parameters.
Parameters Description
segment The segment with the specified parameters.