---
title: "Create a migration mapping"
method: POST
path: "/migration_mappings"
tags: ["Migration Mappings"]
---

# Create a migration mapping

`POST /migration_mappings`

Create a migration mapping that associates a resource's old tenant identity with its new tenant identity.

## Headers

- `Idempotency-Key` string

## Request body

- PostMigrationMapping — Fields required to create a migration mapping.
  - `old_resource_id` string, required — The previous resource ID under the old tenant.
  - `old_tenant` string, required — The id of the tenant containing the resource. This is relevant for Fintechs that have multiple workspaces.
  - `resource_id` string, required — The new/current resource ID.
  - `resource_type` 'ACCOUNT' | 'BUSINESS' | 'PERSON', required — The type of resource being mapped.

## Response `201`

Migration mapping created

- MigrationMapping — Maps a resource identity from an old tenant to a new tenant.
  - `creation_time` string, date-time, required — The date and time the resource was created.
  - `deletion_time` string, date-time, nullable — The date and time the resource was deleted.
  - `id` string, uuid, required — The unique identifier for the migration mapping.
  - `last_updated_time` string, date-time, required — The date and time the resource was last updated.
  - `old_resource_id` string, required — The previous resource ID under the old tenant.
  - `old_tenant` string, required — The id of the tenant containing the resource. This is relevant for Fintechs that have multiple workspaces.
  - `resource_id` string, required — The new/current resource ID.
  - `resource_type` 'ACCOUNT' | 'BUSINESS' | 'PERSON', required — The type of resource being mapped.
  - `tenant` string, required — The id of the tenant containing the resource. This is relevant for Fintechs that have multiple workspaces.

## Other responses

- `400` — BadRequest
- `401` — Unauthorized
- `403` — Forbidden error
- `409` — Resource already exists error
- `500` — Internal server error

---

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