# List imports

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

## Authorization

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

## Query parameters

- `kind` (string, required): Which imports to list: contacts (imports of customers) or companies. Required. Such as contacts. One of: `contacts`, `companies`.

## Response 200 (OK)

- `data` (object[] | null, required): The items of this page, as a list; empty when nothing matches.
  - `created_at` (string, required): When it was created, as an RFC 3339 time, such as 2026-01-31T09:00:00Z.
  - `created_by_name` (string | null, required): Name of the teammate who started the import. Null when it is not known.
  - `created_count` (integer, required): How many records the import has created so far.
  - `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.
  - `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.
  - `object` (string, required): The kind of record this is, the same for every record of its kind, such as article.
  - `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.
  - `status` (string, required): Where the import stands: draft (uploaded, not started), queued, running, completed or failed.
  - `updated_count` (integer, required): How many existing records the import has changed so far.
- `links` (object): Addresses of related pages by name, such as next; left out when there are none.
- `meta` (object, required)
  - `next_cursor` (string | null, required): Send it as cursor to read the next page; null on the last page.
  - `per_page` (integer, required): How many items a page holds at most, such as 25.
  - `prev_cursor` (string | null, required): Send it as cursor to read the page before; null on the first page.
  - `total` (integer): How many items match in all; left out when the list does not count them.

## 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?kind=<kind>' \
  --header 'Authorization: Bearer <token>'
```

## Example response

```json
{
  "data": [
    {
      "created_at": "2026-11-01T09:30:00Z",
      "created_by_name": "<string>",
      "created_count": 123,
      "error_report_url": "<string>",
      "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>",
      "object": "<string>",
      "processed_rows": 123,
      "rollback": {
        "error": "<string>",
        "finished_at": "2026-11-01T09:30:00Z",
        "kept": 123,
        "kept_records": [
          {}
        ],
        "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,
      "status": "<string>",
      "updated_count": 123
    }
  ],
  "links": {
    "<key>": "<string>"
  },
  "meta": {
    "next_cursor": "<string>",
    "per_page": 123,
    "prev_cursor": "<string>",
    "total": 123
  }
}
```

---

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