---
metadata:
  - name: generator
    content: Diplodoc Platform v5.48.2
alternate:
  - https://yandex.com.tr/dev/metrika/en/management/openapi/offline_conversions/upload_1.md
  - https://yandex.com.tr/dev/metrika/ru/management/openapi/offline_conversions/upload_1.md
---
> **Documentation Index:** Fetch the complete configuration index at https://yandex.com.tr/dev/metrika/en/llms.txt

<!-- source: en/management-src/Managing-offline-conversions/upload_1.md -->
<div class="openapi">

# Uploading offline conversions

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

Uploads [offline conversions](https://yandex.com.tr/dev/metrika/en/management/conversion.md).

{% note tip %}

Create a CSV data file and send it using this method.
We recommend that you also automate your API queries using modules available in your programming language.

{% endnote %}

For more information on what data to send and what a sample request looks like, see [Passing offline conversions](https://yandex.com.tr/dev/metrika/en/management/offline-conv.md).

{% note info %}

1. It can take up to 2 hours to process the data.
2. The file size limit is 1 GB.
3. The file encoding is UTF-8.

{% endnote %}


## 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-metrika.yandex.net/management/v1/counter/{counterId}/offline_conversions/upload
```

</div>

</div>

</div>

### Path parameters

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

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

ID of the tag for which you want to upload offline conversions.
{.table-cell}
||
|#{.json-schema-properties}

### Query parameters

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

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

Comment. Maximum 255 characters. You can use digits, Latin characters, and Cyrillic characters.

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

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

Offline conversion type.
Possible values:
- `BASIC`: Default type.
- `CALLS`: Calls.
- `CHATS`: Chats.


_Default:_{.json-schema-reset .json-schema-value} `BASIC`

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

<div class="openapi-entity">

### Body

{% cut "multipart/form-data" %}

```json translate=no
{
  "file": "example"
}
```

{% endcut %}

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

_file_{.json-schema-reset .json-schema-property .json-schema-required}
{.table-cell}|
**Type**: string&lt;binary&gt;

Offline conversions to upload, which are passed as multipart/form-data. The file size limit is 1 GB. The file encoding is UTF-8.

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

</div>

## Responses

<div class="openapi__response__code__200">

## 200 OK

OK

<div class="openapi-entity">

### Body

{% cut "application/json" %}

```json translate=no
{
  "uploading": {
    "id": 0,
    "create_time": "2025-01-01T00:00:00Z",
    "source_quantity": 0,
    "line_quantity": 0,
    "comment": "example",
    "type": "BASIC",
    "client_id_type": "USER_ID",
    "status": "example"
  }
}
```

{% endcut %}

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

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

Information about an upload of offline conversions.

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

```json translate=no
{
  "id": 0,
  "create_time": "2025-01-01T00:00:00Z",
  "source_quantity": 0,
  "line_quantity": 0,
  "comment": "example",
  "type": "BASIC",
  "client_id_type": "USER_ID",
  "status": "example"
}
```

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

</div>

<div class="openapi-entity">

### OfflineConversionUploading {#entity-OfflineConversionUploading}

Information about an upload of offline conversions.

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

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

Type of user IDs.
Possible values:
- `USER_ID`: Site user ID assigned by the site owner.
- `CLIENT_ID`: Site user ID assigned by Yandex Metrica.
- `Yclid`: ID of a click on a Yandex Direct ad assigned by Yandex Direct.


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

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

Custom comment. The maximum number of characters is 255.

_Min length:_{.json-schema-reset .json-schema-assertion} `0`

_Max length:_{.json-schema-reset .json-schema-assertion} `255`

_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;

Upload time.

_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

Upload ID.
{.table-cell}
||
||

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

Number of rows that passed validation during upload.
{.table-cell}
||
||

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

Number of rows in the source file.
{.table-cell}
||
||

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

Upload status:
- `PREPARED`: Upload prepared.
- `UPLOADED`: Upload complete.
- `EXPORTED`: Upload exported.
- `MATCHED`: Event IDs matched.
- `PROCESSED`: Upload processed.
- `LINKAGE_FAILURE`: Couldn't find a matching user ID. If you send data on static calls, they won't be attributed to sessions in Yandex Metrica, but they will appear in your call reports.


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

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

Possible values:
- `BASIC`: Default type.
- `CALLS`: Calls.
- `CHATS`: Chats.


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

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

```json translate=no
{
  "id": 0,
  "create_time": "2025-01-01T00:00:00Z",
  "source_quantity": 0,
  "line_quantity": 0,
  "comment": "example",
  "type": "BASIC",
  "client_id_type": "USER_ID",
  "status": "example"
}
```

{% endcut %}

</div>

</div>

</div>
<!-- endsource: en/management-src/Managing-offline-conversions/upload_1.md -->

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