> ## Documentation Index
> Fetch the complete documentation index at: https://velt.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate Documents Status

Use this API to poll the status of a document migration. Use the `migrationId` returned from the [Migrate Documents](/api-reference/rest-apis/v2/documents/migrate-documents) endpoint.

# Endpoint

`POST https://api.velt.dev/v2/organizations/documents/migrate/status`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="organizationId" type="string" required>
      Organization ID
    </ParamField>

    <ParamField body="migrationId" type="string" required>
      Migration ID returned from the [Migrate Documents](/api-reference/rest-apis/v2/documents/migrate-documents) endpoint
    </ParamField>
  </Expandable>
</ParamField>

## **Example Requests**

#### Check migration status

```JSON theme={null}
{
  "data": {
    "organizationId": "yourOrganizationId",
    "migrationId": "yourMigrationId"
  }
}
```

# Response

#### Success Response

The `status` field reflects the current state of the migration. Possible values: `pending`, `in_progress`, `completed`, `failed`.

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Migration status retrieved successfully.",
    "data": {
      "migrationId": "yourMigrationId",
      "status": "completed"
    }
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
```

<ResponseExample>
  ```js theme={null}
  {
    "result": {
      "status": "success",
      "message": "Migration status retrieved successfully.",
      "data": {
        "migrationId": "yourMigrationId",
        "status": "completed"
      }
    }
  }
  ```
</ResponseExample>
