Skip to main content
These endpoints manage migrations after you’ve created them. They cover every migration in your account, including companies created in the Vern app — an app-created company is addressed by its company id, which the company page shows as Migration ID.

Authentication

Requires an x-api-key header. The key can address every migration in its account; a migration from another account returns 404, never 403. See Authentication.

The migration object

Every endpoint here returns migrations in the same shape:
string (uuid)
The migration ID — pass it to every other call.
string
The display name.
string | null
Your own identifier for this customer, or null.
string | null
The source name, or null for a sourceless migration.
string
awaiting_files, ready, awaiting_approval or completed — see Core concepts → Migration. Omitted from list results, because working it out costs several lookups per migration; get the migration to read it.
object[]
The templates that have a sheet in this migration, each { slug, name }.
boolean
true once the migration is archived.
string (date-time)
When the migration was created.
string
Opens the company in the Vern app. /companies/open/{key} also accepts the external_id in place of the id.

List migrations

Returns your migrations newest first, a page at a time.
string
Exact match on the migration’s external ID (the one shown on its company page). Alphanumeric, hyphens and underscores, at most 255 characters.
string
Only migrations from this source, by name. A name that matches no source returns an empty page, not a 404.
boolean
default:"false"
Pass true to include archived migrations. By default they’re left out.
integer
default:"50"
Page size, from 1 to 200.
string
The next_cursor from the previous page. Omit it for the first page.
string | null
Pass it as cursor to get the next page. null on the last page. Treat it as opaque.
To page through everything, repeat the call with each next_cursor until it comes back null:
To find the migration for one of your customers, filter by external_id:

Get a migration

Returns { "migration": { … } }, including its status. Archived migrations can still be read.

Update a migration

The API version of the app’s Edit company and Add New Sheet. Send only the fields you want to change; any other field is refused with 400.
string
New display name. Must not be blank.
string | null
The source name to bind, or null (or empty) to make the migration sourceless.
string | null
A new external ID, or null to clear it. Alphanumeric, hyphens and underscores, at most 255 characters, and unique among your migrations.
string[]
Template slugs to add. Each one without a sheet gets a new, empty sheet; slugs that already have one are skipped. Templates are never removed this way, because removing one would drop its sheet and data.
Changing source or adding templates is refused with 409 (code: "imports_in_flight") while an import is in progress for the migration — including a preview waiting for approval — because it would change what that import reads from or writes into. Cancel it or let it finish first. name and external_id can always change.
200 OK with the updated { "migration": { … } }.

Archive a migration

Archives the migration, like Archive in the app. Nothing is deleted:
  • It drops out of GET /migrations unless you pass include_archived=true.
  • It stays readable — the migration, its runs, files, preview, thread, session log and knowledge — and exportable.
  • Anything that changes it is refused with 409 and code: "migration_archived": uploads, runs, answers, credentials, knowledge, source connection, cancelling a run, and PATCH.
To bring it back, restore it from the Archived page in Vern. There is no restore endpoint. You can’t archive while an import is in progress, including a preview waiting for approval: the request is refused with 409, code: "imports_in_flight", and the runs to cancel first:
Archiving an archived migration does nothing and returns the same 200.
200 OK with the migration, now "archived": true.

Errors

See Errors & limits for the shared error model.

Next