---
title: "Migrate a legacy survey"
url: https://docs.gleap.ai/en/reference/rest-api/migrate
method: POST
path: "/engagement/surveys/{surveyId}/migrate"
api: "API Reference"
tag: "Engagement Survey"
operationId: "Migrate"
updatedAt: "2026-11-01T18:40:15.677Z"
language: en
---

# Migrate a legacy survey

`POST https://api.gleap.io/v3/engagement/surveys/{surveyId}/migrate`

Convert a legacy survey to Surveys 2.0 (published as version 1) and move its answer tickets into survey responses. Idempotent. Up to 1000 tickets move in the request; the rest continue in the background. Returns the outbound (with `survey`) and `migration: { status: 'done'|'running', responses?, warnings? }`; 422 `{ errors }` when the legacy form cannot be converted.

## Authorization

- `Authorization` (header, required): `Bearer <token>`

## Path parameters

- `surveyId` (string, required)

## Headers

- `project` (string, required)

## Example request

```bash
curl --request POST \
  --url 'https://api.gleap.io/v3/engagement/surveys/{surveyId}/migrate' \
  --header 'Authorization: Bearer <token>' \
  --header 'project: <project>'
```

## Responses

### 200 (`application/json`)

Ok
