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

# Create Migration Modal

> Creates a signed embed URL for a migration modal for embedding, with configurable expiration time (defaults to 59 minutes)



## OpenAPI

````yaml v1/openapi.json post /api/v1/migration-modal
openapi: 3.1.0
info:
  title: EDM API
  version: 1.0.0
  description: >-
    This API is built from TypeScript source code and uses common types defined
    in your shared files. It exposes endpoints for migration workflows, file
    management, and migration modal creation.
servers:
  - url: https://worker.anon.com
security:
  - bearerAuth: []
paths:
  /api/v1/migration-modal:
    post:
      tags:
        - Migration Modal
      summary: Create Migration Modal
      description: >-
        Creates a signed embed URL for a migration modal for embedding, with
        configurable expiration time (defaults to 59 minutes)
      operationId: api.v1.migration-modal.create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateMigrationModalRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MigrationModalResponse'
        '400':
          description: Bad Request - Invalid input parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
components:
  schemas:
    CreateMigrationModalRequest:
      type: object
      properties:
        user_id:
          type: string
          description: Your end-user's unique identifier (usually an email or UUID)
        source_provider:
          $ref: '#/components/schemas/SourceProvider'
          description: >-
            The source provider for the migration, to skip the 'Select Provider'
            step in the migration modal
        source_providers:
          type: array
          description: >-
            A list of source providers to show on the source selection step.
            Overrides the default list.
          items:
            $ref: '#/components/schemas/SourceProvider'
          minItems: 1
        default_hidden:
          type: boolean
          description: >-
            Whether the migration modal should be hidden by default when added
            to the page. Defaults to false.
        timeout_minutes:
          type: number
          description: >-
            Number of minutes until the migration modal URL expires. Defaults to
            59.
          default: 59
      required:
        - user_id
      additionalProperties: false
    MigrationModalResponse:
      type: object
      properties:
        object:
          type: string
          enum:
            - migration_modal
        id:
          type: string
          format: uuid
          description: Unique identifier for the migration modal
        migration_id:
          type: string
          format: uuid
          description: Unique identifier for the migration associated with this modal
        url:
          type: string
          format: uri
          description: The signed URL for embedding the migration modal in an iframe
        created:
          type: string
          format: date-time
          description: Timestamp when the migration modal was created
        expires_at:
          type: string
          format: date-time
          description: Timestamp when the migration modal URL will expire
        created_by_user_id:
          type: string
          format: uuid
          description: Anon's unique identifier for the user who created the migration
      required:
        - object
        - id
        - migration_id
        - url
        - created
        - expires_at
        - created_by_user_id
      additionalProperties: false
    ValidationErrorResponse:
      type: object
      properties:
        type:
          type: string
          enum:
            - validation_error
        message:
          type: string
      required:
        - type
        - message
      additionalProperties: false
    APIErrorResponse:
      type: object
      properties:
        type:
          type: string
          enum:
            - api_error
        message:
          type: string
      required:
        - type
        - message
      additionalProperties: false
    SourceProvider:
      type: string
      enum:
        - gusto
        - quickbooks
        - adp
        - navan
        - toast
        - clover
        - travelperk
        - egencia
        - shopkeep
        - spoton
        - gusto_service_account
        - target
        - amazon
        - home_depot
        - lowes
        - uber_eats
        - fedex
        - costco
        - staples
        - ups
        - kaiserpermanente
        - anthem
      description: Source provider for migrations
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication

````