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

# Start Migration

> Start a migration



## OpenAPI

````yaml v1/openapi.json post /api/v1/migrations/start
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/migrations/start:
    post:
      tags:
        - Migrations
      summary: Start Migration
      description: Start a migration
      operationId: api.v1.migrations.start
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StartMigrationRequest'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MigrationResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/APIErrorResponse'
components:
  schemas:
    StartMigrationRequest:
      type: object
      properties:
        company_name:
          type: string
          description: Name of the company to migrate
        tasks_to_include:
          type: array
          description: Tasks to include in the migration
          items:
            type: object
            properties:
              data_type:
                $ref: '#/components/schemas/MigrationDataTypeBronze'
              count:
                type: number
                description: Count of the task to include in the migration
            required:
              - data_type
              - count
        tasks_to_exclude:
          type: array
          description: Tasks to exclude in the migration
          items:
            $ref: '#/components/schemas/MigrationDataTypeBronze'
        service_account_id:
          type: string
          description: Unique identifier for the service account to use for the migration
      required:
        - tasks_to_include
        - service_account_id
      additionalProperties: false
    MigrationResponse:
      type: object
      properties:
        object:
          type: string
          enum:
            - migration
        id:
          type: string
          format: uuid
          description: Unique identifier for the migration
        created:
          type: string
          format: date-time
          description: Timestamp when the migration was created
        status:
          type: string
          enum:
            - NOT_READY
            - NOT_STARTED
            - WORKING
            - PENDING_USER_INPUT
            - COMPLETE
            - FAILED
            - LOGIN_ABANDONED
            - COMPLETED_WITH_FAILURES
          description: Current status of the migration
        created_by_user_id:
          type: string
          description: Unique identifier for the user who created the migration
        company_id:
          type:
            - string
            - 'null'
          format: uuid
          description: Unique identifier for the company
      required:
        - object
        - id
        - created
        - status
        - created_by_user_id
        - company_id
      additionalProperties: false
    APIErrorResponse:
      type: object
      properties:
        type:
          type: string
          enum:
            - api_error
        message:
          type: string
      required:
        - type
        - message
      additionalProperties: false
    MigrationDataTypeBronze:
      type: string
      enum:
        - EmployeeRoster
        - EmployeeDetails
        - DirectDeposit
        - EmployeeW2Previews
        - EmployeeDirectDeposit
        - ContractorRoster
        - ContractorPayments
        - TimeOffBalances
        - PTOData
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication

````