# Get an import

```http
GET https://trydimmi.com/api/v1/imports/{import}
```

## Authorization

Send an API token as `Authorization: Bearer <token>`.
The token needs: `contacts:write`.

## Path parameters

- `import` (string, required): Id of the import, starting with imp_, such as imp_01jx2m8k4t. Find it with GET /imports.

## Response 200 (OK)

- `data` (object, required)
  - `columns` (string[] | null, required): The file's header row: the column names in order.
  - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `created_count` (integer, required): How many records the import has created so far.
  - `error` (string | null, required): Why the whole import failed, in words. Null unless its status is failed.
  - `error_report_url` (string | null, required): API path of the report listing every failed row, such as /api/v1/imports/imp_.../errors. Null when no row failed.
  - `errors` (object[] | null, required): The first failed rows, at most 20, each with its line in the file and why it failed.
    - `message` (string, required): Why the row could not be imported, in plain words.
    - `row` (integer, required): Line of the file the failed row is on.
  - `failed_count` (integer, required): How many rows could not be imported so far.
  - `file_expired_at` (string | null, required): When the uploaded file was deleted, 30 days after the import finished. Null while the file is still kept.
  - `file_name` (string, required): Name of the uploaded file, such as customers.csv.
  - `finished_at` (string | null, required): When the import completed or failed. Null until then.
  - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
  - `kind` (string, required): What the file holds: contacts (customers) or companies.
  - `mapping` (object[] | null, required): The chosen mapping: which column fills which field. Empty until the import is started.
    - `column` (integer, required): The position of the file's column, counted from 0.
    - `field` (string, required): The field the column fills: email, name, external_id, phone, domain, company_name, company_domain, tags, or attribute.<key> for a custom attribute.
  - `mode` (string, required): What happens to a row matching an existing record: update changes that record, skip leaves it alone.
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `preview` (string[][] | null, required): The first 5 data rows of the file, each a list of cell texts in column order.
  - `processed_rows` (integer, required): How many rows have been handled so far; compare with row_count for progress.
  - `rollback` (object, required)
    - `error` (string | null, required): Why undoing the import failed, in words. Null unless the undo's status is failed.
    - `finished_at` (string | null, required): When the undo completed or failed. Null until then.
    - `kept` (integer, required): How many records the undo left as they are, because they changed or were used since the import.
    - `kept_records` (object[] | null, required): The first kept records, at most 100, each with its id, name and why it was kept.
      - `id` (string, required): The id of this record. Send it wherever an endpoint asks for this record; never use its name or title in its place.
      - `name` (string, required): Name of the record the undo left as it is.
      - `reason` (string, required): Why the record was kept, such as Changed since the import. or Has had a conversation since the import.
    - `processed` (integer, required): How many records the undo has handled so far; compare with total for progress.
    - `removed` (integer, required): How many records the undo deleted because the import had created them.
    - `requested_at` (string | null, required): When undoing the import was asked for.
    - `reverted` (integer, required): How many records the undo put back to what they were before the import.
    - `status` (string, required): Where undoing the import stands: queued, running, completed or failed.
    - `total` (integer, required): How many records the undo has to go through.
  - `rollback_until` (string | null, required): The time until which the import can be undone, 7 days after it finished. Null while it has not finished.
  - `row_count` (integer, required): How many data rows the file holds.
  - `skipped_count` (integer, required): How many rows were left out so far, such as rows matching an existing record in skip mode.
  - `started_at` (string | null, required): When the import began running. Null while it is a draft or queued.
  - `status` (string, required): Where the import stands: draft (uploaded, not started), queued, running, completed or failed.
  - `suggested_mapping` (object[] | null, required): The mapping guessed from the file's column names, to confirm or change before starting.
    - `column` (integer, required): The position of the file's column, counted from 0.
    - `field` (string, required): The field the column fills: email, name, external_id, phone, domain, company_name, company_domain, tags, or attribute.<key> for a custom attribute.
  - `updated_count` (integer, required): How many existing records the import has changed so far.

## Response default (Error)

- `code` (string, required): Stable code for programs to tell errors apart, such as validation_failed or internal_error.
- `errors` (object): Each rejected field mapped to its messages. Only present when the input was invalid.
- `message` (string, required): What went wrong, in words safe to show a person.

## Example request

```bash
curl --request GET \
  --url 'https://trydimmi.com/api/v1/imports/{import}' \
  --header 'Authorization: Bearer <token>'
```

## Example response

```json
{
  "data": {
    "columns": [
      "<string>"
    ],
    "created_at": "2026-11-01T09:30:00Z",
    "created_count": 123,
    "error": "<string>",
    "error_report_url": "<string>",
    "errors": [
      {
        "message": "<string>",
        "row": 123
      }
    ],
    "failed_count": 123,
    "file_expired_at": "2026-11-01T09:30:00Z",
    "file_name": "<string>",
    "finished_at": "2026-11-01T09:30:00Z",
    "id": "<string>",
    "kind": "<string>",
    "mapping": [
      {
        "column": 123,
        "field": "<string>"
      }
    ],
    "mode": "<string>",
    "object": "<string>",
    "preview": [
      [
        "<string>"
      ]
    ],
    "processed_rows": 123,
    "rollback": {
      "error": "<string>",
      "finished_at": "2026-11-01T09:30:00Z",
      "kept": 123,
      "kept_records": [
        {
          "id": "<string>",
          "name": "<string>",
          "reason": "<string>"
        }
      ],
      "processed": 123,
      "removed": 123,
      "requested_at": "2026-11-01T09:30:00Z",
      "reverted": 123,
      "status": "<string>",
      "total": 123
    },
    "rollback_until": "2026-11-01T09:30:00Z",
    "row_count": 123,
    "skipped_count": 123,
    "started_at": "2026-11-01T09:30:00Z",
    "status": "<string>",
    "suggested_mapping": [
      {
        "column": 123,
        "field": "<string>"
      }
    ],
    "updated_count": 123
  }
}
```

---

Index of all dimmi docs: https://trydimmi.com/llms.txt (full text: https://trydimmi.com/llms-full.txt)
