post

POST /v2/migration/jobs — Upload CSV and start dry-run

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Uploads a CSV file to S3 and creates a migration job in PENDING_VALIDATION status. The job is immediately enqueued for dry-run validation — no records are written to the database during dry-run.

Request

Content-Type: multipart/form-data

FieldTypeRequiredDescription
filefileCSV file (max 50 MB, text/csv MIME type only)
typestringEntity type: PATIENTS, PRODUCTS, ORDERS, SUBSCRIPTIONS, or COUPONS

Required role

affiliate_super_admin

Response 200

{
  "success": true,
  "result": {
    "id": "mjob::abc123",
    "type": "PATIENTS",
    "status": "PENDING_VALIDATION",
    "dryRun": true,
    "totalRows": 0,
    "processedRows": 0,
    "successRows": 0,
    "errorRows": 0,
    "skippedRows": 0,
    "createdAt": "2026-05-30T14:00:00.000Z"
  }
}

totalRows is 0 until the validation worker processes the file.

Errors

StatusDescription
400No file attached
400File exceeds 50 MB
400File is not a CSV
400Invalid type value
Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here!