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

# Migrate a legacy survey

> 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.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json post /engagement/surveys/{surveyId}/migrate
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /engagement/surveys/{surveyId}/migrate:
    post:
      tags:
        - Engagement Survey
      summary: Migrate a legacy survey
      description: >-
        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.
      operationId: Migrate
      parameters:
        - in: path
          name: surveyId
          required: true
          schema:
            type: string
        - in: header
          name: project
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema: {}
      security:
        - jwt: []
components:
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.