# Create a processing attempt

`POST https://api.cademi.com.br/api/v3/imports/{import_id}/processing-attempts`

Operation ID: `imports.processing_attempts.create` · API v3

Queues the rows that are ready for processing. Requires the `imports.process` permission.

A successful response confirms that the rows were queued, not that enrollments were granted. Rows are processed asynchronously; use the list import rows operation to follow the result of each row.

The import must have a completed analysis with no errors. Use `mode=initial` (default) for the first attempt, and `mode=retry` to requeue only the rows whose processing failed.

Required permissions: `imports.process`.

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `import_id` | path | string | yes |  |

## Request body

Content type: `application/json`.

| Field | Type | Required | Description |
|---|---|---|---|
| `mode` | string, one of `initial`, `retry` | no |  |

## Responses

### 202

The rows were queued for processing. Returns the new processing attempt.

Body: `data`: ProcessingAttempt.

Fields of ProcessingAttempt:

| Field | Type | Required | Description |
|---|---|---|---|
| `created_at` | string (date-time) | yes |  |
| `effects` | object | no | Effects of the attempt on the lead. Present in Diamond membership attempts. |
| `error` | object or null | yes |  |
| `event_id` | string | no | Public ID of the sales event, with the sev_ prefix. Present in sales event attempts. |
| `id` | string | yes | Public ID, with the pat_ prefix. |
| `import_id` | string | no | Public ID of the import, with the imp_ prefix. Present in import attempts. |
| `membership_id` | string | no | Public ID of the lead's Diamond membership, with the mbr_ prefix. Present in Diamond membership attempts. |
| `object` | string, one of `processing_attempt` | yes |  |
| `operation_id` | string | yes | Public ID of the operation, with the op_ prefix. |
| `requested_by` | object | yes |  |
| `selection` | object | no | Spreadsheet rows selected by the attempt. Present in import attempts. |
| `status` | string, one of `queued`, `succeeded`, `failed` | 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.

### 404

The import was not found or is not accessible with the current credentials.

Body: Error.

### 409

The import has not been analyzed, its analysis contains errors, or it has already been processed and mode is initial (stateconflict); or imports are disabled for the current account (featuredisabled).

Body: Error.

### 422

The request body or query parameters failed validation.

Body: ValidationFailed.

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