# Migrate

Connect another cloud without sharing keys, scan what runs there, plan the move with prices and a Terraform export, and invite the people it lists.

Source: https://docs.pantechdynamics.com/api/migrate

`GET /cloud-providers` lists every cloud Migrate reads and how. Create a cloud connection with its `provider`, then follow its `setup`. For AWS, Google Cloud, Azure and Huawei Cloud (`access: federated`) you run the setup in your own cloud and send back what it prints with `PATCH`: a role ARN, or the `gcp`, `azure` or `huawei` details. Pantech then reads your cloud with five-minute tokens it signs for this connection only. For DigitalOcean, Hetzner Cloud, Linode, Vultr, Contabo and OpenStack (`access: agent`) you run the Pantech Migrate agent with a read-only token that never leaves your machine, enrolled with a one-time code. Wait for `status` `connected`, start a scan, follow it until it `succeeded`, then plan a migration from it. A plan creates nothing: review it, edit it, export it as Terraform, and invite the people it lists. Moving data is on the [bucket imports](https://docs.pantechdynamics.com/api/bucket-imports), [server copies](https://docs.pantechdynamics.com/api/server-copies), [database imports](https://docs.pantechdynamics.com/api/database-imports) and [Kubernetes moves](https://docs.pantechdynamics.com/api/kubernetes-moves) pages. See [Move to Pantech](https://docs.pantechdynamics.com/move/overview).

Endpoints:

- `GET /public/v1/cloud-connections`: List cloud connections
- `POST /public/v1/cloud-connections`: Connect a cloud account
- `GET /public/v1/cloud-connections/{connection_id}`: Get a cloud connection
- `PATCH /public/v1/cloud-connections/{connection_id}`: Update a cloud connection
- `DELETE /public/v1/cloud-connections/{connection_id}`: Disconnect a cloud account
- `GET /public/v1/cloud-connections/{connection_id}/scans`: List scans
- `POST /public/v1/cloud-connections/{connection_id}/scans`: Scan a cloud account
- `GET /public/v1/cloud-scans/{scan_id}`: Get a scan
- `GET /public/v1/migrations`: List migrations
- `POST /public/v1/migrations`: Plan a migration
- `GET /public/v1/migrations/{migration_id}`: Get a migration
- `PATCH /public/v1/migrations/{migration_id}`: Rename a migration
- `DELETE /public/v1/migrations/{migration_id}`: Delete a migration
- `PATCH /public/v1/migrations/{migration_id}/items`: Edit a plan item
- `GET /public/v1/migrations/{migration_id}/terraform`: Export a migration as Terraform
- `GET /public/v1/cloud-providers`: List the clouds Migrate can read
- `POST /public/v1/cloud-connections/{connection_id}/agent-enrollments`: Enroll a Migrate agent
- `DELETE /public/v1/cloud-connections/{connection_id}/agent`: Revoke a connection's agent
- `POST /public/v1/migrations/{migration_id}/invites`: Invite a plan's people

## The cloud provider object



- `slug` (string, required): One of `aws`, `gcp`, `azure`, `huawei`, `digitalocean`, `hetzner`, `linode`, `vultr`, `contabo`, `openstack`.
- `name` (string, required)
- `access` (string, required): One of `federated`, `agent`.
- `cost_readable` (boolean, required): Whether a scan reads the source's spend. When false the comparison says the spend is not available.
- `people_readable` (boolean, required): Whether a scan lists the people with access. When false, add them to the plan by hand.
- `available` (boolean, required): Whether this deployment can connect it now.
## The cloud connection object



- `id` (string, required)
- `provider` (string, required): One of `aws`, `gcp`, `azure`, `huawei`, `digitalocean`, `hetzner`, `linode`, `vultr`, `contabo`, `openstack`.
- `name` (string, required)
- `status` (string, required): `awaiting_role` (federated providers: waiting for what the setup printed), `awaiting_agent` (other clouds: no agent enrolled; on AWS, Google Cloud, Azure and Huawei Cloud an agent never changes the status), `verifying`, `connected` or `failed`. One of `awaiting_role`, `awaiting_agent`, `verifying`, `connected`, `failed`.
- `failure` (CloudFailure, required): Why the last check or scan failed; null when it didn't.
  - `code` (string, required): One of `assume_role_denied`, `permission_missing`, `provider_unavailable`, `scan_too_large`, `internal`, `agent_offline`, `token_rejected`, `invalid_upload`.
  - `message` (string, required): What to do about it.
- `role_arn` (string or null, required)
- `aws_account_id` (string or null, required): Set for AWS connections only; see external_account_id.
- `external_account_id` (string or null, required): The source account: an AWS account, a Google Cloud pool's project number, an Azure tenant, or what the agent reported.
- `gcp` (CloudGCPFederation, required): What the Google Cloud setup printed.
  - `project_number` (string, required)
  - `pool_id` (string, required)
  - `provider_id` (string, required)
  - `service_account_email` (string, required)
  - `project_ids` (array of string, required): The projects to scan, 1 to 20.
- `azure` (CloudAzureFederation, required): What the Azure setup printed.
  - `tenant_id` (string, required)
  - `client_id` (string, required): The app registration's application (client) ID.
  - `subscription_ids` (array of string, required): The subscriptions to scan, 1 to 20.
- `huawei` (CloudHuaweiFederation, required): Your Huawei Cloud identity provider and the projects to scan.
  - `identity_provider_id` (string, required)
  - `projects` (array of object, required): 1 to 20 region projects.
    - `region` (string, required)
    - `id` (string, required)
- `agent` (CloudAgentStatus, required): The connection's enrolled agent; null when none is.
  - `id` (string, required)
  - `online` (boolean, required): Whether it polled in the last 2 minutes.
  - `agent_version` (string, required)
  - `platform` (string, required)
  - `enrolled_at` (string, required)
  - `last_seen_at` (string, required)
  - `credential_expires_at` (string, required)
- `verified_at` (string or null, required)
- `created_at` (string, required)
- `updated_at` (string, required)
- `setup` (CloudConnectionSetup, required): What you run in your own cloud to connect it. Every setup grants read-only access, listed one permission at a time in `permissions`; none creates a key Pantech holds.
  - `access` (string, required): `federated`: Pantech reads your cloud with 5-minute tokens it signs for this connection only (AWS, Google Cloud, Azure, Huawei Cloud). `agent`: you run the Pantech Migrate agent, which keeps your read-only token on your machine. One of `federated`, `agent`.
  - `issuer_url` (string or null, required): Pantech's identity provider URL, which your cloud trusts; null for agent providers.
  - `audience` (string or null, required): The audience every token carries; null for agent providers.
  - `subject` (string, required): The subject your trust policy requires: this connection's id.
  - `quick_create_url` (string or null, required): Opens AWS's create-stack page with this template and connection filled in; null when not offered.
  - `template` (string, required): The main setup file: AWS's CloudFormation template (JSON), Google Cloud's gcloud script, Azure's Azure CLI script, Huawei Cloud's steps, or, for agent providers, how to make a read-only token.
  - `template_format` (string, required): One of `cloudformation`, `shell`, `markdown`, `agent`.
  - `files` (array of object, required): Further setup files, such as a Terraform version of the setup or JSON documents to paste.
    - `name` (string, required)
    - `content` (string, required)
  - `permissions` (array of string, required): Every read-only permission the setup grants.
  - `agent` (CloudAgentSetup, required): How to run the connection's Pantech Migrate agent. Every connection may have one: for AWS, Google Cloud, Azure and Huawei Cloud it runs server copies, database imports and Kubernetes moves and needs no cloud credential (`token_variables` is empty); for the other clouds it also scans, with your read-only credential. Null when the agent is not available.
    - `image` (string, required): The agent's container image.
    - `download_url` (string or null, required): Where the agent's binaries are published.
    - `api_url` (string, required)
    - `token_variables` (array of string, required): The environment variables the agent reads your read-only credential from, on your machine. It is never sent to Pantech. Empty for AWS, Google Cloud, Azure and Huawei Cloud, where Pantech scans without one.
    - `token_how_to` (string, required)
    - `enroll_command` (string, required): Contains `<ENROLLMENT_CODE>` where the one-time code goes.
    - `run_command` (string, required)
    - `container_command` (string, required)
## The cloud scan object



- `id` (string, required)
- `connection_id` (string, required)
- `runner` (string, required): `worker` (Pantech read your cloud) or `agent` (your agent did). One of `worker`, `agent`.
- `status` (string, required): One of `queued`, `running`, `succeeded`, `failed`.
- `failure` (CloudFailure, required): Why the last check or scan failed; null when it didn't.
  - `code` (string, required): One of `assume_role_denied`, `permission_missing`, `provider_unavailable`, `scan_too_large`, `internal`, `agent_offline`, `token_rejected`, `invalid_upload`.
  - `message` (string, required): What to do about it.
- `created_at` (string, required)
- `started_at` (string or null, required)
- `finished_at` (string or null, required)
- `provider` (string or null, required)
- `aws_account_id` (string or null, required)
- `external_account_id` (string or null, required)
- `regions` (array of string, required): Regions read.
- `counts` (CloudScanCounts, required)
  - `instances` (integer, required)
  - `volumes` (integer, required)
  - `networks` (integer, required)
  - `subnets` (integer, required)
  - `security_groups` (integer, required)
  - `public_ips` (integer, required)
  - `load_balancers` (integer, required)
  - `databases` (integer, required)
  - `buckets` (integer, required)
  - `users` (integer, required)
  - `ssh_keys` (integer, required)
  - `kubernetes_clusters` (integer, required)
- `cost` (CloudCost, required): The source account's whole bill, every service.
  - `currency` (string, required)
  - `average_monthly_minor` (integer, required): Average of the months, in minor units of currency.
  - `months` (array of CloudCostMonth, required)
    - `month` (string, required): YYYY-MM.
    - `amount_minor` (integer, required)
- `warnings` (array of string, required): Parts not read, e.g. `cost_unavailable` or `region_denied:eu-south-1`.
- `truncated` (array of string, required): Kinds cut at 2,000 items.
- `inventory` (CloudInventory, required): Everything a scan found.
  - `instances` (array of object, required)
    - `id` (string, required)
    - `name` (string or null, required)
    - `region` (string, required)
    - `zone` (string or null, required)
    - `instance_type` (string, required)
    - `state` (string, required)
    - `vcpu` (integer or null, required)
    - `memory_mib` (integer or null, required)
    - `architecture` (string, required)
    - `platform` (string, required)
    - `os_name` (string or null, required)
    - `volume_ids` (array of string, required)
    - `network_id` (string or null, required)
    - `subnet_id` (string or null, required)
    - `security_group_ids` (array of string, required)
    - `public_ip` (string or null, required)
    - `private_ip` (string or null, required)
    - `key_name` (string or null, required)
    - `launched_at` (string or null, required)
  - `volumes` (array of object, required)
    - `id` (string, required)
    - `region` (string, required)
    - `zone` (string or null, required)
    - `type` (string, required)
    - `size_gb` (integer, required)
    - `attached_to` (string or null, required)
    - `device` (string or null, required)
    - `encrypted` (boolean, required)
  - `networks` (array of object, required)
    - `id` (string, required)
    - `region` (string, required)
    - `name` (string or null, required)
    - `cidr` (string, required)
    - `is_default` (boolean, required)
  - `subnets` (array of object, required)
    - `id` (string, required)
    - `region` (string, required)
    - `network_id` (string, required)
    - `name` (string or null, required)
    - `cidr` (string, required)
    - `zone` (string or null, required)
    - `maps_public_ip` (boolean, required)
  - `security_groups` (array of object, required)
    - `id` (string, required)
    - `region` (string, required)
    - `network_id` (string or null, required)
    - `name` (string, required)
    - `description` (string or null, required)
    - `rules` (array of object, required)
      - `direction` (string, required): One of `ingress`, `egress`.
      - `protocol` (string, required)
      - `from_port` (integer or null, required)
      - `to_port` (integer or null, required)
      - `cidr` (string or null, required)
      - `ipv6_cidr` (string or null, required)
      - `source_group_id` (string or null, required)
      - `prefix_list_id` (string or null, required)
  - `public_ips` (array of object, required)
    - `id` (string, required)
    - `region` (string, required)
    - `address` (string, required)
    - `instance_id` (string or null, required)
  - `load_balancers` (array of object, required)
    - `id` (string, required)
    - `region` (string, required)
    - `name` (string, required)
    - `type` (string, required)
    - `scheme` (string, required)
    - `network_id` (string or null, required)
    - `listeners` (array of MigrationListener, required)
      - `protocol` (string, required)
      - `port` (integer, required)
  - `databases` (array of object, required)
    - `id` (string, required)
    - `region` (string, required)
    - `engine` (string, required)
    - `engine_version` (string, required)
    - `instance_class` (string, required)
    - `vcpu` (integer or null, required)
    - `memory_mib` (integer or null, required)
    - `storage_gb` (integer, required)
    - `multi_az` (boolean, required)
    - `publicly_accessible` (boolean, required)
  - `buckets` (array of object, required)
    - `name` (string, required)
    - `region` (string or null, required)
    - `created_at` (string or null, required)
  - `users` (array of object, required)
    - `id` (string or null, required)
    - `name` (string, required)
    - `email` (string or null, required)
    - `is_admin` (boolean, required)
    - `source` (string or null, required): Where the person came from: `iam_user`, `identity_center`, `gcp_iam`, `entra`, `team`.
    - `access_level` (string or null, required): One of `admin`, `write`, `read`, `null`.
    - `roles` (array of string, required): The source cloud's own role names.
    - `created_at` (string or null, required)
  - `ssh_keys` (array of object, required)
    - `name` (string, required)
    - `region` (string, required)
    - `fingerprint` (string or null, required)
    - `public_key` (string or null, required)
  - `kubernetes_clusters` (array of CloudKubernetesCluster, required)
    - `id` (string, required)
    - `name` (string, required)
    - `region` (string, required)
    - `provider` (string, required): Who runs the control plane: eks, gke, aks, doks, lke or self_managed.
    - `version` (string or null, required)
    - `endpoint_public` (boolean, required)
    - `node_pools` (array of CloudNodePool, required)
      - `name` (string, required)
      - `instance_type` (string or null, required)
      - `vcpu` (integer or null, required)
      - `memory_mib` (integer or null, required)
      - `architecture` (string, required)
      - `gpu` (boolean, required)
      - `windows` (boolean, required)
      - `desired` (integer, required)
      - `autoscaling` (boolean, required)
      - `min` (integer, required)
      - `max` (integer, required)
    - `addons` (array of string, required)
    - `created_at` (string or null, required)
## The migration object



- `id` (string, required)
- `name` (string, required)
- `region` (string, required)
- `connection_id` (string, required)
- `scan_id` (string, required)
- `stage` (string, required): `planning`. Copying arrives in a later release. One of `planning`.
- `version` (integer, required)
- `summary` (MigrationSummary, required)
  - `planned` (integer, required)
  - `excluded` (integer, required)
  - `unsupported` (integer, required)
  - `by_kind` (object, required): Planned items per kind.
- `estimate` (MigrationEstimate, required): Pantech's monthly price for the plan next to the source's monthly bill, computed when read.
  - `currency` (string, required)
  - `pantech_priced` (boolean, required): False when part of the plan could not be priced; then pantech_monthly_minor is null.
  - `pantech_monthly_minor` (integer or null, required)
  - `covers` (array of string, required): What the Pantech price includes: servers, volumes, networks.
  - `not_covered` (array of string, required): Planned items the price leaves out, e.g. databases.
  - `source_known` (boolean, required)
  - `source_monthly_minor` (integer or null, required)
  - `source_currency` (string or null, required)
  - `source_months` (integer, required)
  - `source_scope` (string, required): `whole_account`: the source figure is the whole cloud bill. One of `whole_account`.
- `items` (array of MigrationItem, required): Null in a list.
  - `key` (string, required): Stable across edits: kind, region and the source id.
  - `kind` (string, required): One of `network`, `subnet`, `security_group`, `instance`, `volume`, `public_ip`, `load_balancer`, `database`, `ssh_key`, `user`, `bucket`, `kubernetes_cluster`.
  - `source` (MigrationItemSource, required)
    - `id` (string, required)
    - `name` (string or null, required)
    - `region` (string or null, required)
    - `summary` (string, required)
    - `vcpu` (integer or null, required)
    - `memory_mib` (integer or null, required)
    - `disk_gb` (integer or null, required)
  - `status` (string, required): One of `planned`, `excluded`, `unsupported`.
  - `flags` (array of MigrationFlag, required)
    - `code` (string, required)
    - `message` (string, required)
    - `blocking` (boolean, required): A blocking flag makes the item unsupported.
  - `target` (MigrationItemTarget, required): What the item becomes on Pantech; fields that don't apply to its kind are null or empty.
    - `bucket` (MigrationBucketTarget, required): The Pantech bucket a bucket item becomes; null for every other kind.
      - `name` (string or null, required): A valid Pantech bucket name made from the source's; null when none could be made.
      - `region` (string, required)
      - `versioning` (boolean, required)
      - `public_read` (boolean, required): The source bucket was public. The Pantech bucket stays private unless the copy asks.
      - `size_bytes` (integer or null, required): The source's own daily metric, read by the scan; null when unknown.
      - `object_count` (integer or null, required): The source's own daily metric, read by the scan; null when unknown.
      - `size_as_of` (string or null, required): The day (YYYY-MM-DD) the size and object count describe: show them as "as of" this day.
    - `plan_slug` (string or null, required)
    - `disk_gb` (integer or null, required)
    - `cidr` (string or null, required)
    - `network_key` (string or null, required)
    - `subnet_key` (string or null, required)
    - `instance_key` (string or null, required)
    - `rules` (array of MigrationRule, required)
      - `direction` (string, required): One of `ingress`, `egress`.
      - `protocol` (string, required): One of `tcp`, `udp`, `icmp`, `all`.
      - `port_range` (string or null, required)
      - `cidr` (string, required)
    - `engine` (string or null, required)
    - `engine_version` (string or null, required)
    - `storage_gb` (integer or null, required)
    - `role` (string or null, required): One of `admin`, `member`, `null`.
    - `email` (string or null, required)
    - `public_key` (string or null, required)
    - `listeners` (array of MigrationListener, required)
      - `protocol` (string, required)
      - `port` (integer, required)
    - `image_slug` (string or null, required): The image a server is planned on when its operating system decides it (Windows Server).
    - `invite_id` (string or null, required): The Pantech invite sent to this person from this plan.
    - `invited_at` (string or null, required)
    - `kubernetes` (MigrationKubernetesTarget, required): What a kubernetes_cluster item becomes on Pantech; null for every other kind.
      - `version_id` (string or null, required)
      - `version` (string or null, required)
      - `node_pools` (array of MigrationNodePool, required)
        - `name` (string, required)
        - `plan_slug` (string or null, required)
        - `count` (integer, required)
        - `autoscaling` (boolean, required)
        - `min` (integer, required)
        - `max` (integer, required)
        - `source_name` (string, required)
      - `addons` (array of string, required)
      - `allow_downgrade` (boolean, required): The customer consented to a lower Kubernetes version than the source runs.
- `created_at` (string, required)
- `updated_at` (string, required)
## The migration item object



- `key` (string, required): Stable across edits: kind, region and the source id.
- `kind` (string, required): One of `network`, `subnet`, `security_group`, `instance`, `volume`, `public_ip`, `load_balancer`, `database`, `ssh_key`, `user`, `bucket`, `kubernetes_cluster`.
- `source` (MigrationItemSource, required)
  - `id` (string, required)
  - `name` (string or null, required)
  - `region` (string or null, required)
  - `summary` (string, required)
  - `vcpu` (integer or null, required)
  - `memory_mib` (integer or null, required)
  - `disk_gb` (integer or null, required)
- `status` (string, required): One of `planned`, `excluded`, `unsupported`.
- `flags` (array of MigrationFlag, required)
  - `code` (string, required)
  - `message` (string, required)
  - `blocking` (boolean, required): A blocking flag makes the item unsupported.
- `target` (MigrationItemTarget, required): What the item becomes on Pantech; fields that don't apply to its kind are null or empty.
  - `bucket` (MigrationBucketTarget, required): The Pantech bucket a bucket item becomes; null for every other kind.
    - `name` (string or null, required): A valid Pantech bucket name made from the source's; null when none could be made.
    - `region` (string, required)
    - `versioning` (boolean, required)
    - `public_read` (boolean, required): The source bucket was public. The Pantech bucket stays private unless the copy asks.
    - `size_bytes` (integer or null, required): The source's own daily metric, read by the scan; null when unknown.
    - `object_count` (integer or null, required): The source's own daily metric, read by the scan; null when unknown.
    - `size_as_of` (string or null, required): The day (YYYY-MM-DD) the size and object count describe: show them as "as of" this day.
  - `plan_slug` (string or null, required)
  - `disk_gb` (integer or null, required)
  - `cidr` (string or null, required)
  - `network_key` (string or null, required)
  - `subnet_key` (string or null, required)
  - `instance_key` (string or null, required)
  - `rules` (array of MigrationRule, required)
    - `direction` (string, required): One of `ingress`, `egress`.
    - `protocol` (string, required): One of `tcp`, `udp`, `icmp`, `all`.
    - `port_range` (string or null, required)
    - `cidr` (string, required)
  - `engine` (string or null, required)
  - `engine_version` (string or null, required)
  - `storage_gb` (integer or null, required)
  - `role` (string or null, required): One of `admin`, `member`, `null`.
  - `email` (string or null, required)
  - `public_key` (string or null, required)
  - `listeners` (array of MigrationListener, required)
    - `protocol` (string, required)
    - `port` (integer, required)
  - `image_slug` (string or null, required): The image a server is planned on when its operating system decides it (Windows Server).
  - `invite_id` (string or null, required): The Pantech invite sent to this person from this plan.
  - `invited_at` (string or null, required)
  - `kubernetes` (MigrationKubernetesTarget, required): What a kubernetes_cluster item becomes on Pantech; null for every other kind.
    - `version_id` (string or null, required)
    - `version` (string or null, required)
    - `node_pools` (array of MigrationNodePool, required)
      - `name` (string, required)
      - `plan_slug` (string or null, required)
      - `count` (integer, required)
      - `autoscaling` (boolean, required)
      - `min` (integer, required)
      - `max` (integer, required)
      - `source_name` (string, required)
    - `addons` (array of string, required)
    - `allow_downgrade` (boolean, required): The customer consented to a lower Kubernetes version than the source runs.
## List cloud connections

```http
GET /public/v1/cloud-connections
```

Your organization's connections to other cloud accounts, newest first. Each carries its setup: the template that creates the read-only role in your account.

Scope: `read`.

Example:

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

Response `200`:

```json
{
  "data": [
    {
      "id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "provider": "aws",
      "name": "web-1",
      "status": "awaiting_role",
      "failure": {
        "code": "assume_role_denied",
        "message": "message"
      },
      "role_arn": "role-arn",
      "aws_account_id": "aws-account-id",
      "external_account_id": "external-account-id",
      "gcp": {
        "project_number": "project-number",
        "pool_id": "pool-id",
        "provider_id": "provider-id",
        "service_account_email": "service-account-email",
        "project_ids": [
          "project-ids"
        ]
      },
      "azure": {
        "tenant_id": "tenant-id",
        "client_id": "client-id",
        "subscription_ids": [
          "subscription-ids"
        ]
      },
      "huawei": {
        "identity_provider_id": "identity-provider-id",
        "projects": [
          {
            "region": "af-abj",
            "id": "id"
          }
        ]
      },
      "agent": {
        "id": "cag_06gk3x9tq7m2v8r4y1c5d0zp8w",
        "online": true,
        "agent_version": "agent-version",
        "platform": "platform",
        "enrolled_at": "2026-10-03T09:30:00Z",
        "last_seen_at": "2026-10-03T09:30:00Z",
        "credential_expires_at": "2026-10-03T09:30:00Z"
      },
      "verified_at": "2026-10-03T09:30:00Z",
      "created_at": "2026-10-03T09:30:00Z",
      "updated_at": "2026-10-03T09:30:00Z",
      "setup": {
        "access": "federated",
        "issuer_url": "issuer-url",
        "audience": "audience",
        "subject": "subject",
        "quick_create_url": "quick-create-url",
        "template": "template",
        "template_format": "cloudformation",
        "files": [
          {
            "name": "web-1",
            "content": "content"
          }
        ],
        "permissions": [
          "permissions"
        ],
        "agent": {
          "image": "image",
          "download_url": "download-url",
          "api_url": "api-url",
          "token_variables": [
            "token-variables"
          ],
          "token_how_to": "token-how-to",
          "enroll_command": "enroll-command",
          "run_command": "run-command",
          "container_command": "container-command"
        }
      }
    }
  ],
  "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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Connect a cloud account

```http
POST /public/v1/cloud-connections
```

Starts a connection to an AWS account. Nothing is shared yet: the response's `setup` holds a CloudFormation template (and, when available, a one-click `quick_create_url`) that creates, in your AWS account, a read-only role only Pantech can assume, with short-lived tokens for this one connection. No access keys are ever sent to Pantech.

Create the stack, then send its `RoleArn` output with `PATCH /public/v1/cloud-connections/{connection_id}`. At most 10 connections per organization. Owners and admins only.

**Idempotency:** a retry with the same `Idempotency-Key` returns the connection the first request made; the same key with a different name returns `409 IDEMPOTENCY_CONFLICT`.

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

Body:

- `provider` (string): `aws`, the default, or another provider `GET /cloud-providers` lists. One of `aws`, `gcp`, `azure`, `huawei`, `digitalocean`, `hetzner`, `linode`, `vultr`, `contabo`, `openstack`.
- `name` (string, required): 1 to 100 characters, for example `Production AWS`.

Example:

```sh
curl -X POST "https://api.pantechdynamics.com/public/v1/cloud-connections" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "web-1"
  }'
```

Response `201`:

```json
{
  "id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "provider": "aws",
  "name": "web-1",
  "status": "awaiting_role",
  "failure": {
    "code": "assume_role_denied",
    "message": "message"
  },
  "role_arn": "role-arn",
  "aws_account_id": "aws-account-id",
  "external_account_id": "external-account-id",
  "gcp": {
    "project_number": "project-number",
    "pool_id": "pool-id",
    "provider_id": "provider-id",
    "service_account_email": "service-account-email",
    "project_ids": [
      "project-ids"
    ]
  },
  "azure": {
    "tenant_id": "tenant-id",
    "client_id": "client-id",
    "subscription_ids": [
      "subscription-ids"
    ]
  },
  "huawei": {
    "identity_provider_id": "identity-provider-id",
    "projects": [
      {
        "region": "af-abj",
        "id": "id"
      }
    ]
  },
  "agent": {
    "id": "cag_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "online": true,
    "agent_version": "agent-version",
    "platform": "platform",
    "enrolled_at": "2026-10-03T09:30:00Z",
    "last_seen_at": "2026-10-03T09:30:00Z",
    "credential_expires_at": "2026-10-03T09:30:00Z"
  },
  "verified_at": "2026-10-03T09:30:00Z",
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z",
  "setup": {
    "access": "federated",
    "issuer_url": "issuer-url",
    "audience": "audience",
    "subject": "subject",
    "quick_create_url": "quick-create-url",
    "template": "template",
    "template_format": "cloudformation",
    "files": [
      {
        "name": "web-1",
        "content": "content"
      }
    ],
    "permissions": [
      "permissions"
    ],
    "agent": {
      "image": "image",
      "download_url": "download-url",
      "api_url": "api-url",
      "token_variables": [
        "token-variables"
      ],
      "token_how_to": "token-how-to",
      "enroll_command": "enroll-command",
      "run_command": "run-command",
      "container_command": "container-command"
    }
  }
}
```

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.
- `409`: `IDEMPOTENCY_CONFLICT`: this Idempotency-Key was used with a different request.
- `422`: `VALIDATION_FAILED`: a field is invalid; `errors` names it. `provider` must be `aws`.
- `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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Get a cloud connection

```http
GET /public/v1/cloud-connections/{connection_id}
```

One connection, with its status and setup. `status` is `awaiting_role` until you send the role ARN, `verifying` while Pantech tries it, then `connected` or `failed` (see `failure`).

Scope: `read`.

Path parameters:

- `connection_id`

Example:

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

Response `200`:

```json
{
  "id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "provider": "aws",
  "name": "web-1",
  "status": "awaiting_role",
  "failure": {
    "code": "assume_role_denied",
    "message": "message"
  },
  "role_arn": "role-arn",
  "aws_account_id": "aws-account-id",
  "external_account_id": "external-account-id",
  "gcp": {
    "project_number": "project-number",
    "pool_id": "pool-id",
    "provider_id": "provider-id",
    "service_account_email": "service-account-email",
    "project_ids": [
      "project-ids"
    ]
  },
  "azure": {
    "tenant_id": "tenant-id",
    "client_id": "client-id",
    "subscription_ids": [
      "subscription-ids"
    ]
  },
  "huawei": {
    "identity_provider_id": "identity-provider-id",
    "projects": [
      {
        "region": "af-abj",
        "id": "id"
      }
    ]
  },
  "agent": {
    "id": "cag_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "online": true,
    "agent_version": "agent-version",
    "platform": "platform",
    "enrolled_at": "2026-10-03T09:30:00Z",
    "last_seen_at": "2026-10-03T09:30:00Z",
    "credential_expires_at": "2026-10-03T09:30:00Z"
  },
  "verified_at": "2026-10-03T09:30:00Z",
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z",
  "setup": {
    "access": "federated",
    "issuer_url": "issuer-url",
    "audience": "audience",
    "subject": "subject",
    "quick_create_url": "quick-create-url",
    "template": "template",
    "template_format": "cloudformation",
    "files": [
      {
        "name": "web-1",
        "content": "content"
      }
    ],
    "permissions": [
      "permissions"
    ],
    "agent": {
      "image": "image",
      "download_url": "download-url",
      "api_url": "api-url",
      "token_variables": [
        "token-variables"
      ],
      "token_how_to": "token-how-to",
      "enroll_command": "enroll-command",
      "run_command": "run-command",
      "container_command": "container-command"
    }
  }
}
```

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`: `CLOUD_CONNECTION_NOT_FOUND`: no cloud connection 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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Update a cloud connection

```http
PATCH /public/v1/cloud-connections/{connection_id}
```

Renames a connection, sets the role ARN your stack created, or retries a failed check (`retry: true`). Setting `role_arn` or `retry` queues a verification: Pantech assumes the role and reads which AWS account it belongs to, usually within a minute. Owners and admins only.

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

Path parameters:

- `connection_id`

Body:

- `name` (string)
- `role_arn` (string): AWS: the stack's RoleArn output.
- `gcp` (CloudGCPFederation): What the Google Cloud setup printed.
  - `project_number` (string, required)
  - `pool_id` (string, required)
  - `provider_id` (string, required)
  - `service_account_email` (string, required)
  - `project_ids` (array of string, required): The projects to scan, 1 to 20.
- `azure` (CloudAzureFederation): What the Azure setup printed.
  - `tenant_id` (string, required)
  - `client_id` (string, required): The app registration's application (client) ID.
  - `subscription_ids` (array of string, required): The subscriptions to scan, 1 to 20.
- `huawei` (CloudHuaweiFederation): Your Huawei Cloud identity provider and the projects to scan.
  - `identity_provider_id` (string, required)
  - `projects` (array of object, required): 1 to 20 region projects.
    - `region` (string, required)
    - `id` (string, required)
- `retry` (boolean): Check the connection again.

Example:

```sh
curl -X PATCH "https://api.pantechdynamics.com/public/v1/cloud-connections/ccn_06gk3x9tq7m2v8r4y1c5d0zp8w" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{}'
```

Response `200`:

```json
{
  "id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "provider": "aws",
  "name": "web-1",
  "status": "awaiting_role",
  "failure": {
    "code": "assume_role_denied",
    "message": "message"
  },
  "role_arn": "role-arn",
  "aws_account_id": "aws-account-id",
  "external_account_id": "external-account-id",
  "gcp": {
    "project_number": "project-number",
    "pool_id": "pool-id",
    "provider_id": "provider-id",
    "service_account_email": "service-account-email",
    "project_ids": [
      "project-ids"
    ]
  },
  "azure": {
    "tenant_id": "tenant-id",
    "client_id": "client-id",
    "subscription_ids": [
      "subscription-ids"
    ]
  },
  "huawei": {
    "identity_provider_id": "identity-provider-id",
    "projects": [
      {
        "region": "af-abj",
        "id": "id"
      }
    ]
  },
  "agent": {
    "id": "cag_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "online": true,
    "agent_version": "agent-version",
    "platform": "platform",
    "enrolled_at": "2026-10-03T09:30:00Z",
    "last_seen_at": "2026-10-03T09:30:00Z",
    "credential_expires_at": "2026-10-03T09:30:00Z"
  },
  "verified_at": "2026-10-03T09:30:00Z",
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z",
  "setup": {
    "access": "federated",
    "issuer_url": "issuer-url",
    "audience": "audience",
    "subject": "subject",
    "quick_create_url": "quick-create-url",
    "template": "template",
    "template_format": "cloudformation",
    "files": [
      {
        "name": "web-1",
        "content": "content"
      }
    ],
    "permissions": [
      "permissions"
    ],
    "agent": {
      "image": "image",
      "download_url": "download-url",
      "api_url": "api-url",
      "token_variables": [
        "token-variables"
      ],
      "token_how_to": "token-how-to",
      "enroll_command": "enroll-command",
      "run_command": "run-command",
      "container_command": "container-command"
    }
  }
}
```

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`: `CLOUD_CONNECTION_NOT_FOUND`: no cloud connection with this id exists in your organization.
- `409`: `CONFLICT`: the connection changed at the same time. Read it again and retry.
- `422`: `VALIDATION_FAILED`: a field is invalid; `errors` names it. `role_arn` must be the stack's RoleArn output, like `arn:aws:iam::123456789012:role/name`.
- `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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Disconnect a cloud account

```http
DELETE /public/v1/cloud-connections/{connection_id}
```

Removes the connection and its scans from Pantech; migration plans made from it stay. To revoke access on the AWS side too, delete the CloudFormation stack. Disconnecting only takes access away, so it needs `write`, not `delete`. Owners and admins only.

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

Path parameters:

- `connection_id`

Example:

```sh
curl -X DELETE "https://api.pantechdynamics.com/public/v1/cloud-connections/ccn_06gk3x9tq7m2v8r4y1c5d0zp8w" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

Response `204`: Disconnected.

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`: `CLOUD_CONNECTION_NOT_FOUND`: no cloud connection 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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## List scans

```http
GET /public/v1/cloud-connections/{connection_id}/scans
```

A connection's scans, newest first, without their inventories. The 10 newest finished scans are kept.

Scope: `read`.

Path parameters:

- `connection_id`

Example:

```sh
curl "https://api.pantechdynamics.com/public/v1/cloud-connections/ccn_06gk3x9tq7m2v8r4y1c5d0zp8w/scans" \
  -H "Authorization: Bearer $PANTECH_API_KEY"
```

Response `200`:

```json
{
  "data": [
    {
      "id": "csn_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "connection_id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "runner": "worker",
      "status": "queued",
      "failure": {
        "code": "assume_role_denied",
        "message": "message"
      },
      "created_at": "2026-10-03T09:30:00Z",
      "started_at": "2026-10-03T09:30:00Z",
      "finished_at": "2026-10-03T09:30:00Z",
      "provider": "provider",
      "aws_account_id": "aws-account-id",
      "external_account_id": "external-account-id",
      "regions": [
        "regions"
      ],
      "counts": {
        "instances": 1,
        "volumes": 1,
        "networks": 1,
        "subnets": 1,
        "security_groups": 1,
        "public_ips": 1,
        "load_balancers": 1,
        "databases": 1,
        "buckets": 1,
        "users": 1,
        "ssh_keys": 1,
        "kubernetes_clusters": 1
      },
      "cost": {
        "currency": "NGN",
        "average_monthly_minor": 1,
        "months": [
          {
            "month": "month",
            "amount_minor": 1059200
          }
        ]
      },
      "warnings": [
        "warnings"
      ],
      "truncated": [
        "truncated"
      ],
      "inventory": {
        "instances": [
          {
            "id": "id",
            "name": "web-1",
            "region": "af-abj",
            "zone": "af-abj-1",
            "instance_type": "instance-type",
            "state": "state",
            "vcpu": 2,
            "memory_mib": 1,
            "architecture": "architecture",
            "platform": "platform",
            "os_name": "os-name",
            "volume_ids": [
              "volume-ids"
            ],
            "network_id": "net_06gk3x9tq7m2v8r4y1c5d0zp8w",
            "subnet_id": "snet_06gk3x9tq7m2v8r4y1c5d0zp8w",
            "security_group_ids": [
              "sg_06gk3x9tq7m2v8r4y1c5d0zp8w"
            ],
            "public_ip": "public-ip",
            "private_ip": "<server-private-ip>",
            "key_name": "key-name",
            "launched_at": "2026-10-03T09:30:00Z"
          }
        ],
        "volumes": [
          {
            "id": "id",
            "region": "af-abj",
            "zone": "af-abj-1",
            "type": "compute",
            "size_gb": 20,
            "attached_to": "attached-to",
            "device": "device",
            "encrypted": true
          }
        ],
        "networks": [
          {
            "id": "id",
            "region": "af-abj",
            "name": "web-1",
            "cidr": "<vpc-cidr>",
            "is_default": true
          }
        ],
        "subnets": [
          {
            "id": "id",
            "region": "af-abj",
            "network_id": "net_06gk3x9tq7m2v8r4y1c5d0zp8w",
            "name": "web-1",
            "cidr": "<vpc-cidr>",
            "zone": "af-abj-1",
            "maps_public_ip": true
          }
        ],
        "security_groups": [
          {
            "id": "id",
            "region": "af-abj",
            "network_id": "net_06gk3x9tq7m2v8r4y1c5d0zp8w",
            "name": "web-1",
            "description": "description",
            "rules": [
              {
                "direction": "ingress",
                "protocol": "protocol",
                "from_port": 1,
                "to_port": 1,
                "cidr": "<vpc-cidr>",
                "ipv6_cidr": "ipv6-cidr",
                "source_group_id": "source-group-id",
                "prefix_list_id": "prefix-list-id"
              }
            ]
          }
        ],
        "public_ips": [
          {
            "id": "id",
            "region": "af-abj",
            "address": "<public-ip>",
            "instance_id": "vm_06gk3x9tq7m2v8r4y1c5d0zp8w"
          }
        ],
        "load_balancers": [
          {
            "id": "id",
            "region": "af-abj",
            "name": "web-1",
            "type": "compute",
            "scheme": "scheme",
            "network_id": "net_06gk3x9tq7m2v8r4y1c5d0zp8w",
            "listeners": [
              {
                "protocol": "protocol",
                "port": 22
              }
            ]
          }
        ],
        "databases": [
          {
            "id": "id",
            "region": "af-abj",
            "engine": "postgresql",
            "engine_version": "engine-version",
            "instance_class": "instance-class",
            "vcpu": 2,
            "memory_mib": 1,
            "storage_gb": 100,
            "multi_az": true,
            "publicly_accessible": true
          }
        ],
        "buckets": [
          {
            "name": "web-1",
            "region": "af-abj",
            "created_at": "2026-10-03T09:30:00Z"
          }
        ],
        "users": [
          {
            "id": "id",
            "name": "web-1",
            "email": "email",
            "is_admin": true,
            "source": "source",
            "access_level": "admin",
            "roles": [
              "roles"
            ],
            "created_at": "2026-10-03T09:30:00Z"
          }
        ],
        "ssh_keys": [
          {
            "name": "web-1",
            "region": "af-abj",
            "fingerprint": "SHA256:Qm8vWv3n7rC1bK0pXcFZ9yS2t4uJ6hLdA5gE8iRqTzo",
            "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample deploy@ci"
          }
        ],
        "kubernetes_clusters": [
          {
            "id": "id",
            "name": "web-1",
            "region": "af-abj",
            "provider": "provider",
            "version": "version",
            "endpoint_public": true,
            "node_pools": [
              {
                "name": null,
                "instance_type": null,
                "vcpu": null,
                "memory_mib": null,
                "architecture": null,
                "gpu": null,
                "windows": null,
                "desired": null,
                "autoscaling": null,
                "min": null,
                "max": null
              }
            ],
            "addons": [
              "addons"
            ],
            "created_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.
- `404`: `CLOUD_CONNECTION_NOT_FOUND`: no cloud connection 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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Scan a cloud account

```http
POST /public/v1/cloud-connections/{connection_id}/scans
```

Queues a read of everything the role can see: servers, disks, networks, firewall groups, public addresses, load balancers, databases, bucket names, users, SSH keys and the last three months of spend, in every enabled region. Follow it with `GET /public/v1/cloud-scans/{scan_id}` until `status` is `succeeded` or `failed`; most accounts take under five minutes. Reading spend costs USD 0.01 on your AWS bill. Owners and admins only.

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

Path parameters:

- `connection_id`

Example:

```sh
curl -X POST "https://api.pantechdynamics.com/public/v1/cloud-connections/ccn_06gk3x9tq7m2v8r4y1c5d0zp8w/scans" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

Response `202`:

```json
{
  "id": "csn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "connection_id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "runner": "worker",
  "status": "queued",
  "failure": {
    "code": "assume_role_denied",
    "message": "message"
  },
  "created_at": "2026-10-03T09:30:00Z",
  "started_at": "2026-10-03T09:30:00Z",
  "finished_at": "2026-10-03T09:30:00Z",
  "provider": "provider",
  "aws_account_id": "aws-account-id",
  "external_account_id": "external-account-id",
  "regions": [
    "regions"
  ],
  "counts": {
    "instances": 1,
    "volumes": 1,
    "networks": 1,
    "subnets": 1,
    "security_groups": 1,
    "public_ips": 1,
    "load_balancers": 1,
    "databases": 1,
    "buckets": 1,
    "users": 1,
    "ssh_keys": 1,
    "kubernetes_clusters": 1
  },
  "cost": {
    "currency": "NGN",
    "average_monthly_minor": 1,
    "months": [
      {
        "month": "month",
        "amount_minor": 1059200
      }
    ]
  },
  "warnings": [
    "warnings"
  ],
  "truncated": [
    "truncated"
  ],
  "inventory": {
    "instances": [
      {
        "id": "id",
        "name": "web-1",
        "region": "af-abj",
        "zone": "af-abj-1",
        "instance_type": "instance-type",
        "state": "state",
        "vcpu": 2,
        "memory_mib": 1,
        "architecture": "architecture",
        "platform": "platform",
        "os_name": "os-name",
        "volume_ids": [
          "volume-ids"
        ],
        "network_id": "net_06gk3x9tq7m2v8r4y1c5d0zp8w",
        "subnet_id": "snet_06gk3x9tq7m2v8r4y1c5d0zp8w",
        "security_group_ids": [
          "sg_06gk3x9tq7m2v8r4y1c5d0zp8w"
        ],
        "public_ip": "public-ip",
        "private_ip": "<server-private-ip>",
        "key_name": "key-name",
        "launched_at": "2026-10-03T09:30:00Z"
      }
    ],
    "volumes": [
      {
        "id": "id",
        "region": "af-abj",
        "zone": "af-abj-1",
        "type": "compute",
        "size_gb": 20,
        "attached_to": "attached-to",
        "device": "device",
        "encrypted": true
      }
    ],
    "networks": [
      {
        "id": "id",
        "region": "af-abj",
        "name": "web-1",
        "cidr": "<vpc-cidr>",
        "is_default": true
      }
    ],
    "subnets": [
      {
        "id": "id",
        "region": "af-abj",
        "network_id": "net_06gk3x9tq7m2v8r4y1c5d0zp8w",
        "name": "web-1",
        "cidr": "<vpc-cidr>",
        "zone": "af-abj-1",
        "maps_public_ip": true
      }
    ],
    "security_groups": [
      {
        "id": "id",
        "region": "af-abj",
        "network_id": "net_06gk3x9tq7m2v8r4y1c5d0zp8w",
        "name": "web-1",
        "description": "description",
        "rules": [
          {
            "direction": "ingress",
            "protocol": "protocol",
            "from_port": 1,
            "to_port": 1,
            "cidr": "<vpc-cidr>",
            "ipv6_cidr": "ipv6-cidr",
            "source_group_id": "source-group-id",
            "prefix_list_id": "prefix-list-id"
          }
        ]
      }
    ],
    "public_ips": [
      {
        "id": "id",
        "region": "af-abj",
        "address": "<public-ip>",
        "instance_id": "vm_06gk3x9tq7m2v8r4y1c5d0zp8w"
      }
    ],
    "load_balancers": [
      {
        "id": "id",
        "region": "af-abj",
        "name": "web-1",
        "type": "compute",
        "scheme": "scheme",
        "network_id": "net_06gk3x9tq7m2v8r4y1c5d0zp8w",
        "listeners": [
          {
            "protocol": "protocol",
            "port": 22
          }
        ]
      }
    ],
    "databases": [
      {
        "id": "id",
        "region": "af-abj",
        "engine": "postgresql",
        "engine_version": "engine-version",
        "instance_class": "instance-class",
        "vcpu": 2,
        "memory_mib": 1,
        "storage_gb": 100,
        "multi_az": true,
        "publicly_accessible": true
      }
    ],
    "buckets": [
      {
        "name": "web-1",
        "region": "af-abj",
        "created_at": "2026-10-03T09:30:00Z"
      }
    ],
    "users": [
      {
        "id": "id",
        "name": "web-1",
        "email": "email",
        "is_admin": true,
        "source": "source",
        "access_level": "admin",
        "roles": [
          "roles"
        ],
        "created_at": "2026-10-03T09:30:00Z"
      }
    ],
    "ssh_keys": [
      {
        "name": "web-1",
        "region": "af-abj",
        "fingerprint": "SHA256:Qm8vWv3n7rC1bK0pXcFZ9yS2t4uJ6hLdA5gE8iRqTzo",
        "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample deploy@ci"
      }
    ],
    "kubernetes_clusters": [
      {
        "id": "id",
        "name": "web-1",
        "region": "af-abj",
        "provider": "provider",
        "version": "version",
        "endpoint_public": true,
        "node_pools": [
          {
            "name": "web-1",
            "instance_type": "instance-type",
            "vcpu": 2,
            "memory_mib": 1,
            "architecture": "architecture",
            "gpu": true,
            "windows": true,
            "desired": 1,
            "autoscaling": true,
            "min": 1,
            "max": 1
          }
        ],
        "addons": [
          "addons"
        ],
        "created_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`: `CLOUD_CONNECTION_NOT_FOUND`: no cloud connection with this id exists in your organization.
- `409`: `CLOUD_CONNECTION_NOT_CONNECTED`: finish connecting first. `CLOUD_CONNECTION_VERIFYING`: the connection is still being checked. `CLOUD_SCAN_IN_PROGRESS`: a scan is already running. `IDEMPOTENCY_CONFLICT`: this Idempotency-Key was used for another connection.
- `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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Get a scan

```http
GET /public/v1/cloud-scans/{scan_id}
```

A scan's status, what it found (`counts`, `cost`, `regions`), and the parts it could not read (`warnings`). Add `include=inventory` for every item it found. Names and tags in the inventory are your own text, returned unchanged.

Scope: `read`.

Path parameters:

- `scan_id`

Query parameters:

- `include` (string): `inventory` returns everything the scan found. One of `inventory`.

Example:

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

Response `200`:

```json
{
  "id": "csn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "connection_id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "runner": "worker",
  "status": "queued",
  "failure": {
    "code": "assume_role_denied",
    "message": "message"
  },
  "created_at": "2026-10-03T09:30:00Z",
  "started_at": "2026-10-03T09:30:00Z",
  "finished_at": "2026-10-03T09:30:00Z",
  "provider": "provider",
  "aws_account_id": "aws-account-id",
  "external_account_id": "external-account-id",
  "regions": [
    "regions"
  ],
  "counts": {
    "instances": 1,
    "volumes": 1,
    "networks": 1,
    "subnets": 1,
    "security_groups": 1,
    "public_ips": 1,
    "load_balancers": 1,
    "databases": 1,
    "buckets": 1,
    "users": 1,
    "ssh_keys": 1,
    "kubernetes_clusters": 1
  },
  "cost": {
    "currency": "NGN",
    "average_monthly_minor": 1,
    "months": [
      {
        "month": "month",
        "amount_minor": 1059200
      }
    ]
  },
  "warnings": [
    "warnings"
  ],
  "truncated": [
    "truncated"
  ],
  "inventory": {
    "instances": [
      {
        "id": "id",
        "name": "web-1",
        "region": "af-abj",
        "zone": "af-abj-1",
        "instance_type": "instance-type",
        "state": "state",
        "vcpu": 2,
        "memory_mib": 1,
        "architecture": "architecture",
        "platform": "platform",
        "os_name": "os-name",
        "volume_ids": [
          "volume-ids"
        ],
        "network_id": "net_06gk3x9tq7m2v8r4y1c5d0zp8w",
        "subnet_id": "snet_06gk3x9tq7m2v8r4y1c5d0zp8w",
        "security_group_ids": [
          "sg_06gk3x9tq7m2v8r4y1c5d0zp8w"
        ],
        "public_ip": "public-ip",
        "private_ip": "<server-private-ip>",
        "key_name": "key-name",
        "launched_at": "2026-10-03T09:30:00Z"
      }
    ],
    "volumes": [
      {
        "id": "id",
        "region": "af-abj",
        "zone": "af-abj-1",
        "type": "compute",
        "size_gb": 20,
        "attached_to": "attached-to",
        "device": "device",
        "encrypted": true
      }
    ],
    "networks": [
      {
        "id": "id",
        "region": "af-abj",
        "name": "web-1",
        "cidr": "<vpc-cidr>",
        "is_default": true
      }
    ],
    "subnets": [
      {
        "id": "id",
        "region": "af-abj",
        "network_id": "net_06gk3x9tq7m2v8r4y1c5d0zp8w",
        "name": "web-1",
        "cidr": "<vpc-cidr>",
        "zone": "af-abj-1",
        "maps_public_ip": true
      }
    ],
    "security_groups": [
      {
        "id": "id",
        "region": "af-abj",
        "network_id": "net_06gk3x9tq7m2v8r4y1c5d0zp8w",
        "name": "web-1",
        "description": "description",
        "rules": [
          {
            "direction": "ingress",
            "protocol": "protocol",
            "from_port": 1,
            "to_port": 1,
            "cidr": "<vpc-cidr>",
            "ipv6_cidr": "ipv6-cidr",
            "source_group_id": "source-group-id",
            "prefix_list_id": "prefix-list-id"
          }
        ]
      }
    ],
    "public_ips": [
      {
        "id": "id",
        "region": "af-abj",
        "address": "<public-ip>",
        "instance_id": "vm_06gk3x9tq7m2v8r4y1c5d0zp8w"
      }
    ],
    "load_balancers": [
      {
        "id": "id",
        "region": "af-abj",
        "name": "web-1",
        "type": "compute",
        "scheme": "scheme",
        "network_id": "net_06gk3x9tq7m2v8r4y1c5d0zp8w",
        "listeners": [
          {
            "protocol": "protocol",
            "port": 22
          }
        ]
      }
    ],
    "databases": [
      {
        "id": "id",
        "region": "af-abj",
        "engine": "postgresql",
        "engine_version": "engine-version",
        "instance_class": "instance-class",
        "vcpu": 2,
        "memory_mib": 1,
        "storage_gb": 100,
        "multi_az": true,
        "publicly_accessible": true
      }
    ],
    "buckets": [
      {
        "name": "web-1",
        "region": "af-abj",
        "created_at": "2026-10-03T09:30:00Z"
      }
    ],
    "users": [
      {
        "id": "id",
        "name": "web-1",
        "email": "email",
        "is_admin": true,
        "source": "source",
        "access_level": "admin",
        "roles": [
          "roles"
        ],
        "created_at": "2026-10-03T09:30:00Z"
      }
    ],
    "ssh_keys": [
      {
        "name": "web-1",
        "region": "af-abj",
        "fingerprint": "SHA256:Qm8vWv3n7rC1bK0pXcFZ9yS2t4uJ6hLdA5gE8iRqTzo",
        "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample deploy@ci"
      }
    ],
    "kubernetes_clusters": [
      {
        "id": "id",
        "name": "web-1",
        "region": "af-abj",
        "provider": "provider",
        "version": "version",
        "endpoint_public": true,
        "node_pools": [
          {
            "name": "web-1",
            "instance_type": "instance-type",
            "vcpu": 2,
            "memory_mib": 1,
            "architecture": "architecture",
            "gpu": true,
            "windows": true,
            "desired": 1,
            "autoscaling": true,
            "min": 1,
            "max": 1
          }
        ],
        "addons": [
          "addons"
        ],
        "created_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`: `CLOUD_SCAN_NOT_FOUND`: no scan 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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## List migrations

```http
GET /public/v1/migrations
```

Your organization's migration plans, newest first, without their items or estimate.

Scope: `read`.

Example:

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

Response `200`:

```json
{
  "data": [
    {
      "id": "mig_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "name": "web-1",
      "region": "af-abj",
      "connection_id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "scan_id": "csn_06gk3x9tq7m2v8r4y1c5d0zp8w",
      "stage": "planning",
      "version": 1,
      "summary": {
        "planned": 1,
        "excluded": 1,
        "unsupported": 1,
        "by_kind": {}
      },
      "estimate": {
        "currency": "NGN",
        "pantech_priced": true,
        "pantech_monthly_minor": 1,
        "covers": [
          "covers"
        ],
        "not_covered": [
          "not-covered"
        ],
        "source_known": true,
        "source_monthly_minor": 1,
        "source_currency": "source-currency",
        "source_months": 1,
        "source_scope": "whole_account"
      },
      "items": [
        {
          "key": "key",
          "kind": "network",
          "source": {
            "id": "id",
            "name": "web-1",
            "region": "af-abj",
            "summary": "summary",
            "vcpu": 2,
            "memory_mib": 1,
            "disk_gb": 80
          },
          "status": "planned",
          "flags": [
            {
              "code": "starter",
              "message": "message",
              "blocking": true
            }
          ],
          "target": {
            "bucket": {
              "name": "web-1",
              "region": "af-abj",
              "versioning": true,
              "public_read": true,
              "size_bytes": 1610612736,
              "object_count": 1,
              "size_as_of": "2030-11-14"
            },
            "plan_slug": "starter",
            "disk_gb": 80,
            "cidr": "<vpc-cidr>",
            "network_key": "network-key",
            "subnet_key": "subnet-key",
            "instance_key": "instance-key",
            "rules": [
              {
                "direction": null,
                "protocol": null,
                "port_range": null,
                "cidr": null
              }
            ],
            "engine": "postgresql",
            "engine_version": "engine-version",
            "storage_gb": 100,
            "role": "admin",
            "email": "email",
            "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample deploy@ci",
            "listeners": [
              {
                "protocol": null,
                "port": null
              }
            ],
            "image_slug": "ubuntu-24-04",
            "invite_id": "invite-id",
            "invited_at": "2026-10-03T09:30:00Z",
            "kubernetes": {
              "version_id": "version-id",
              "version": "version",
              "node_pools": [
                null
              ],
              "addons": [
                null
              ],
              "allow_downgrade": true
            }
          }
        }
      ],
      "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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Plan a migration

```http
POST /public/v1/migrations
```

Builds a plan from a scan that succeeded: each server, disk, network, firewall group, database, key and person mapped to its Pantech equivalent, sized against today's plans, with anything that cannot move yet flagged and explained. Nothing is created: the plan is something to review, edit and export. `region` defaults to the first Pantech region. At most 25 migrations per organization. Owners and admins only.

The response includes a live price comparison: Pantech's monthly price for the planned servers, disks and networks next to the source account's average monthly bill.

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

Body:

- `scan_id` (string, required)
- `name` (string, required)
- `region` (string): A Pantech region code; the first region when left out.

Example:

```sh
curl -X POST "https://api.pantechdynamics.com/public/v1/migrations" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "scan_id": "csn_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "name": "web-1"
  }'
```

Response `201`:

```json
{
  "id": "mig_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "name": "web-1",
  "region": "af-abj",
  "connection_id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "scan_id": "csn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "stage": "planning",
  "version": 1,
  "summary": {
    "planned": 1,
    "excluded": 1,
    "unsupported": 1,
    "by_kind": {}
  },
  "estimate": {
    "currency": "NGN",
    "pantech_priced": true,
    "pantech_monthly_minor": 1,
    "covers": [
      "covers"
    ],
    "not_covered": [
      "not-covered"
    ],
    "source_known": true,
    "source_monthly_minor": 1,
    "source_currency": "source-currency",
    "source_months": 1,
    "source_scope": "whole_account"
  },
  "items": [
    {
      "key": "key",
      "kind": "network",
      "source": {
        "id": "id",
        "name": "web-1",
        "region": "af-abj",
        "summary": "summary",
        "vcpu": 2,
        "memory_mib": 1,
        "disk_gb": 80
      },
      "status": "planned",
      "flags": [
        {
          "code": "starter",
          "message": "message",
          "blocking": true
        }
      ],
      "target": {
        "bucket": {
          "name": "web-1",
          "region": "af-abj",
          "versioning": true,
          "public_read": true,
          "size_bytes": 1610612736,
          "object_count": 1,
          "size_as_of": "2030-11-14"
        },
        "plan_slug": "starter",
        "disk_gb": 80,
        "cidr": "<vpc-cidr>",
        "network_key": "network-key",
        "subnet_key": "subnet-key",
        "instance_key": "instance-key",
        "rules": [
          {
            "direction": "ingress",
            "protocol": "tcp",
            "port_range": "22",
            "cidr": "<vpc-cidr>"
          }
        ],
        "engine": "postgresql",
        "engine_version": "engine-version",
        "storage_gb": 100,
        "role": "admin",
        "email": "email",
        "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample deploy@ci",
        "listeners": [
          {
            "protocol": "protocol",
            "port": 22
          }
        ],
        "image_slug": "ubuntu-24-04",
        "invite_id": "invite-id",
        "invited_at": "2026-10-03T09:30:00Z",
        "kubernetes": {
          "version_id": "version-id",
          "version": "version",
          "node_pools": [
            {
              "name": "web-1",
              "plan_slug": "starter",
              "count": 1,
              "autoscaling": true,
              "min": 1,
              "max": 1,
              "source_name": "source-name"
            }
          ],
          "addons": [
            "addons"
          ],
          "allow_downgrade": true
        }
      }
    }
  ],
  "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`: `CLOUD_SCAN_NOT_FOUND`: no scan with this id exists in your organization.
- `409`: `CLOUD_SCAN_NOT_READY`: the scan has not succeeded. `IDEMPOTENCY_CONFLICT`: this Idempotency-Key was used with another scan.
- `422`: `VALIDATION_FAILED`: a field is invalid; `errors` names it. `region` must be a Pantech region code.
- `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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Get a migration

```http
GET /public/v1/migrations/{migration_id}
```

A plan with every item and a price comparison computed now, from current prices.

Scope: `read`.

Path parameters:

- `migration_id`

Example:

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

Response `200`:

```json
{
  "id": "mig_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "name": "web-1",
  "region": "af-abj",
  "connection_id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "scan_id": "csn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "stage": "planning",
  "version": 1,
  "summary": {
    "planned": 1,
    "excluded": 1,
    "unsupported": 1,
    "by_kind": {}
  },
  "estimate": {
    "currency": "NGN",
    "pantech_priced": true,
    "pantech_monthly_minor": 1,
    "covers": [
      "covers"
    ],
    "not_covered": [
      "not-covered"
    ],
    "source_known": true,
    "source_monthly_minor": 1,
    "source_currency": "source-currency",
    "source_months": 1,
    "source_scope": "whole_account"
  },
  "items": [
    {
      "key": "key",
      "kind": "network",
      "source": {
        "id": "id",
        "name": "web-1",
        "region": "af-abj",
        "summary": "summary",
        "vcpu": 2,
        "memory_mib": 1,
        "disk_gb": 80
      },
      "status": "planned",
      "flags": [
        {
          "code": "starter",
          "message": "message",
          "blocking": true
        }
      ],
      "target": {
        "bucket": {
          "name": "web-1",
          "region": "af-abj",
          "versioning": true,
          "public_read": true,
          "size_bytes": 1610612736,
          "object_count": 1,
          "size_as_of": "2030-11-14"
        },
        "plan_slug": "starter",
        "disk_gb": 80,
        "cidr": "<vpc-cidr>",
        "network_key": "network-key",
        "subnet_key": "subnet-key",
        "instance_key": "instance-key",
        "rules": [
          {
            "direction": "ingress",
            "protocol": "tcp",
            "port_range": "22",
            "cidr": "<vpc-cidr>"
          }
        ],
        "engine": "postgresql",
        "engine_version": "engine-version",
        "storage_gb": 100,
        "role": "admin",
        "email": "email",
        "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample deploy@ci",
        "listeners": [
          {
            "protocol": "protocol",
            "port": 22
          }
        ],
        "image_slug": "ubuntu-24-04",
        "invite_id": "invite-id",
        "invited_at": "2026-10-03T09:30:00Z",
        "kubernetes": {
          "version_id": "version-id",
          "version": "version",
          "node_pools": [
            {
              "name": "web-1",
              "plan_slug": "starter",
              "count": 1,
              "autoscaling": true,
              "min": 1,
              "max": 1,
              "source_name": "source-name"
            }
          ],
          "addons": [
            "addons"
          ],
          "allow_downgrade": true
        }
      }
    }
  ],
  "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.
- `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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Rename a migration

```http
PATCH /public/v1/migrations/{migration_id}
```

Changes a plan's name. Owners and admins only.

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

Path parameters:

- `migration_id`

Body:

- `name` (string, required)

Example:

```sh
curl -X PATCH "https://api.pantechdynamics.com/public/v1/migrations/mig_06gk3x9tq7m2v8r4y1c5d0zp8w" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "web-1"
  }'
```

Response `200`:

```json
{
  "id": "mig_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "name": "web-1",
  "region": "af-abj",
  "connection_id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "scan_id": "csn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "stage": "planning",
  "version": 1,
  "summary": {
    "planned": 1,
    "excluded": 1,
    "unsupported": 1,
    "by_kind": {}
  },
  "estimate": {
    "currency": "NGN",
    "pantech_priced": true,
    "pantech_monthly_minor": 1,
    "covers": [
      "covers"
    ],
    "not_covered": [
      "not-covered"
    ],
    "source_known": true,
    "source_monthly_minor": 1,
    "source_currency": "source-currency",
    "source_months": 1,
    "source_scope": "whole_account"
  },
  "items": [
    {
      "key": "key",
      "kind": "network",
      "source": {
        "id": "id",
        "name": "web-1",
        "region": "af-abj",
        "summary": "summary",
        "vcpu": 2,
        "memory_mib": 1,
        "disk_gb": 80
      },
      "status": "planned",
      "flags": [
        {
          "code": "starter",
          "message": "message",
          "blocking": true
        }
      ],
      "target": {
        "bucket": {
          "name": "web-1",
          "region": "af-abj",
          "versioning": true,
          "public_read": true,
          "size_bytes": 1610612736,
          "object_count": 1,
          "size_as_of": "2030-11-14"
        },
        "plan_slug": "starter",
        "disk_gb": 80,
        "cidr": "<vpc-cidr>",
        "network_key": "network-key",
        "subnet_key": "subnet-key",
        "instance_key": "instance-key",
        "rules": [
          {
            "direction": "ingress",
            "protocol": "tcp",
            "port_range": "22",
            "cidr": "<vpc-cidr>"
          }
        ],
        "engine": "postgresql",
        "engine_version": "engine-version",
        "storage_gb": 100,
        "role": "admin",
        "email": "email",
        "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample deploy@ci",
        "listeners": [
          {
            "protocol": "protocol",
            "port": 22
          }
        ],
        "image_slug": "ubuntu-24-04",
        "invite_id": "invite-id",
        "invited_at": "2026-10-03T09:30:00Z",
        "kubernetes": {
          "version_id": "version-id",
          "version": "version",
          "node_pools": [
            {
              "name": "web-1",
              "plan_slug": "starter",
              "count": 1,
              "autoscaling": true,
              "min": 1,
              "max": 1,
              "source_name": "source-name"
            }
          ],
          "addons": [
            "addons"
          ],
          "allow_downgrade": true
        }
      }
    }
  ],
  "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`: `CONFLICT`: the plan changed at the same time. Read it again and retry.
- `422`: `VALIDATION_FAILED`: a field is invalid; `errors` names it.
- `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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Delete a migration

```http
DELETE /public/v1/migrations/{migration_id}
```

Deletes a plan. Nothing in Pantech or in your other cloud is touched. Owners and admins only.

**Scope:** `write`. Destructive: an AI app's key also needs `delete`.

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

Path parameters:

- `migration_id`

Example:

```sh
curl -X DELETE "https://api.pantechdynamics.com/public/v1/migrations/mig_06gk3x9tq7m2v8r4y1c5d0zp8w" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

Response `204`: Deleted.

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.
- `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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Edit a plan item

```http
PATCH /public/v1/migrations/{migration_id}/items
```

Changes one item, named by its `key`: leave it out of the move (`excluded`), choose another plan (`plan_slug`, for servers and databases), a size (`storage_gb`, for disks and databases), an address range (`cidr`, for networks and subnets), or a person's `role` and `email`. Items flagged as unsupported stay unsupported. Owners and admins only.

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

Path parameters:

- `migration_id`

Body:

- `key` (string, required)
- `excluded` (boolean)
- `plan_slug` (string)
- `storage_gb` (integer): At least 1.
- `cidr` (string)
- `role` (string): One of `member`, `admin`.
- `email` (string)
- `allow_version_downgrade` (boolean): On a kubernetes_cluster item: consent to a lower Kubernetes version than the source runs.

Example:

```sh
curl -X PATCH "https://api.pantechdynamics.com/public/v1/migrations/mig_06gk3x9tq7m2v8r4y1c5d0zp8w/items" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "key": "key"
  }'
```

Response `200`:

```json
{
  "id": "mig_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "name": "web-1",
  "region": "af-abj",
  "connection_id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "scan_id": "csn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "stage": "planning",
  "version": 1,
  "summary": {
    "planned": 1,
    "excluded": 1,
    "unsupported": 1,
    "by_kind": {}
  },
  "estimate": {
    "currency": "NGN",
    "pantech_priced": true,
    "pantech_monthly_minor": 1,
    "covers": [
      "covers"
    ],
    "not_covered": [
      "not-covered"
    ],
    "source_known": true,
    "source_monthly_minor": 1,
    "source_currency": "source-currency",
    "source_months": 1,
    "source_scope": "whole_account"
  },
  "items": [
    {
      "key": "key",
      "kind": "network",
      "source": {
        "id": "id",
        "name": "web-1",
        "region": "af-abj",
        "summary": "summary",
        "vcpu": 2,
        "memory_mib": 1,
        "disk_gb": 80
      },
      "status": "planned",
      "flags": [
        {
          "code": "starter",
          "message": "message",
          "blocking": true
        }
      ],
      "target": {
        "bucket": {
          "name": "web-1",
          "region": "af-abj",
          "versioning": true,
          "public_read": true,
          "size_bytes": 1610612736,
          "object_count": 1,
          "size_as_of": "2030-11-14"
        },
        "plan_slug": "starter",
        "disk_gb": 80,
        "cidr": "<vpc-cidr>",
        "network_key": "network-key",
        "subnet_key": "subnet-key",
        "instance_key": "instance-key",
        "rules": [
          {
            "direction": "ingress",
            "protocol": "tcp",
            "port_range": "22",
            "cidr": "<vpc-cidr>"
          }
        ],
        "engine": "postgresql",
        "engine_version": "engine-version",
        "storage_gb": 100,
        "role": "admin",
        "email": "email",
        "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample deploy@ci",
        "listeners": [
          {
            "protocol": "protocol",
            "port": 22
          }
        ],
        "image_slug": "ubuntu-24-04",
        "invite_id": "invite-id",
        "invited_at": "2026-10-03T09:30:00Z",
        "kubernetes": {
          "version_id": "version-id",
          "version": "version",
          "node_pools": [
            {
              "name": "web-1",
              "plan_slug": "starter",
              "count": 1,
              "autoscaling": true,
              "min": 1,
              "max": 1,
              "source_name": "source-name"
            }
          ],
          "addons": [
            "addons"
          ],
          "allow_downgrade": true
        }
      }
    }
  ],
  "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`: `CONFLICT`: the plan changed at the same time. Read it again and retry.
- `422`: `VALIDATION_FAILED`: `key` names no item (`UNKNOWN_ITEM`), or the change doesn't apply to it (`INVALID_TARGET`).
- `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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Export a migration as Terraform

```http
GET /public/v1/migrations/{migration_id}/terraform
```

The plan's planned items as Terraform for the `Pantech-Dynamics/pantechdynamics` provider: `main.tf` and `variables.tf`. Values Pantech cannot know (the image to start from, an SSH key, disk offerings, database passwords) are variables without defaults. Review it, then run `terraform plan`.

Scope: `read`.

Path parameters:

- `migration_id`

Example:

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

Response `200`:

```json
{
  "files": [
    {
      "name": "web-1",
      "content": "content"
    }
  ]
}
```

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.
- `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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## List the clouds Migrate can read

```http
GET /public/v1/cloud-providers
```

Every cloud Pantech Migrate can connect, how it reads each (`federated`: Pantech signs short-lived tokens your cloud trusts; `agent`: you run the Pantech Migrate agent, which keeps your read-only token on your machine), and whether a scan reads its spend and its people.

Scope: `read`.

Example:

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

Response `200`:

```json
{
  "data": [
    {
      "slug": "aws",
      "name": "web-1",
      "access": "federated",
      "cost_readable": true,
      "people_readable": true,
      "available": true
    }
  ],
  "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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`MIGRATE_AGENT_UNAVAILABLE` / `MIGRATE_INVITES_UNAVAILABLE`: this part of Pantech Migrate is not available on this deployment yet.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Enroll a Migrate agent

```http
POST /public/v1/cloud-connections/{connection_id}/agent-enrollments
```

A one-time enrollment code for the connection's Pantech Migrate agent, shown only in this response, valid once for an hour. Any connection may have an agent: for AWS, Google Cloud, Azure and Huawei Cloud it runs server copies, database imports and Kubernetes moves (Pantech scans those clouds itself); for the other clouds it scans too. Run `enroll_command` where the agent will run. Issuing a code replaces any unused one; redeeming it replaces the connection's earlier agent. Owners and admins only.

**Idempotency:** not replayed: each call issues a new code.

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

Path parameters:

- `connection_id`

Example:

```sh
curl -X POST "https://api.pantechdynamics.com/public/v1/cloud-connections/ccn_06gk3x9tq7m2v8r4y1c5d0zp8w/agent-enrollments" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

Response `201`:

```json
{
  "code": "starter",
  "expires_at": "2026-10-03T09:30:00Z",
  "enroll_command": "enroll-command"
}
```

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`: `CLOUD_CONNECTION_NOT_FOUND`: no cloud connection 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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`MIGRATE_AGENT_UNAVAILABLE` / `MIGRATE_INVITES_UNAVAILABLE`: this part of Pantech Migrate is not available on this deployment yet.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Revoke a connection's agent

```http
DELETE /public/v1/cloud-connections/{connection_id}/agent
```

Ends the connection's Migrate agent at once: its credential stops working on its next request, and the server copies, database imports and Kubernetes moves it was running stop until a new agent is enrolled. A connection to a cloud Pantech scans with an agent then waits for a new one; a connection to AWS, Google Cloud, Azure or Huawei Cloud stays connected. Like disconnecting, this only takes access away. Owners and admins only.

**Idempotency:** revoking again changes nothing.

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

Path parameters:

- `connection_id`

Example:

```sh
curl -X DELETE "https://api.pantechdynamics.com/public/v1/cloud-connections/ccn_06gk3x9tq7m2v8r4y1c5d0zp8w/agent" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

Response `200`:

```json
{
  "id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
  "provider": "aws",
  "name": "web-1",
  "status": "awaiting_role",
  "failure": {
    "code": "assume_role_denied",
    "message": "message"
  },
  "role_arn": "role-arn",
  "aws_account_id": "aws-account-id",
  "external_account_id": "external-account-id",
  "gcp": {
    "project_number": "project-number",
    "pool_id": "pool-id",
    "provider_id": "provider-id",
    "service_account_email": "service-account-email",
    "project_ids": [
      "project-ids"
    ]
  },
  "azure": {
    "tenant_id": "tenant-id",
    "client_id": "client-id",
    "subscription_ids": [
      "subscription-ids"
    ]
  },
  "huawei": {
    "identity_provider_id": "identity-provider-id",
    "projects": [
      {
        "region": "af-abj",
        "id": "id"
      }
    ]
  },
  "agent": {
    "id": "cag_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "online": true,
    "agent_version": "agent-version",
    "platform": "platform",
    "enrolled_at": "2026-10-03T09:30:00Z",
    "last_seen_at": "2026-10-03T09:30:00Z",
    "credential_expires_at": "2026-10-03T09:30:00Z"
  },
  "verified_at": "2026-10-03T09:30:00Z",
  "created_at": "2026-10-03T09:30:00Z",
  "updated_at": "2026-10-03T09:30:00Z",
  "setup": {
    "access": "federated",
    "issuer_url": "issuer-url",
    "audience": "audience",
    "subject": "subject",
    "quick_create_url": "quick-create-url",
    "template": "template",
    "template_format": "cloudformation",
    "files": [
      {
        "name": "web-1",
        "content": "content"
      }
    ],
    "permissions": [
      "permissions"
    ],
    "agent": {
      "image": "image",
      "download_url": "download-url",
      "api_url": "api-url",
      "token_variables": [
        "token-variables"
      ],
      "token_how_to": "token-how-to",
      "enroll_command": "enroll-command",
      "run_command": "run-command",
      "container_command": "container-command"
    }
  }
}
```

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`: `CLOUD_CONNECTION_NOT_FOUND`: no cloud connection 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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`MIGRATE_AGENT_UNAVAILABLE` / `MIGRATE_INVITES_UNAVAILABLE`: this part of Pantech Migrate is not available on this deployment yet.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
## Invite a plan's people

```http
POST /public/v1/migrations/{migration_id}/invites
```

Sends Pantech invites to the people a plan lists (items of kind `user`), by key, with each item's role, through the organization's ordinary invite flow: the same email, rules and audit as inviting from Members. An admin can invite members only; a person suggested as admin comes back `role_not_allowed`. Owners and admins only.

**Idempotency:** safe to repeat: a person already invited from this plan, already holding a pending invite, or already a member is reported and never invited twice.

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

Path parameters:

- `migration_id`

Body:

- `keys` (array of string, required): The `user` items to invite, by key: 1 to 50.

Example:

```sh
curl -X POST "https://api.pantechdynamics.com/public/v1/migrations/mig_06gk3x9tq7m2v8r4y1c5d0zp8w/invites" \
  -H "Authorization: Bearer $PANTECH_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "keys": [
      "keys"
    ]
  }'
```

Response `200`:

```json
{
  "results": [
    {
      "key": "key",
      "email": "email",
      "role": "role",
      "outcome": "invited",
      "reason": null,
      "invite_id": "invite-id"
    }
  ],
  "migration": {
    "id": "mig_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "name": "web-1",
    "region": "af-abj",
    "connection_id": "ccn_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "scan_id": "csn_06gk3x9tq7m2v8r4y1c5d0zp8w",
    "stage": "planning",
    "version": 1,
    "summary": {
      "planned": 1,
      "excluded": 1,
      "unsupported": 1,
      "by_kind": {}
    },
    "estimate": {
      "currency": "NGN",
      "pantech_priced": true,
      "pantech_monthly_minor": 1,
      "covers": [
        "covers"
      ],
      "not_covered": [
        "not-covered"
      ],
      "source_known": true,
      "source_monthly_minor": 1,
      "source_currency": "source-currency",
      "source_months": 1,
      "source_scope": "whole_account"
    },
    "items": [
      {
        "key": "key",
        "kind": "network",
        "source": {
          "id": "id",
          "name": "web-1",
          "region": "af-abj",
          "summary": "summary",
          "vcpu": 2,
          "memory_mib": 1,
          "disk_gb": 80
        },
        "status": "planned",
        "flags": [
          {
            "code": "starter",
            "message": "message",
            "blocking": true
          }
        ],
        "target": {
          "bucket": {
            "name": "web-1",
            "region": "af-abj",
            "versioning": true,
            "public_read": true,
            "size_bytes": 1610612736,
            "object_count": 1,
            "size_as_of": "2030-11-14"
          },
          "plan_slug": "starter",
          "disk_gb": 80,
          "cidr": "<vpc-cidr>",
          "network_key": "network-key",
          "subnet_key": "subnet-key",
          "instance_key": "instance-key",
          "rules": [
            {
              "direction": "ingress",
              "protocol": "tcp",
              "port_range": "22",
              "cidr": "<vpc-cidr>"
            }
          ],
          "engine": "postgresql",
          "engine_version": "engine-version",
          "storage_gb": 100,
          "role": "admin",
          "email": "email",
          "public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExample deploy@ci",
          "listeners": [
            {
              "protocol": "protocol",
              "port": 22
            }
          ],
          "image_slug": "ubuntu-24-04",
          "invite_id": "invite-id",
          "invited_at": "2026-10-03T09:30:00Z",
          "kubernetes": {
            "version_id": "version-id",
            "version": "version",
            "node_pools": [
              null
            ],
            "addons": [
              "addons"
            ],
            "allow_downgrade": true
          }
        }
      }
    ],
    "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.
- `422`: `VALIDATION_FAILED`: `keys` must name 1 to 50 items.
- `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`: `MIGRATE_UNAVAILABLE`: Pantech Migrate is not available on this deployment yet. Try again later.
`MIGRATE_AGENT_UNAVAILABLE` / `MIGRATE_INVITES_UNAVAILABLE`: this part of Pantech Migrate is not available on this deployment yet.
`SERVICE_UNAVAILABLE`: request quota storage is unavailable. Wait a few seconds, then retry.
