---
title: "Create an import plan"
method: POST
path: "/imports/plan"
tags: ["Imports"]
---

# Create an import plan

`POST /imports/plan`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/imports/plan`
- Auth: HTTP bearer

## Request body

- CreatePlanRequest: Request to create an import plan
  - `credentials` ImportCredentials: Platform credentials (required for cloud platforms like Vercel, Railway)
    - `base_url` string, nullable: Base URL override (for self-hosted platforms like Coolify, Dokploy) Example: `https://coolify.example.com`
    - `extra` object: Additional platform-specific parameters
    - `team_id` string, nullable: Team or organization ID (for platforms with team scoping like Vercel)
    - `token` string, nullable: API token / bearer token for the source platform
  - `repository_id` integer, nullable: Optional repository ID to associate with the import If provided, preset will be detected from the repository
  - `source` 'docker' | 'coolify' | 'dokploy' | 'vercel' | 'netlify' | 'railway' | 'render' | 'fly' | 'kubernetes' | 'caprover' | 'portainer' | 'kamal' | 'custom', required: Source to import from
  - `workload_id` string, required: Workload ID to import

## Response `200`

Import plan created

- CreatePlanResponse: Response with created plan
  - `can_execute` boolean, required: Whether the plan can be executed
  - `plan` ImportPlan, required: Generated import plan
    - `additional_deployments` DeploymentConfiguration[]: Additional deployments (workers, cron jobs, etc.)
      - `build` BuildConfiguration, nullable: Build configuration (for building images from source)
        - `args` object, required: Build arguments
        - `context` string, required: Build context (Dockerfile path or buildpack)
        - `dockerfile` string, nullable: Dockerfile path (relative to context)
        - `target` string, nullable: Target stage (for multi-stage builds)
      - `command` string[], nullable: Command override
      - `entrypoint` string[], nullable: Entrypoint override
      - `env_vars` EnvironmentVariable[], required: Environment variables
        - `is_secret` boolean, required: Whether this is a secret (should be encrypted)
        - `key` string, required: Variable name
        - `source_description` string, nullable: Where this env var originates from (for traceability)
        - `value` string, required: Variable value (may be redacted for secrets)
      - `git` GitSourcePlan, nullable: Git repository the source platform deploys from
        - `branch` string, required: Branch the source platform deploys
        - `clone_url` string, nullable: Full clone URL, e.g. `https://github.com/owner/repo.git`
        - `is_public` boolean, required: True when the repository is public (no credentials on the source platform) — the project can then build without a git provider connection.
        - `owner` string, required: Repository owner (organization or user)
        - `repo` string, required: Repository name
      - `health_check` HealthCheckConfiguration, nullable: Health check configuration
        - `http_path` string, nullable: HTTP path to check (if applicable)
        - `interval` integer, required: Interval between checks (seconds)
        - `port` integer, required: Port to check
        - `retries` integer, required: Number of retries before marking unhealthy
        - `timeout` integer, required: Timeout for each check (seconds)
      - `image` string, required: Image to deploy
      - `network` NetworkConfiguration, required: Network configuration
        - `dns_servers` string[], required: DNS servers
        - `hostname` string, nullable: Hostname
        - `mode` union, required: Network mode
          - 'bridge'
          - 'host'
          - 'none'
          - object
            - `custom` string, required
      - `ports` PortMapping[], required: Port mappings
        - `container_port` integer, required: Container port
        - `host_port` integer, nullable: Host port (optional - can be assigned dynamically)
        - `is_primary` boolean, required: Whether this is the primary HTTP port
        - `protocol` 'tcp' | 'udp', required: Protocol (tcp, udp)
      - `resources` ResourceLimits, required: Resource limits
        - `cpu_limit` integer, nullable: CPU limit (millicores)
        - `cpu_request` integer, nullable: CPU request (millicores)
        - `memory_limit` integer, nullable: Memory limit (MB)
        - `memory_request` integer, nullable: Memory request (MB)
      - `strategy` 'replace' | 'blue-green' | 'rolling', required: Deployment strategy
      - `volumes` VolumeMount[], required: Volume mounts
        - `destination` string, required: Destination path in container
        - `read_only` boolean, required: Read-only flag
        - `source` string, required: Source (volume name or path)
        - `type` 'bind' | 'volume' | 'tmpfs', required: Volume type
      - `working_dir` string, nullable: Working directory
    - `cost_analysis` CostAnalysis, nullable: Full cluster cost + rightsizing analysis attached to an import plan.
      - `actual_usage` ResourceFootprint, nullable: A CPU + memory footprint (requests or measured usage)
        - `cpu_millis` integer, required: CPU in millicores
        - `memory_mb` integer, required: Memory in MB
      - `capacity` ClusterCapacity, required: Total cluster capacity (sum of node allocatable resources)
        - `cpu_millis` integer, required: Total allocatable CPU in millicores
        - `memory_mb` integer, required: Total allocatable memory in MB
        - `node_count` integer, required: Number of nodes
      - `control_plane_monthly_usd` number, double, nullable: Managed control-plane fee included in `current_monthly_usd` (EKS/GKE charge ~$73/mo per cluster). `None` when not applicable/unknown.
      - `current_monthly_usd` number, double, nullable: Estimated total infrastructure cost per month in USD (compute nodes + control-plane fee). `None` when no node could be priced.
      - `nodes` NodeCostInfo[], required: Per-node inventory with price estimates where the instance type is known
        - `cpu_millis` integer, required: CPU capacity in millicores
        - `instance_type` string, nullable: Instance type from `node.kubernetes.io/instance-type` (e.g. "m5.xlarge")
        - `memory_mb` integer, required: Memory capacity in MB
        - `monthly_usd` number, double, nullable: Estimated on-demand monthly price in USD. `None` when the instance type is unknown or not in the price table.
        - `name` string, required: Node name
        - `region` string, nullable: Region from `topology.kubernetes.io/region`
      - `notes` string[], required: Honesty notes: what could not be measured, which numbers are estimates, and any assumptions made. Always shown to the user.
      - `overprovisioning` OverprovisioningAssessment, required: Requests-vs-capacity-vs-usage assessment
        - `cpu_request_inflation_ratio` number, double, nullable: Ratio of requested CPU to measured CPU usage (e.g. 40.0 = requests reserve 40× what the workloads actually use). `None` without metrics.
        - `cpu_requested_pct` number, double, nullable: Requested CPU as % of cluster capacity
        - `cpu_utilization_pct` number, double, nullable: Measured CPU usage as % of cluster capacity (`None` without metrics)
        - `explanation` string, required: Human-readable explanation of the verdict, e.g. "Cluster capacity is 8 vCPU but measured usage is 0.3 vCPU (3.7%) — severely overprovisioned"
        - `memory_request_inflation_ratio` number, double, nullable: Ratio of requested memory to measured memory usage
        - `memory_requested_pct` number, double, nullable: Requested memory as % of cluster capacity
        - `memory_utilization_pct` number, double, nullable: Measured memory usage as % of cluster capacity (`None` without metrics)
        - `verdict` 'severe' | 'moderate' | 'reasonable' | 'unknown', required: Overall verdict
      - `provider` 'aws' | 'gcp' | 'azure' | 'hetzner' | 'digitalocean' | 'other', nullable: Cloud provider detected from node metadata
      - `recommendation` TargetRecommendation, required: The temps/Hetzner target sizing and savings estimate
        - `fits_single_node` boolean, required: Whether the workloads fit a single recommended server. When `false`, the rationale explains the multi-node option (temps worker nodes).
        - `memory_gb` integer, required: Memory (GB) of the recommended server
        - `monthly_eur` number, double, required: Estimated monthly price of the recommended server in EUR
        - `monthly_savings_usd` number, double, nullable: Estimated monthly savings in USD (current cost minus target cost, treating EUR≈USD for the rough comparison — disclaimed in `notes`). `None` when the current cost is unknown.
        - `rationale` string, required: Human-readable recommendation summary
        - `server_type` string, required: Recommended Hetzner server type (e.g. "cpx32")
        - `sizing_basis` string, required: What the sizing was based on, e.g. "2× measured usage + temps platform overhead" or "resource requests (no metrics available)"
        - `vcpus` integer, required: vCPUs of the recommended server
        - `yearly_savings_usd` number, double, nullable: `monthly_savings_usd × 12`
      - `requested` ResourceFootprint, required: Sum of pod resource *requests* across running pods — what the scheduler has reserved, i.e. what the cluster is sized for.
        - `cpu_millis` integer, required: CPU in millicores
        - `memory_mb` integer, required: Memory in MB
      - `usage_source` 'metrics-api' | 'requests-only' | 'unavailable', required: How the usage numbers were obtained (drives UI wording)
    - `deployment` DeploymentConfiguration, required: Primary deployment configuration
      - `build` BuildConfiguration, nullable: Build configuration (for building images from source)
        - `args` object, required: Build arguments
        - `context` string, required: Build context (Dockerfile path or buildpack)
        - `dockerfile` string, nullable: Dockerfile path (relative to context)
        - `target` string, nullable: Target stage (for multi-stage builds)
      - `command` string[], nullable: Command override
      - `entrypoint` string[], nullable: Entrypoint override
      - `env_vars` EnvironmentVariable[], required: Environment variables
        - `is_secret` boolean, required: Whether this is a secret (should be encrypted)
        - `key` string, required: Variable name
        - `source_description` string, nullable: Where this env var originates from (for traceability)
        - `value` string, required: Variable value (may be redacted for secrets)
      - `git` GitSourcePlan, nullable: Git repository the source platform deploys from
        - `branch` string, required: Branch the source platform deploys
        - `clone_url` string, nullable: Full clone URL, e.g. `https://github.com/owner/repo.git`
        - `is_public` boolean, required: True when the repository is public (no credentials on the source platform) — the project can then build without a git provider connection.
        - `owner` string, required: Repository owner (organization or user)
        - `repo` string, required: Repository name
      - `health_check` HealthCheckConfiguration, nullable: Health check configuration
        - `http_path` string, nullable: HTTP path to check (if applicable)
        - `interval` integer, required: Interval between checks (seconds)
        - `port` integer, required: Port to check
        - `retries` integer, required: Number of retries before marking unhealthy
        - `timeout` integer, required: Timeout for each check (seconds)
      - `image` string, required: Image to deploy
      - `network` NetworkConfiguration, required: Network configuration
        - `dns_servers` string[], required: DNS servers
        - `hostname` string, nullable: Hostname
        - `mode` union, required: Network mode
          - 'bridge'
          - 'host'
          - 'none'
          - object
            - `custom` string, required
      - `ports` PortMapping[], required: Port mappings
        - `container_port` integer, required: Container port
        - `host_port` integer, nullable: Host port (optional - can be assigned dynamically)
        - `is_primary` boolean, required: Whether this is the primary HTTP port
        - `protocol` 'tcp' | 'udp', required: Protocol (tcp, udp)
      - `resources` ResourceLimits, required: Resource limits
        - `cpu_limit` integer, nullable: CPU limit (millicores)
        - `cpu_request` integer, nullable: CPU request (millicores)
        - `memory_limit` integer, nullable: Memory limit (MB)
        - `memory_request` integer, nullable: Memory request (MB)
      - `strategy` 'replace' | 'blue-green' | 'rolling', required: Deployment strategy
      - `volumes` VolumeMount[], required: Volume mounts
        - `destination` string, required: Destination path in container
        - `read_only` boolean, required: Read-only flag
        - `source` string, required: Source (volume name or path)
        - `type` 'bind' | 'volume' | 'tmpfs', required: Volume type
      - `working_dir` string, nullable: Working directory
    - `domains` DomainPlan[]: Custom domains to migrate
      - `action` 'import' | 'skip', required: What to do with this domain
      - `action_description` string, required: Human-readable explanation
      - `domain` string, required: Full domain name
      - `environment` string, required: Which environment to associate with ("production")
      - `redirect_to` string, nullable: Redirect target (if this is a redirect domain)
      - `replacement` string, nullable: The temps-side address that replaces this domain when it is skipped. Source-generated domains (sslip.io / traefik.me / platform subdomains) embed the source server's IP and would keep pointing at the old machine — this tells the user where the app will be reachable on temps instead.
      - `status_code` integer, nullable: Redirect status code
    - `environment` EnvironmentConfiguration, required: Environment configuration
      - `name` string, required: Environment name
      - `resources` ResourceLimits, required: Resource limits for environment
        - `cpu_limit` integer, nullable: CPU limit (millicores)
        - `cpu_request` integer, nullable: CPU request (millicores)
        - `memory_limit` integer, nullable: Memory limit (MB)
        - `memory_request` integer, nullable: Memory request (MB)
      - `subdomain` string, required: Proposed subdomain
    - `metadata` PlanMetadata, required: Plan metadata
      - `complexity` 'low' | 'medium' | 'high', required: Estimated complexity (low, medium, high)
      - `generated_at` string, date-time, required: When the plan was generated
      - `generator_version` string, required: Generator (importer) version
      - `warnings` string[], required: Warnings detected during planning
    - `project` ProjectConfiguration, required: Project configuration
      - `is_web_app` boolean, required: Whether this is a web application
      - `name` string, required: Proposed project name
      - `project_type` 'static' | 'docker' | 'buildpack' | 'git', required: Project type
      - `slug` string, required: Proposed slug (URL-safe identifier)
    - `services` ServicePlan[]: Services to migrate (databases, caches, blob stores) Each service has an `action` field the user can change before execution.
      - `action` 'create' | 'link-external' | 'skip', required: What to do with this service
      - `action_description` string, required: Human-readable explanation of what this action means
      - `data_implications` DataImplication[]: Data implications specific to this service
        - `message` string, required: Human-readable description of what could happen
        - `recommended_action` string, nullable: What the user should do about it (if anything)
        - `severity` 'info' | 'warning' | 'data-not-migrated' | 'potential-data-loss', required: Severity of this implication
      - `env_var_mappings` object: Environment variable key mappings: source_key -> temps_key For example, Vercel's `POSTGRES_URL` might map to Temps' `DATABASE_URL`. Both keys will be set during migration so the app works with either.
      - `name` string, required: Human-readable service name
      - `parameters` object: Parameters for creating the service in Temps
      - `service_type` string, required: Service type (maps to temps-providers ServiceType)
      - `version` string, nullable: Service version to create (e.g., "16" for Postgres 16)
    - `source` string, required: Source system this plan was generated from
    - `source_id` string, required: Source workload / project ID in the source system
    - `steps` MigrationStep[]: Ordered list of migration steps that will be executed. This is the human-readable execution plan. Each step describes what will happen, what risks are involved, and what the user should verify. Steps are executed in order. If a step fails, execution stops and already-created resources are reported for manual cleanup.
      - `data_implications` DataImplication[]: Data implications — what could go wrong or what the user needs to know
        - `message` string, required: Human-readable description of what could happen
        - `recommended_action` string, nullable: What the user should do about it (if anything)
        - `severity` 'info' | 'warning' | 'data-not-migrated' | 'potential-data-loss', required: Severity of this implication
      - `description` string, required: Detailed description of what this step does
      - `estimated_duration` string, nullable: Estimated duration hint (e.g., "< 1 second", "10-30 seconds")
      - `id` string, required: Machine-readable step identifier (e.g., "create-project", "create-service-postgres")
      - `order` integer, required: Step number (1-based, for display)
      - `post_conditions` string[]: Things the user should verify AFTER this step completes
      - `pre_conditions` string[]: Things the user should verify BEFORE this step runs
      - `resource_type` 'project' | 'environment' | 'deployment' | 'environment-variable' | 'service' | 'domain' | 'git-link' | 'other', required: What kind of resource this step creates/modifies
      - `reversible` boolean, required: Whether this step is reversible (can be cleaned up on failure)
      - `risk` 'none' | 'low' | 'medium' | 'high' | 'critical', required: Risk level for this step
      - `skippable` boolean, required: Whether this step can be skipped by the user
      - `skipped` boolean: Whether the user has chosen to skip this step (set during review)
      - `title` string, required: Human-readable title (e.g., "Create project 'my-app'")
    - `summary` MigrationSummary, required: Human-readable summary of the entire migration
      - `critical_warnings` string[]: Critical warnings that must be acknowledged before proceeding. These are the most important things the user needs to know.
      - `headline` string, required: One-line summary (e.g., "Migrate 'my-app' from Vercel with 1 database, 2 domains")
      - `manual_actions_required` ManualAction[]: Manual actions the user must perform (before or after migration)
        - `description` string, required: Human-readable description
        - `reason` string, required: Why this can't be automated
        - `timing` 'before-migration' | 'after-migration' | 'within-hours', required: When this action needs to happen
      - `overall_risk` 'none' | 'low' | 'medium' | 'high' | 'critical', required: Overall risk assessment for the migration
      - `resource_counts` ResourceCounts, required: Resource counts for quick overview
        - `deployments` integer, required
        - `domains` integer, required
        - `environment_variables` integer, required
        - `environments` integer, required
        - `projects` integer, required
        - `services` integer, required
      - `unsupported_features` UnsupportedFeature[]: Features from the source platform that cannot be migrated
        - `alternative` string, nullable: Suggested alternative in Temps (if any)
        - `feature` string, required: Feature name (e.g., "Edge Middleware", "Serverless Functions", "Cron Jobs")
        - `reason` string, required: Why it can't be migrated
    - `version` string, required: Plan version for compatibility tracking
  - `session_id` string, required: Session ID for tracking
  - `validation` ValidationReport, required: Validation report
    - `overall_status` 'passed' | 'passed-with-warnings' | 'failed-with-warnings' | 'failed', required: Overall status
    - `results` ValidationResult[], required: All validation results
      - `affected_resources` string[], required: Affected resources/fields
      - `level` 'info' | 'warning' | 'error' | 'critical', required: Validation level
      - `message` string, required: Message describing the result
      - `passed` boolean, required: Whether the validation passed
      - `remediation` string, nullable: Suggested remediation (if failed)
      - `rule_id` string, required: Rule that was checked
      - `rule_name` string, required: Human-readable rule name
    - `summary` ValidationSummary, required: Summary statistics
      - `critical_count` integer, required: Critical-level results
      - `error_count` integer, required: Error-level results
      - `failed_count` integer, required: Validations that failed
      - `info_count` integer, required: Info-level results
      - `passed_count` integer, required: Validations that passed
      - `total_count` integer, required: Total validations run
      - `warning_count` integer, required: Warning-level results

## Other responses

- `400`: Invalid request
- `401`: Unauthorized
- `403`: Insufficient permissions

## Changes

- **2026-07-27** `1b060c0a4ba3`: 8 info
  - added the new `caprover` enum value to the request property `source`
  - added the new `kamal` enum value to the request property `source`
  - added the new `kubernetes` enum value to the request property `source`
  - added the new `portainer` enum value to the request property `source`
  - …4 more
- **2026-04-25** `774be20905f2`: 1 breaking, 1 warning, 8 info
  - removed the required property `plan/source_container_id` from the response with the `200` status
  - added the new `git` enum value to the `plan/project/project_type` response property for the response status `200`
  - added the new optional request property `credentials`
  - added the optional property `plan/additional_deployments` to the response with the `200` status
  - …6 more

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/imports/plan/post.md)

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
