API Reference
Errors

Errors

The Migrayt API uses standard HTTP status codes and returns consistent JSON error bodies.

Error Response Format

{
  "statusCode": 400,
  "message":    "Human-readable description of the error",
  "error":      "Bad Request"
}

For validation errors, message is an array:

{
  "statusCode": 400,
  "message": [
    "email must be a valid email",
    "password must be at least 8 characters"
  ],
  "error": "Bad Request"
}

HTTP Status Codes

CodeMeaning
200Success
201Created
204Success, no content (DELETE)
400Bad Request — invalid input
401Unauthorized — missing or invalid token
403Forbidden — valid token, insufficient permissions
404Not Found — resource does not exist or belongs to another tenant
409Conflict — resource already exists
429Too Many Requests — rate limit exceeded
502Bad Gateway — downstream service (ADO, Jira, AWS) returned an error
500Internal Server Error — unexpected error; contact support

Common Error Messages

Authentication

MessageResolution
Invalid or expired access tokenRefresh your token via POST /api/auth/refresh
No refresh tokenLog in again via POST /api/auth/login
Invalid credentialsCheck email and password

Migrations

MessageResolution
Migration run {id} not foundCheck the run ID and ensure it belongs to your tenant
Run {id} is not pausedCan only resume a run with status PAUSED
Could not start migration workerInfrastructure issue — retry in a few minutes; contact support if persists
Token exchange failedADO or Jira OAuth token is invalid or expired — reconnect the platform

Connectors

MessageResolution
ADO connection failed: 401PAT is expired or has insufficient permissions
Jira connection failed: 403API token lacks Project Administrator role
Project not found in ADOCheck the organisation and project name spelling
Jira project key not foundVerify the project key in Jira settings

Rate Limit Headers

When rate-limited (429), the response includes:

Retry-After:         30
X-RateLimit-Limit:   10
X-RateLimit-Reset:   1720001234

Wait for Retry-After seconds before retrying.

Idempotency

POST /api/migrations/project/{projectId}/start is idempotent within a session. If a migration is already running for the project, the existing run is returned rather than starting a new one. This prevents accidental duplicate migrations if a request is retried.