---
title: "Execute an import"
method: POST
path: "/imports/execute"
tags: ["Imports"]
---

# Execute an import

`POST /imports/execute`

## Request

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

## Request body

- ExecuteImportRequest: Request to execute an import
  - `directory` string, required: Project directory
  - `dry_run` boolean, nullable: Dry run mode (don't create resources)
  - `main_branch` string, required: Main branch name
  - `preset` string, required: Preset to use for the project (e.g., "nextjs", "express", "docker")
  - `project_name` string, required: Project name to use (overrides the name from the plan)
  - `session_id` string, required: Session ID from plan creation

## Response `202`

Import execution started

- ExecuteImportResponse: Response from import execution
  - `deployment_id` integer, nullable: Created deployment ID (if completed)
  - `environment_id` integer, nullable: Created environment ID (if completed)
  - `project_id` integer, nullable: Created project ID (if completed)
  - `session_id` string, required: Session ID
  - `status` 'pending' | 'inprogress' | 'completed' | 'failed', required: Execution status
  - `step_results` StepResult[], required: Per-step results (in execution order)
    - `created_resources` CreatedResource[], required: Resources created by this step
      - `resource_id` integer, required: Resource ID
      - `resource_name` string, required: Resource name
      - `resource_type` string, required: Resource type (project, environment, deployment, service, domain, etc.)
    - `duration_seconds` number, double, required: Duration of this step
    - `message` string, required: Human-readable message about what happened
    - `skipped` boolean, required: Whether this step was skipped
    - `step_id` string, required: Step ID (matches `MigrationStep.id`)
    - `step_title` string, required: Step title (for display)
    - `success` boolean, required: Whether this step succeeded

## Other responses

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

## Changes

- **2026-04-25** `774be20905f2`: 1 info
  - added the required property `step_results` to the response with the `202` status

[Operation history](https://skmtc.dev/gotempsh/apis/temps/changes/imports/execute/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)
