# Server copies

Copy a planned server's disks into a new Pantech instance, in passes, then cut over.

Source: https://docs.pantechdynamics.com/api/server-copies

Start a copy from a planned `instance` item of a migration, naming the subnet and security group the new instance goes in. The disks come from the Pantech Migrate agent on the server (`source: agent`) or, on AWS, from EBS snapshots read with a separate copy role (`source: aws_snapshot`). The first pass copies every disk; `sync` copies only what changed; `cutover` takes the last pass after you stop the application, then creates the instance through the normal create path, billed like any other. Nothing is created before the cutover. See [copying servers and disks](https://docs.pantechdynamics.com/move/servers).

Endpoints:

- `POST /public/v1/migrations/{migration_id}/server-copies`: Copy a server
- `GET /public/v1/migrations/{migration_id}/server-copy-template`: Get the AWS copy role template
- `GET /public/v1/server-copies`: List server copies
- `GET /public/v1/server-copies/{copy_id}`: Get a server copy
- `POST /public/v1/server-copies/{copy_id}/sync`: Copy what changed
- `POST /public/v1/server-copies/{copy_id}/cutover`: Cut over
- `POST /public/v1/server-copies/{copy_id}/cancel`: Cancel a server copy

## The server copy object



- `id` (string, required): `sco_…`
- `migration_id` (string, required)
- `item_key` (string, required)
- `connection_id` (string, required)
- `source` (string, required): One of `agent`, `aws_snapshot`.
- `status` (string, required): One of `waiting`, `copying`, `synced`, `importing`, `creating_instance`, `completed`, `failed`, `cancelled`.
- `failure` (object or null)
  - `code` (string)
  - `message` (string)
- `os_family` (string, required): One of `linux`, `windows`.
- `boot_mode` (string or null): One of `bios`, `uefi`, `null`.
- `instance` (object, required)
  - `name` (string)
  - `plan_slug` (string)
  - `region` (string)
  - `subnet_id` (string or null)
  - `security_group_id` (string or null)
  - `ssh_key_id` (string or null)
  - `id` (string or null): Set once the instance is being created.
  - `order_id` (string or null)
- `disks` (array of object, required)
  - `index` (integer)
  - `role` (string): One of `root`, `data`.
  - `source` (string)
  - `size_bytes` (integer)
  - `snapshot_id` (string or null)
  - `volume_id` (string or null)
- `flags` (array of object, required)
  - `code` (string)
  - `blocking` (boolean)
  - `message` (string)
- `pass` (object or null)
  - `number` (integer)
  - `kind` (string): One of `full`, `delta`, `final`.
  - `started_at` (string or null)
- `pending_pass` (string or null): One of `full`, `delta`, `final`, `null`.
- `progress` (object, required)
  - `chunks_total` (integer)
  - `chunks_done` (integer)
  - `bytes_total` (integer)
  - `bytes_uploaded` (integer)
  - `wire_bytes` (integer)
  - `eta_seconds` (integer or null)
- `synced_at` (string or null)
- `expires_at` (string, required)
- `completed_at` (string or null)
- `created_at` (string, required)
- `updated_at` (string, required)
## Copy a server

```http
POST /public/v1/migrations/{migration_id}/server-copies
```

Starts copying one planned server's disks into a new Pantech instance in your organization, with the item's plan (or `plan_slug`), the subnet and security group you name, and optionally an SSH key. Nothing is created yet: the first pass copies every disk, `POST /public/v1/server-copies/{copy_id}/sync` copies what changed since, and `POST /public/v1/server-copies/{copy_id}/cutover` runs the last pass after you stop the application, then builds the instance through the normal create path, so it is billed, paid for and limited like any new instance. The copy itself is free.

With `source` `agent` (the default) the Pantech Migrate agent on the server checks it and sends its disks over HTTPS. With `aws_snapshot` Pantech reads EBS snapshots keylessly with a separate copy role: get its stack from `GET /public/v1/migrations/{migration_id}/server-copy-template`, deploy it, and pass its `CopyRoleArn`. Windows servers are copied with the agent only, and need Windows enabled for your organization. Owners and admins only.

Scope: `write`. Send an `Idempotency-Key` header.

Path parameters:

- `migration_id`

Body:

- `item_key` (string, required): The planned server's item key.
- `source` (string): One of `agent`, `aws_snapshot`. Defaults to `agent`.
- `name` (string): The new instance's name; the source's when empty.
- `plan_slug` (string): Overrides the item's plan.
- `subnet_id` (string)
- `security_group_id` (string)
- `ssh_key_id` (string): Optional. The copied disk keeps its own users and keys.
- `aws` (ServerCopyAWSSource)
  - `copy_role_arn` (string, required): The copy stack's CopyRoleArn output, never the discover role.
  - `create_snapshots` (boolean): The copy role may snapshot the server's volumes itself.
  - `snapshots` (object): The first pass's snapshot for each volume id, tagged pantech-migrate-connection.

Example:

```sh
curl -X POST "https://api.pantechdynamics.com/public/v1/migrations/mig_06gk3x9tq7m2v8r4y1c5d0zp8w/server-copies" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "item_key": "item-key",
    "ssh_key_id": "sshk_06gk3x9tq7m2v8r4y1c5d0zp8w"
  }'
```

Response `201`:

```json
{
  "id": "sco_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "migration_id": "mig_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "item_key": "item-key",
  "connection_id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "source": "agent",
  "status": "waiting",
  "failure": {
    "code": "starter",
    "message": "message"
  },
  "os_family": "linux",
  "boot_mode": "bios",
  "instance": {
    "name": "web-1",
    "plan_slug": "starter",
    "region": "af-abj",
    "subnet_id": "snet_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "security_group_id": "sg_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "ssh_key_id": "sshk_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "id": "sco_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "order_id": "ord_06gk3x9tq7m2v8r4y1c5d0zp8w"
  },
  "disks": [
    {
      "index": 1,
      "role": "root",
      "source": "source",
      "size_bytes": 1610612736,
      "snapshot_id": "snap_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "volume_id": "vol_06gk3x9tq7m2v8r4y1c5d0zp8w"
    }
  ],
  "flags": [
    {
      "code": "starter",
      "blocking": true,
      "message": "message"
    }
  ],
  "pass": {
    "number": 100,
    "kind": "full",
    "started_at": "2026-10-03T09:30:00Z"
  },
  "pending_pass": "full",
  "progress": {
    "chunks_total": 1,
    "chunks_done": 1,
    "bytes_total": 1,
    "bytes_uploaded": 1,
    "wire_bytes": 1,
    "eta_seconds": 1
  },
  "synced_at": "2026-10-03T09:30:00Z",
  "expires_at": "2026-10-03T09:30:00Z",
  "completed_at": "2026-10-03T09:30:00Z",
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z"
}
```

Errors:

- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the scope this endpoint needs (`read` for GET, `write` for changes; an AI app's key also needs `delete` for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key may not do this in the organization. Use a key created by an owner or admin.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (`Pantech-Client: mcp/…`). An owner can turn it on in the console under Organization › AI apps.
- `404`: `MIGRATION_NOT_FOUND`: no migration with this id exists in your organization.
- `409`: `SERVER_COPY_IN_PROGRESS`: this server already has a copy in progress. `IDEMPOTENCY_CONFLICT`: this Idempotency-Key was used for another request.
- `422`: `VALIDATION_FAILED`: `NOT_COPYABLE` (not a planned server), `INVALID_PLAN`, `INVALID_NAME`, `INVALID_SOURCE` (copy role or snapshots), `WINDOWS_NEEDS_AGENT`, `INVALID_DISKS` or `TARGET_NOT_FOUND` (subnet, security group or SSH key). `SERVER_COPY_LIMIT_REACHED` is a 403: five copies are in progress.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `SERVER_COPY_UNAVAILABLE` or `MIGRATE_UNAVAILABLE`: server copies are not available on this deployment yet. `SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Get the AWS copy role template

```http
GET /public/v1/migrations/{migration_id}/server-copy-template
```

The CloudFormation template of the AWS copy role for one planned server: it may read only snapshots tagged `pantech-migrate-connection` with this connection's id, and, with `create_snapshots=true`, also snapshot that server's own volumes and delete the snapshots it made. Deploy it after the connect stack; the discover role is never changed.

Scope: `read`.

Path parameters:

- `migration_id`

Query parameters:

- `item_key` (string, required)
- `create_snapshots` (boolean)

Example:

```sh
curl "https://api.pantechdynamics.com/public/v1/migrations/mig_06gk3x9tq7m2v8r4y1c5d0zp8w/server-copy-template?item_key=item-key" \
  -H "Authorization: Bearer $PANTECH_API_KEY"
```

Response `200`:

```json
{
  "template": "template",
  "snapshot_tag": {}
}
```

Errors:

- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the scope this endpoint needs (`read` for GET, `write` for changes; an AI app's key also needs `delete` for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key may not do this in the organization. Use a key created by an owner or admin.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (`Pantech-Client: mcp/…`). An owner can turn it on in the console under Organization › AI apps.
- `404`: `MIGRATION_NOT_FOUND` or no server with this item key.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `SERVER_COPY_UNAVAILABLE` or `MIGRATE_UNAVAILABLE`: server copies are not available on this deployment yet. `SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## List server copies

```http
GET /public/v1/server-copies
```

Every server copy in your organization, newest first, with its progress.

Scope: `read`.

Example:

```sh
curl "https://api.pantechdynamics.com/public/v1/server-copies" \
  -H "Authorization: Bearer $PANTECH_API_KEY"
```

Response `200`:

```json
{
  "data": [
    {
      "id": "sco_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "migration_id": "mig_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "item_key": "item-key",
      "connection_id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "source": "agent",
      "status": "waiting",
      "failure": {
        "code": "starter",
        "message": "message"
      },
      "os_family": "linux",
      "boot_mode": "bios",
      "instance": {
        "name": "web-1",
        "plan_slug": "starter",
        "region": "af-abj",
        "subnet_id": "snet_06gk3x9tq7m2v8r4y1c5d0zp8w",
        "security_group_id": "sg_06gk3x9tq7m2v8r4y1c5d0zp8w",
        "ssh_key_id": "sshk_06gk3x9tq7m2v8r4y1c5d0zp8w",
        "id": "sco_06gk3x9tq7m2v8r4y1c5d0zp8w",
        "order_id": "ord_06gk3x9tq7m2v8r4y1c5d0zp8w"
      },
      "disks": [
        {
          "index": 1,
          "role": "root",
          "source": "source",
          "size_bytes": 1610612736,
          "snapshot_id": "snap_06gk3x9tq7m2v8r4y1c5d0zp8w",
          "volume_id": "vol_06gk3x9tq7m2v8r4y1c5d0zp8w"
        }
      ],
      "flags": [
        {
          "code": "starter",
          "blocking": true,
          "message": "message"
        }
      ],
      "pass": {
        "number": 100,
        "kind": "full",
        "started_at": "2026-10-03T09:30:00Z"
      },
      "pending_pass": "full",
      "progress": {
        "chunks_total": 1,
        "chunks_done": 1,
        "bytes_total": 1,
        "bytes_uploaded": 1,
        "wire_bytes": 1,
        "eta_seconds": 1
      },
      "synced_at": "2026-10-03T09:30:00Z",
      "expires_at": "2026-10-03T09:30:00Z",
      "completed_at": "2026-10-03T09:30:00Z",
      "created_at": "2026-10-03T09:30:00Z",
      "updated_at": "2026-10-03T09:30:00Z"
    }
  ],
  "next_cursor": null
}
```

Errors:

- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the scope this endpoint needs (`read` for GET, `write` for changes; an AI app's key also needs `delete` for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key may not do this in the organization. Use a key created by an owner or admin.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (`Pantech-Client: mcp/…`). An owner can turn it on in the console under Organization › AI apps.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `SERVER_COPY_UNAVAILABLE` or `MIGRATE_UNAVAILABLE`: server copies are not available on this deployment yet. `SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Get a server copy

```http
GET /public/v1/server-copies/{copy_id}
```

One server copy: its status, the pre-flight's findings, the running pass and its progress (chunks, bytes and an estimate of the time left), and the instance once it is being created.

Scope: `read`.

Path parameters:

- `copy_id`

Example:

```sh
curl "https://api.pantechdynamics.com/public/v1/server-copies/sco_06gk3x9tq7m2v8r4y1c5d0zp8w" \
  -H "Authorization: Bearer $PANTECH_API_KEY"
```

Response `200`:

```json
{
  "id": "sco_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "migration_id": "mig_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "item_key": "item-key",
  "connection_id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "source": "agent",
  "status": "waiting",
  "failure": {
    "code": "starter",
    "message": "message"
  },
  "os_family": "linux",
  "boot_mode": "bios",
  "instance": {
    "name": "web-1",
    "plan_slug": "starter",
    "region": "af-abj",
    "subnet_id": "snet_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "security_group_id": "sg_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "ssh_key_id": "sshk_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "id": "sco_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "order_id": "ord_06gk3x9tq7m2v8r4y1c5d0zp8w"
  },
  "disks": [
    {
      "index": 1,
      "role": "root",
      "source": "source",
      "size_bytes": 1610612736,
      "snapshot_id": "snap_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "volume_id": "vol_06gk3x9tq7m2v8r4y1c5d0zp8w"
    }
  ],
  "flags": [
    {
      "code": "starter",
      "blocking": true,
      "message": "message"
    }
  ],
  "pass": {
    "number": 100,
    "kind": "full",
    "started_at": "2026-10-03T09:30:00Z"
  },
  "pending_pass": "full",
  "progress": {
    "chunks_total": 1,
    "chunks_done": 1,
    "bytes_total": 1,
    "bytes_uploaded": 1,
    "wire_bytes": 1,
    "eta_seconds": 1
  },
  "synced_at": "2026-10-03T09:30:00Z",
  "expires_at": "2026-10-03T09:30:00Z",
  "completed_at": "2026-10-03T09:30:00Z",
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z"
}
```

Errors:

- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the scope this endpoint needs (`read` for GET, `write` for changes; an AI app's key also needs `delete` for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key may not do this in the organization. Use a key created by an owner or admin.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (`Pantech-Client: mcp/…`). An owner can turn it on in the console under Organization › AI apps.
- `404`: `SERVER_COPY_NOT_FOUND`: no server copy with this id exists in your organization.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `SERVER_COPY_UNAVAILABLE` or `MIGRATE_UNAVAILABLE`: server copies are not available on this deployment yet. `SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Copy what changed

```http
POST /public/v1/server-copies/{copy_id}/sync
```

Asks for another pass that copies only what changed since the last one. For a copy from AWS snapshots that makes none itself, name each disk's new snapshot in `snapshots`. Owners and admins only.

Scope: `write`. Send an `Idempotency-Key` header.

Path parameters:

- `copy_id`

Body:

- `snapshots` (object): The next pass's snapshot for each volume id, for an AWS copy that makes none itself.

Example:

```sh
curl -X POST "https://api.pantechdynamics.com/public/v1/server-copies/sco_06gk3x9tq7m2v8r4y1c5d0zp8w/sync" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Response `202`:

```json
{
  "id": "sco_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "migration_id": "mig_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "item_key": "item-key",
  "connection_id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "source": "agent",
  "status": "waiting",
  "failure": {
    "code": "starter",
    "message": "message"
  },
  "os_family": "linux",
  "boot_mode": "bios",
  "instance": {
    "name": "web-1",
    "plan_slug": "starter",
    "region": "af-abj",
    "subnet_id": "snet_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "security_group_id": "sg_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "ssh_key_id": "sshk_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "id": "sco_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "order_id": "ord_06gk3x9tq7m2v8r4y1c5d0zp8w"
  },
  "disks": [
    {
      "index": 1,
      "role": "root",
      "source": "source",
      "size_bytes": 1610612736,
      "snapshot_id": "snap_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "volume_id": "vol_06gk3x9tq7m2v8r4y1c5d0zp8w"
    }
  ],
  "flags": [
    {
      "code": "starter",
      "blocking": true,
      "message": "message"
    }
  ],
  "pass": {
    "number": 100,
    "kind": "full",
    "started_at": "2026-10-03T09:30:00Z"
  },
  "pending_pass": "full",
  "progress": {
    "chunks_total": 1,
    "chunks_done": 1,
    "bytes_total": 1,
    "bytes_uploaded": 1,
    "wire_bytes": 1,
    "eta_seconds": 1
  },
  "synced_at": "2026-10-03T09:30:00Z",
  "expires_at": "2026-10-03T09:30:00Z",
  "completed_at": "2026-10-03T09:30:00Z",
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z"
}
```

Errors:

- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the scope this endpoint needs (`read` for GET, `write` for changes; an AI app's key also needs `delete` for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key may not do this in the organization. Use a key created by an owner or admin.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (`Pantech-Client: mcp/…`). An owner can turn it on in the console under Organization › AI apps.
- `404`: `SERVER_COPY_NOT_FOUND`: no server copy with this id exists in your organization.
- `409`: `SERVER_COPY_BUSY`: a pass is running or the server is being created. `SERVER_COPY_NOT_SYNCED`: the first pass has not finished. `SERVER_COPY_FINISHED`: the copy has finished, failed or been cancelled. `IDEMPOTENCY_CONFLICT`: this Idempotency-Key was used for another action.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `SERVER_COPY_UNAVAILABLE` or `MIGRATE_UNAVAILABLE`: server copies are not available on this deployment yet. `SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Cut over

```http
POST /public/v1/server-copies/{copy_id}/cutover
```

Asks for the last pass. Stop the application first: the agent flushes and freezes what it can, then copies the last changes, and Pantech builds the instance. Owners and admins only.

Scope: `write`. Send an `Idempotency-Key` header.

Path parameters:

- `copy_id`

Body:

- `snapshots` (object): The next pass's snapshot for each volume id, for an AWS copy that makes none itself.

Example:

```sh
curl -X POST "https://api.pantechdynamics.com/public/v1/server-copies/sco_06gk3x9tq7m2v8r4y1c5d0zp8w/cutover" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Response `202`:

```json
{
  "id": "sco_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "migration_id": "mig_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "item_key": "item-key",
  "connection_id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "source": "agent",
  "status": "waiting",
  "failure": {
    "code": "starter",
    "message": "message"
  },
  "os_family": "linux",
  "boot_mode": "bios",
  "instance": {
    "name": "web-1",
    "plan_slug": "starter",
    "region": "af-abj",
    "subnet_id": "snet_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "security_group_id": "sg_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "ssh_key_id": "sshk_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "id": "sco_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "order_id": "ord_06gk3x9tq7m2v8r4y1c5d0zp8w"
  },
  "disks": [
    {
      "index": 1,
      "role": "root",
      "source": "source",
      "size_bytes": 1610612736,
      "snapshot_id": "snap_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "volume_id": "vol_06gk3x9tq7m2v8r4y1c5d0zp8w"
    }
  ],
  "flags": [
    {
      "code": "starter",
      "blocking": true,
      "message": "message"
    }
  ],
  "pass": {
    "number": 100,
    "kind": "full",
    "started_at": "2026-10-03T09:30:00Z"
  },
  "pending_pass": "full",
  "progress": {
    "chunks_total": 1,
    "chunks_done": 1,
    "bytes_total": 1,
    "bytes_uploaded": 1,
    "wire_bytes": 1,
    "eta_seconds": 1
  },
  "synced_at": "2026-10-03T09:30:00Z",
  "expires_at": "2026-10-03T09:30:00Z",
  "completed_at": "2026-10-03T09:30:00Z",
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z"
}
```

Errors:

- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the scope this endpoint needs (`read` for GET, `write` for changes; an AI app's key also needs `delete` for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key may not do this in the organization. Use a key created by an owner or admin.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (`Pantech-Client: mcp/…`). An owner can turn it on in the console under Organization › AI apps.
- `404`: `SERVER_COPY_NOT_FOUND`: no server copy with this id exists in your organization.
- `409`: `SERVER_COPY_BUSY`: a pass is running or the server is being created. `SERVER_COPY_NOT_SYNCED`: the first pass has not finished. `SERVER_COPY_FINISHED`: the copy has finished, failed or been cancelled. `IDEMPOTENCY_CONFLICT`: this Idempotency-Key was used for another action.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `SERVER_COPY_UNAVAILABLE` or `MIGRATE_UNAVAILABLE`: server copies are not available on this deployment yet. `SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Cancel a server copy

```http
POST /public/v1/server-copies/{copy_id}/cancel
```

Stops the copy and deletes everything Pantech staged for it. Refused once the instance is being created: it is yours then, delete it as any instance. Owners and admins only.

Scope: `write`. Send an `Idempotency-Key` header.

Path parameters:

- `copy_id`

Body:

- `snapshots` (object): The next pass's snapshot for each volume id, for an AWS copy that makes none itself.

Example:

```sh
curl -X POST "https://api.pantechdynamics.com/public/v1/server-copies/sco_06gk3x9tq7m2v8r4y1c5d0zp8w/cancel" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Response `202`:

```json
{
  "id": "sco_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "migration_id": "mig_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "item_key": "item-key",
  "connection_id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "source": "agent",
  "status": "waiting",
  "failure": {
    "code": "starter",
    "message": "message"
  },
  "os_family": "linux",
  "boot_mode": "bios",
  "instance": {
    "name": "web-1",
    "plan_slug": "starter",
    "region": "af-abj",
    "subnet_id": "snet_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "security_group_id": "sg_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "ssh_key_id": "sshk_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "id": "sco_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "order_id": "ord_06gk3x9tq7m2v8r4y1c5d0zp8w"
  },
  "disks": [
    {
      "index": 1,
      "role": "root",
      "source": "source",
      "size_bytes": 1610612736,
      "snapshot_id": "snap_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "volume_id": "vol_06gk3x9tq7m2v8r4y1c5d0zp8w"
    }
  ],
  "flags": [
    {
      "code": "starter",
      "blocking": true,
      "message": "message"
    }
  ],
  "pass": {
    "number": 100,
    "kind": "full",
    "started_at": "2026-10-03T09:30:00Z"
  },
  "pending_pass": "full",
  "progress": {
    "chunks_total": 1,
    "chunks_done": 1,
    "bytes_total": 1,
    "bytes_uploaded": 1,
    "wire_bytes": 1,
    "eta_seconds": 1
  },
  "synced_at": "2026-10-03T09:30:00Z",
  "expires_at": "2026-10-03T09:30:00Z",
  "completed_at": "2026-10-03T09:30:00Z",
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z"
}
```

Errors:

- `401`: `UNAUTHENTICATED`: the request has no API key, or the key is mistyped, revoked or expired, or its creator has left the organization. Send `Authorization: Bearer PAN_…` with a valid key; create one in the console under Organization › API keys.
- `403`: `INSUFFICIENT_SCOPE`: the API key lacks the scope this endpoint needs (`read` for GET, `write` for changes; an AI app's key also needs `delete` for a destructive call). Use a key with that scope, or reconnect the AI app with "Manage and delete" access.
`FORBIDDEN`: the member who created the key may not do this in the organization. Use a key created by an owner or admin.
`AI_APPS_DISABLED`: the organization has turned AI app access off, and this request was made with an AI app's key or sent by Pantech's MCP server (`Pantech-Client: mcp/…`). An owner can turn it on in the console under Organization › AI apps.
- `404`: `SERVER_COPY_NOT_FOUND`: no server copy with this id exists in your organization.
- `409`: `SERVER_COPY_BUSY`: a pass is running or the server is being created. `SERVER_COPY_NOT_SYNCED`: the first pass has not finished. `SERVER_COPY_FINISHED`: the copy has finished, failed or been cancelled. `IDEMPOTENCY_CONFLICT`: this Idempotency-Key was used for another action.
- `429`: `RATE_LIMITED`: this API key, verified user or organization used its request budget for the current window, or this address exceeded an IP/failed-auth limit. Wait `Retry-After` seconds, then retry. For authenticated quota denials, `RateLimit-Scope` identifies the denying quota and `RateLimit-Reset` reports its remaining window in seconds.
- `503`: `SERVER_COPY_UNAVAILABLE` or `MIGRATE_UNAVAILABLE`: server copies are not available on this deployment yet. `SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
