Skip to main content
POST
/
api
/
v1
/
migrations
/
start
Start Migration
curl --request POST \
  --url https://worker.anon.com/api/v1/migrations/start \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "tasks_to_include": [
    {
      "data_type": "EmployeeRoster",
      "count": 123
    }
  ],
  "service_account_id": "<string>",
  "company_name": "<string>",
  "tasks_to_exclude": [
    "EmployeeRoster"
  ]
}
'
{
  "object": "migration",
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created": "2023-11-07T05:31:56Z",
  "status": "NOT_READY",
  "created_by_user_id": "<string>",
  "company_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

Bearer token authentication

Body

application/json
tasks_to_include
object[]
required

Tasks to include in the migration

service_account_id
string
required

Unique identifier for the service account to use for the migration

company_name
string

Name of the company to migrate

tasks_to_exclude
enum<string>[]

Tasks to exclude in the migration

Available options:
EmployeeRoster,
EmployeeDetails,
DirectDeposit,
EmployeeW2Previews,
EmployeeDirectDeposit,
ContractorRoster,
ContractorPayments,
TimeOffBalances,
PTOData

Response

Success

object
enum<string>
required
Available options:
migration
id
string<uuid>
required

Unique identifier for the migration

created
string<date-time>
required

Timestamp when the migration was created

status
enum<string>
required

Current status of the migration

Available options:
NOT_READY,
NOT_STARTED,
WORKING,
PENDING_USER_INPUT,
COMPLETE,
FAILED,
LOGIN_ABANDONED,
COMPLETED_WITH_FAILURES
created_by_user_id
string
required

Unique identifier for the user who created the migration

company_id
string<uuid> | null
required

Unique identifier for the company