---
title: "Migrate Document"
method: POST
path: "/migrate/document"
tags: ["Migration"]
---

# Migrate Document

`POST /migrate/document`

## Request

- Base URL: `https://api.morphik.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.morphik.ai/migrate/document`
- Auth: none declared

Ingest a migrated source document while preserving its document ID.

## Headers

- `authorization` string, nullable

## Request body `multipart/form-data`

- BodyMigrateDocumentMigrateDocumentPost
  - `file` string, binary, required
  - `source_document_id` string, required
  - `metadata` string
  - `metadata_types` string
  - `use_colpali` boolean, nullable
  - `folder_name` string, nullable
  - `end_user_id` string, nullable
  - `on_conflict` 'skip' | 'fail'

## Response `200`

Successful Response

- MigrationIngestResponse: Response for a migration document ingest request.
  - `status` 'created' | 'skipped', required
  - `document` Document, required: Represents a document stored in the database documents collection
    - `external_id` string
    - `content_type` string, required
    - `filename` string, nullable
    - `metadata` object
    - `metadata_types` object
    - `storage_info` object
    - `system_metadata` object
    - `additional_metadata` object
    - `chunk_ids` string[]
    - `summary_storage_key` string, nullable
    - `summary_version` integer, nullable
    - `summary_bucket` string, nullable
    - `summary_updated_at` string, nullable
    - `folder_name` string, nullable
    - `end_user_id` string, nullable
    - `app_id` string, nullable
    - `folder_path` string, nullable
    - `folder_id` string, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-16** `45d77e08d406`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/morphik-org/apis/morphik-api/changes/migrate/document/post.md)

---

[API](https://skmtc.dev/morphik-org/apis/morphik-api.md) - [All operations](https://skmtc.dev/morphik-org/apis/morphik-api/llms.txt) - [OpenAPI document](https://skmtc.dev/morphik-org/apis/morphik-api/revisions/45d77e08d406?raw)
