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

# 确认文件上传并入队

> 通知系统文件已上传完毕，开始处理导入任务。

文件上传完成后，调用此接口通知系统开始处理。需要提供 `source_kind`、`file_name` 和 `declared_size_bytes`。

## 接口概览

| | |
| - | - |
| 方法 | `POST` |
| 路径 | `/api/v2/imports/{runId}/complete` |
| 权限 | `prospects.imports:write` |
| 幂等性 | 通过 `Idempotency-Key` 请求头实现 |

## 路径参数

**runId** `string` *required*

导入任务 ID，由 `POST /imports` 返回。

## 请求体

```json 确认上传 theme={null}
{
  "source_kind": "csv",
  "file_name": "prospects.csv",
  "declared_size_bytes": 1048576
}
```

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

`"csv"` 或 `"xlsx"`。

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

文件名。

**declared\_size\_bytes** `number` *required*

文件大小（字节）。

## 请求示例

```bash cURL theme={null}
curl -X POST "https://revor.ai/api/v2/imports/import-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": "prospects.csv",
    "declared_size_bytes": 1048576
  }'
```

## 行为说明

* 调用此接口后，系统开始处理导入任务
* 使用 `Idempotency-Key` 防止重复处理
* 每个步骤使用不同键，同一步骤重试保留原键
* 不要跨步骤复用同一个幂等键
* 确认后调用 [`GET /imports/{runId}`](/docs/cn/api/v2/workflow-imports-get) 查询进度

## 响应

```json 200 theme={null}
{
  "item": {
    "id": "import-uuid",
    "webset_id": "webset-uuid",
    "status": "processing",
    "source_kind": "csv"
  }
}
```

> [!WARNING]
>
> `init` 和 `complete` 均使用 `Idempotency-Key`；每个步骤使用不同键，同一步骤重试保留原键。不要跨步骤复用同一个幂等键。


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