API Reference

Complete REST API documentation for the ZexRail platform. All endpoints require authentication via Bearer token.

Base URL
https://api.zexrail.com/v1

All requests must include the header Authorization: Bearer YOUR_API_KEY.

Error Format

All error responses follow a consistent format with an error object containing a machine-readable code, a human-readable message, and optional param and doc_url fields.

{
  "error": {
    "code": "invalid_request",
    "message": "The 'amount' field must be a positive integer.",
    "param": "amount",
    "doc_url": "https://docs.zexrail.com/errors/invalid_request"
  }
}
HTTP StatusCodeDescription
400invalid_requestThe request was malformed or missing required fields.
401unauthorizedInvalid or missing authentication.
403forbiddenThe API key lacks the required permissions.
404not_foundThe requested resource does not exist.
409conflictThe request conflicts with the current state of the resource.
429rate_limitedToo many requests. Retry after the indicated period.
500internal_errorAn unexpected server error occurred.