---
title: "Migrate model"
method: POST
path: "/api/v1/models/{modelId}/migrate"
tags: ["Models"]
---

# Migrate model

`POST /api/v1/models/{modelId}/migrate`

## Path parameters

- `modelId` string, uuid, required — Model UUID

## Request body

- ModelsMigrateBody
  - `branchName` string — Branch name for the target model
  - `commitMessage` string — Commit message for git sync
  - `deleteViewsAndTopicsMissingFromSource` boolean — When true (default), views and topics in the target model that are missing from the migrated source are deleted (the source is treated as the complete model). When false, they are kept (inherited) instead — useful when the source git ref may be missing objects that exist in omni but not in git, e.g. a newly synced schema.
  - `gitRef` string — Git reference
  - `targetModelId` string, uuid, required — Target model ID to migrate to

## Response `200`

Migration completed successfully

- SuccessResponse
  - `success` boolean, required — Whether the operation was successful

## Other responses

- `400` — Invalid request body or migration not allowed
- `401` — Authentication required
- `403` — Permission denied
- `404` — Model not found

---

[API](https://skmtc.net/omniapp/apis/omni-api.md) · [All operations](https://skmtc.net/omniapp/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omniapp/omni-api/versions/de7cac8b5983/schema)
