---
title: "Create Migration"
method: POST
path: "/api/v1/migrations"
tags: ["migrations"]
---

# Create Migration

`POST /api/v1/migrations`

## Request

- Base URL: `https://api.mengi.cloud` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mengi.cloud/api/v1/migrations`
- Auth: none declared

Start a namespace migration from one cluster to another.

## Request body

- MigrationCreate
  - `source_cluster_id` string, uuid, required
  - `target_cluster_id` string, uuid, required
  - `namespace` string, required
  - `target_namespace` string, nullable
  - `import_workloads` boolean
  - `resync_interval_minutes` integer, nullable

## Response `201`

Successful Response

- MigrationResponse
  - `id` string, uuid, required
  - `user_id` string, uuid, required
  - `organization_id` string, uuid, nullable
  - `source_cluster_id` string, uuid, required
  - `target_cluster_id` string, uuid, required
  - `namespace` string, required
  - `target_namespace` string, nullable
  - `import_workloads` boolean, required
  - `status` 'pending' | 'installing_velero_source' | 'backing_up' | 'installing_velero_target' | 'restoring' | 'importing_workloads' | 'cleaning_up' | 'completed' | 'failed' | 'cancelled', required
  - `progress_message` string, nullable
  - `backup_name` string, nullable
  - `restore_name` string, nullable
  - `backup_size_bytes` integer, nullable
  - `pvc_count` integer, nullable
  - `resource_count` integer, nullable
  - `error_message` string, nullable
  - `resync_interval_minutes` integer, nullable
  - `started_at` string, date-time, nullable
  - `completed_at` string, date-time, nullable
  - `created_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/mengi/apis/mengi-cloud.md) · [All operations](https://skmtc.dev/mengi/apis/mengi-cloud/llms.txt) · [OpenAPI document](https://skmtc.dev/mengi/apis/mengi-cloud/revisions/4ae9b375cdbb?raw)
