Route namespaces
/v1/ — Auth, onboarding, and wallet data
The /v1/ namespace handles identity: signing users up, issuing session tokens, and bootstrapping their first wallet through the onboarding flow. It also exposes read endpoints for wallet stats and transaction history scoped to the authenticated session.
/api/ — Wallets and payments
The /api/ namespace is where wallets are provisioned and agents submit payment intents. Wallet CRUD routes require a session token; the payment intent route requires a wallet API key.
Request format
Every request to the Axis API must include aContent-Type: application/json header and a JSON body (for POST requests). Authenticated routes require one of two credentials:
Authorization: Bearer <token>— a session token returned byPOST /v1/auth/login, used with/v1/routes and wallet management routes.x-api-key: <api-key>— a wallet-scoped API key (ax_live_+ 48 hex chars), used withPOST /api/payment-intent.
Error response shape
When a request fails, Axis returns a JSON body with a consistent structure.status signals the failure, message gives a human-readable description, and the optional details object provides field-level validation errors — useful for surfacing inline form errors directly in your UI.
Some error responses use
success: false instead of status: "fail". Your error handler should treat both shapes as failure cases.HTTP status codes
Authorization error codes
When a payment intent is rejected with a403, the response body includes a machine-readable code field from the authorization engine. Use this to give users and agents specific, actionable feedback rather than a generic error message.
Handling errors in your frontend
The snippet below shows a complete error-handling wrapper built around the request helper defined earlier.AxisApiError preserves both the HTTP status and the parsed response body so you can branch on code for authorization failures and on details for validation failures.