---
metadata:
  - name: generator
    content: Diplodoc Platform v5.19.4
alternate:
  - https://yandex.ru/dev/audience/en/ref/openapi/segments/confirmClientId.md
  - https://yandex.ru/dev/audience/ru/ref/openapi/segments/confirmClientId.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.ru/dev/audience/ru/llms.txt

<div class="openapi">

# Сохранение сегмента из ClientId Метрики, созданного из файла

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

Сохраняет сегмент из `ClientId` Метрики, созданный из файла с данными.

## 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/segment/client_id/{segmentId}/confirm
```

</div>

</div>

</div>

### Path parameters

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

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

Идентификатор сегмента, который вы хотите сохранить.
{.table-cell}
||
|#{.json-schema-properties}

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "segment": {
    "name": "example",
    "counter_id": 0
  }
}
```

{% endcut %}

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

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

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

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

```json translate=no
{
  "name": "example",
  "counter_id": 0
}
```

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

</div>

<div class="openapi-entity">

### ClientIdSegmentRequestUploading {#entity-ClientIdSegmentRequestUploading}

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

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

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

ID счетчика.
{.table-cell}
||
||

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

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

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

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

```json translate=no
{
  "name": "example",
  "counter_id": 0
}
```

{% 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",
    "has_guests": true,
    "guest_quantity": 0,
    "can_create_dependent": true,
    "has_derivatives": true,
    "derivatives": [
      0
    ],
    "cookies_matched_quantity": 0,
    "hashed": true,
    "used_hashing_alg": "example",
    "content_type": "example",
    "source_id": 0,
    "source_name": "example",
    "item_quantity": 0,
    "valid_unique_quantity": 0,
    "valid_unique_percentage": "example",
    "matched_quantity": 0,
    "matched_percentage": "example",
    "counter_id": 0,
    "uploading_last_modify_time": "2025-01-01T00:00:00Z",
    "device_matching_type": "example"
  }
}
```

{% endcut %}

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

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

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

{% 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",
  "has_guests": true,
  "guest_quantity": 0,
  "can_create_dependent": true,
  "has_derivatives": true,
  "derivatives": [
    0
  ],
  "cookies_matched_quantity": 0,
  "hashed": true,
  "used_hashing_alg": "example",
  "content_type": "example",
  "source_id": 0,
  "source_name": "example",
  "item_quantity": 0,
  "valid_unique_quantity": 0,
  "valid_unique_percentage": "example",
  "matched_quantity": 0,
  "matched_percentage": "example",
  "counter_id": 0,
  "uploading_last_modify_time": "2025-01-01T00:00:00Z",
  "device_matching_type": "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">

### UploadingSegment {#entity-UploadingSegment}

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

{% 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",
    "has_guests": true,
    "guest_quantity": 0,
    "can_create_dependent": true,
    "has_derivatives": true,
    "derivatives": [
      0
    ],
    "cookies_matched_quantity": 0
  }
  ```

  {% endcut %}

- {% cut "**Type**: object" %}

  #|
  ||

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

  Вид содержимого файла. Допустимые значения:

  - `idfa_gaid` — идентификаторы устройств.
  - `mac` — MAC-адреса.
  - `crm` — CRM-данные.


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

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

  Режим поиска устройств для сегмента.

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

  - `CROSS_DEVICE` — включает в сегмент другие устройства того же пользователя, связанные с загруженным ID. Значение по-умолчанию, если режим поиска не выбран.
  - `IN_DEVICE` — сегмент строится только по загруженным устройствам, без расширения на другие устройства. На данный момент режим `IN_DEVICE` доступен только для `idfa_gaid` сегментов.


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

  _hashed_{.json-schema-reset .json-schema-property}
  {.table-cell}|
  **Type**: boolean

  Является ли захешированной каждая строка загруженного файла. Допустимые значения:

  - `true` — строка захеширована.
  - `false` — строка не захеширована.

  {.table-cell}
  ||
  ||

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

  Алгоритм хеширования примененный для данных, отправляется для `hashed: true`. Допустимое значение: `SHA256`.

  {% note alert "" %}

  С 1 января 2025 года загрузка новых хешей MD5 не поддерживается. Для загрузки данных используйте SHA‑256.

  {% endnote %}


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

  {% endcut %}

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

  ```json translate=no
  {
    "hashed": true,
    "used_hashing_alg": "example",
    "content_type": "example",
    "device_matching_type": "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",
  "has_guests": true,
  "guest_quantity": 0,
  "can_create_dependent": true,
  "has_derivatives": true,
  "derivatives": [
    0
  ],
  "cookies_matched_quantity": 0,
  "hashed": true,
  "used_hashing_alg": "example",
  "content_type": "example",
  "device_matching_type": "example"
}
```

{% endcut %}

</div>

</div>

</div>

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