# Retrieve a contact import

`GET https://api.morevoice.ai/v1/imports/{id}`

Returns a background contact import: its `status` (`pending`, `processing`, then `succeeded` or `failed`), how many rows were received, imported and rejected, and why rows were rejected. Poll it until it succeeds or fails; `importCsv` in the SDK does that for you.

Authenticate with a secret API key: `Authorization: Bearer $MOREVOICE_API_KEY`.

Operation ID: `imports_retrieve`.

## Parameters

### Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | A import ID (`imp_…`). |

### Headers

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `MoreVoice-Version` | `string` | no | The API version to use for this request. Defaults to the version the API key is pinned to. |

## Responses

### 200 OK

OK Returns `ContactImport`.

| Field | Type | Description |
| --- | --- | --- |
| `id` | `string` | A import ID (prefix `imp_`). |
| `object` | `"import"` | — |
| `livemode` | `boolean` | `true` in live mode, `false` in test mode. |
| `campaign_id` | `string` | A campaign ID (prefix `cmp_`). |
| `status` | `"pending" \| "processing" \| "succeeded" \| "failed"` | pending → processing → succeeded \| failed. Poll GET /v1/imports/{id}. |
| `source` | `"csv" \| "xlsx" \| "url"` | — |
| `filename` | `string \| null` | — |
| `received` | `integer` | Non-empty contacts / rows received. |
| `imported` | `integer` | Contacts added to the campaign for dialling. |
| `rejected` | `integer` | Contacts not added for dialling (invalid, duplicate, do-not-call). |
| `rejected_reasons` | `ContactRejectedReasons` | Rejected contacts per reason. |
| `rejected_reasons.invalid` | `integer` | Not a valid phone number. |
| `rejected_reasons.duplicate` | `integer` | Repeated in the request, or already in the campaign. |
| `rejected_reasons.dnc` | `integer` | On the organisation's do-not-call list. |
| `without_consent` | `integer` | Marketing: contacts added without a consent record. The dialer skips them (§30A) unless consent is recorded first. |
| `consent_recorded` | `integer` | Consent records created from the evidence sent. |
| `errors` | `object[]` | Rejected rows (the first 100). |
| `warnings` | `object[]` | Rows added with a problem (the first 100). |
| `error` | `object \| null` | Why the import failed (status failed): a stable code and a message to show. |
| `error.code` | `string` | — |
| `error.message` | `string` | — |
| `created_at` | `string` | An ISO-8601 timestamp in UTC. |
| `started_at` | `string \| null` | — |
| `completed_at` | `string \| null` | — |

Example:

```json
{
  "campaign_id": "cmp_2Yb7mCq9aPLk",
  "completed_at": "2026-11-02T07:00:03.870Z",
  "consent_recorded": 0,
  "created_at": "2026-11-02T07:00:00.000Z",
  "error": null,
  "errors": [
    {
      "message": "too-short",
      "phone": "05012",
      "reason": "invalid",
      "row": 17
    }
  ],
  "filename": "contacts.csv",
  "id": "imp_7RkXq2Lm9PvTz4nB1c8Ya",
  "imported": 4890,
  "livemode": true,
  "object": "import",
  "received": 5000,
  "rejected": 110,
  "rejected_reasons": {
    "dnc": 20,
    "duplicate": 40,
    "invalid": 50
  },
  "source": "csv",
  "started_at": "2026-11-02T07:00:00.120Z",
  "status": "succeeded",
  "warnings": [],
  "without_consent": 0
}
```

### 400 Bad Request

The request is invalid: a parameter is missing, malformed or unknown, or the version header is unknown. Returns `ErrorEnvelope`.

### 401 Unauthorized

No valid API key was sent. Returns `ErrorEnvelope`.

### 403 Forbidden

The key may not do this (a missing scope, a plan limit, or a compliance block). Returns `ErrorEnvelope`.

### 404 Not Found

No object with this ID (in the path or the body) exists in this organisation and mode. Returns `ErrorEnvelope`.

### 429 Too Many Requests

Too many requests, or no call capacity right now. Retry after the Retry-After delay. Returns `ErrorEnvelope`.

### 500 Internal Server Error

Something went wrong on MoreVoice's side. Retry with the same Idempotency-Key. Returns `ErrorEnvelope`.

## Code samples

**TypeScript**

```ts
import MoreVoice from "@morevoice/sdk";

const mv = new MoreVoice(); // MOREVOICE_API_KEY from the environment

const contactImport = await mv.imports.retrieve("imp_7Hk2Lm9Qp");
console.log(contactImport);
```

**Python**

```python
from morevoice import MoreVoice

client = MoreVoice()  # MOREVOICE_API_KEY from the environment

contact_import = client.imports.retrieve("imp_7Hk2Lm9Qp")
print(contact_import)
```

**cURL**

```sh
curl https://api.morevoice.ai/v1/imports/imp_7Hk2Lm9Qp \
  -H "Authorization: Bearer $MOREVOICE_API_KEY"
```
