← API docs

API errors and troubleshooting

What each error code means, when the API returns it and how to fix it - with response bodies recorded from real calls, not written by hand. Below them, the results that are correct but surprising: charts that differ from other software, ascendants and dasha dates that moved.

Every error

The error envelope

Every error uses the same shape: a request_id (also sent as the x-request-id header) and an error object with a stable code, a human-readable message and, for some codes, a details object. Switch on error.code, never on message, which may be reworded. The chat API adds "success": false.

json
{
  "request_id": "req_01M8RK47SXCYHEM071P6DYDRYC",
  "error": {
    "code": "NOT_FOUND",
    "message": "Route POST /v1/chart/birth not found"
  }
}

The success envelope and every field in both shapes: response envelope reference.

By code

Error codes

For completeness

Codes you will not receive

The API's list of error codes includes a few that no request made with an API key returns today. If you have seen one of these, it came from somewhere other than the public API.

  • FORBIDDEN - Defined, but not returned to API-key callers. A 403 from AstroNode is PLAN_REQUIRED.
  • ENGINE_TIMEOUT - Defined, never returned.
  • SERVICE_UNAVAILABLE - Defined, never returned. GET /v1/health reports dependency status with its own 503 body.
  • INVALID_DOB, INVALID_TIME, INVALID_COORDINATES - Not returned by the REST API: bad dates, times and coordinates are VALIDATION_ERROR.