# Migrations and more API

Import historical conversations, contacts, companies, and help center articles from other tools using the dimmi migrations REST API endpoints.

- `GET /migrations` - List migrations: Lists the workspace's migrations from other tools with where each stands. Returns up to 100 migrations, newest first.
- `POST /migrations` - Start or resume a migration: Starts a migration of history from another tool for one account there, or returns the one under way for the same source and account. Records are sent by the dimmi CLI. Needs imports:manage. Returns the migration with its progress.
- `POST /migrations/{migration}/lookups` - Look up records of a migration: Says where each record named by its id in the other tool stands: applied with the dimmi id it became, deferred, failed, unsupported, or missing when the migration never received it. Use it to check a sample after a run. Returns one entry per source id, in the order asked.
- `POST /migrations/{migration}/records` - Send migration records: Applies a batch of 1 to 100 records of one kind in dimmi's import format to the migration, as quiet history: nothing is sent and no event goes out. Each record is kept under its source_id, so sending it again updates what it became or skips it when unchanged, and a record naming one not sent yet waits for it. It needs the settings:write ability and the imports:manage permission. Returns a result per record, in the order sent, and the waiting records this batch let through.
- `POST /migrations/{migration}/rollbacks` - Undo a migration: Undoes everything the migration created, in the background: conversations, contacts, articles and tickets go to the trash, tags, notes and replies are deleted. Records others now use are kept. Needs imports:rollback. Returns the migration with status rolling_back; poll it until rolled_back.
- `GET /migrations/{migration}` - Get a migration: Reads one migration: how many records of each kind were applied, wait for another record, failed or are not supported yet, and the latest problems with why. Returns the migration with counts per kind and its latest problems.

---

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