# Create an import

`POST https://api.cademi.com.br/api/v3/imports`

Operation ID: `imports.create` · API v3

Creates a user import from a spreadsheet that was previously uploaded with `purpose=import`.

Creating an import does not process any rows. Request an analysis next, then start a processing attempt once the analysis is complete.

If imports are disabled for the current account, the request is rejected with the `feature_disabled` error code.

Required permissions: `imports.create`.

## Request body

Content type: `application/json`, required.

| Field | Type | Required | Description |
|---|---|---|---|
| `duplicate_policy` | string, one of `skip`, `update` | no |  |
| `file_id` | string | yes |  |
| `type` | string, one of `students_access` | yes |  |

## Responses

### 201

Returns the newly created import.

Body: `data`: Import.

Fields of Import:

| Field | Type | Required | Description |
|---|---|---|---|
| `created_at` | string (date-time) | yes |  |
| `current_operation_id` | string or null | yes | Public ID of the operation in progress on the import, prefixed with op_. |
| `deleted` | boolean | yes |  |
| `duplicate_policy` | string, one of `skip`, `update` | yes |  |
| `failure_reason` | string or null | yes | Reason the file as a whole was rejected, such as an unreadable spreadsheet, a missing column, or exceeding the allowed limit. Does not cover errors in individual rows. |
| `file_id` | string or null | yes | Public ID of the source file, prefixed with file_. |
| `id` | string | yes | Public ID of the import, prefixed with imp_. |
| `mapping` | object | yes | Fixed spreadsheet column mapping. Read-only in this API version. |
| `object` | string, one of `import` | yes |  |
| `revision` | string | yes |  |
| `rows` | object | yes | Row counts from the analysis. All values are zero until the analysis has run. |
| `status` | string, one of `pending`, `analyzed`, `processing`, `processed`, `failed` | yes |  |
| `type` | string, one of `students_access` | yes |  |
| `updated_at` | string (date-time) | yes |  |

### 401

The credential is missing, malformed, expired, or revoked.

Body: Error.

### 403

The current credentials do not have the permission required by this operation.

Body: Error.

### 409

Imports are disabled for the current account (feature_disabled).

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

Full schema: https://cademi.dev/openapi/v3.json
