Migrations
Archive a migration
Archives the migration, like Archive in the app — nothing is deleted. It drops out of GET /migrations (unless include_archived=true), stays readable and exportable, and every call that changes it (uploads, runs, answers, credentials, knowledge, the source connection, cancelling, PATCH) returns 409 with code: migration_archived. Restore it from the Archived page in Vern. Refused with 409 (code: imports_in_flight) while an import is in progress, including a preview waiting for approval — cancel the listed runs first. Archiving an archived migration is a no-op.
DELETE
/
migrations
/
{migration_id}
Archive a migration
curl --request DELETE \
--url https://app.vern.so/api/v1/migrations/{migration_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://app.vern.so/api/v1/migrations/{migration_id}"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://app.vern.so/api/v1/migrations/{migration_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.vern.so/api/v1/migrations/{migration_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.vern.so/api/v1/migrations/{migration_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://app.vern.so/api/v1/migrations/{migration_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.vern.so/api/v1/migrations/{migration_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"migration": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"external_id": "<string>",
"source": "<string>",
"status": "awaiting_files",
"templates": [
{
"slug": "<string>",
"name": "<string>"
}
],
"archived": true,
"created_at": "2023-11-07T05:31:56Z",
"url": "<string>"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "An import is still in progress for this company. Cancel it before archiving.",
"code": "imports_in_flight",
"runs": [
{
"id": "d4c3b2a1-9f8e-47d6-b5a4-c3d2e1f0a9b8",
"status": "awaiting_approval",
"updatedAt": "2026-06-19T15:40:02.000Z",
"runKind": "generate"
}
]
}{
"error": "Too many requests"
}{
"error": "<string>",
"code": "<string>"
}⌘I
Archive a migration
curl --request DELETE \
--url https://app.vern.so/api/v1/migrations/{migration_id} \
--header 'x-api-key: <api-key>'import requests
url = "https://app.vern.so/api/v1/migrations/{migration_id}"
headers = {"x-api-key": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'x-api-key': '<api-key>'}};
fetch('https://app.vern.so/api/v1/migrations/{migration_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.vern.so/api/v1/migrations/{migration_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.vern.so/api/v1/migrations/{migration_id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://app.vern.so/api/v1/migrations/{migration_id}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.vern.so/api/v1/migrations/{migration_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"migration": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"external_id": "<string>",
"source": "<string>",
"status": "awaiting_files",
"templates": [
{
"slug": "<string>",
"name": "<string>"
}
],
"archived": true,
"created_at": "2023-11-07T05:31:56Z",
"url": "<string>"
}
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "An import is still in progress for this company. Cancel it before archiving.",
"code": "imports_in_flight",
"runs": [
{
"id": "d4c3b2a1-9f8e-47d6-b5a4-c3d2e1f0a9b8",
"status": "awaiting_approval",
"updatedAt": "2026-06-19T15:40:02.000Z",
"runKind": "generate"
}
]
}{
"error": "Too many requests"
}{
"error": "<string>",
"code": "<string>"
}