> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Complete file import

> Confirm a file upload and queue the import after uploading to the signed URL.

Confirm a file upload and queue the import for processing. Call this after uploading the file bytes to the signed `upload_url` returned by `POST /imports`.

## Overview

| | |
| - | - |
| Method | `POST` |
| Path | `/api/v2/imports/{runId}/complete` |
| Permission | `prospects.imports:write` |
| Idempotency | Required via `Idempotency-Key` header |
| Returns | Import run queued for processing |

## Path parameters

**runId** `string` *required*

Import run UUID returned by `POST /imports`.

## Request body

**source\_kind** `string` *required*

File format: `"csv"` or `"xlsx"`.

**file\_name** `string` *required*

Name of the uploaded file.

**declared\_size\_bytes** `integer` *required*

Size of the uploaded file in bytes.

```json Request body theme={null}
{
  "source_kind": "csv",
  "file_name": "suppliers.csv",
  "declared_size_bytes": 1048576
}
```

## Behavior

* This is step 3 of the file-import workflow: initialize upload, upload bytes, confirm and queue, poll progress.
* Init and complete require separate `Idempotency-Key` values. Reuse each key for retries of the same step. Do not reuse the same key across different steps.
* After completing, poll `GET /imports/{runId}` for progress and read `webset_ids` from the results.

> [!WARNING]
>
> A timeout does not mean the task failed. Retry with the original idempotency key and unchanged request. Do not change the key and create duplicate tables.

```bash cURL theme={null}
curl -X POST "https://revor.ai/api/v2/imports/import-run-uuid/complete" \
  -H "Authorization: Bearer sk-revor-REPLACE_ME" \
  -H "Idempotency-Key: import-complete-001" \
  -H "Content-Type: application/json" \
  -d '{
    "source_kind": "csv",
    "file_name": "suppliers.csv",
    "declared_size_bytes": 1048576
  }'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.