Getting started
Getting started
This guide helps you make your first authenticated call to the Miles USP /v7 API.
Prerequisites
- Network access to one of the documented server environments.
- For user-scoped routes: a valid Bearer JWT (see Authentication).
- For admin tooling: phone OTP login via
/v7/login-with-phone-otpand/v7/verify-otp.
1. Smoke-test the API
Confirm the /v7 prefix is mounted:
Expected: a small JSON payload confirming the versioned surface is live.
2. Check health
/v7/health/ready returns 503 when the database or cache is degraded.
3. Authenticate
Most product endpoints require:
Obtain a token via SSO (mobile app / web) or admin phone OTP. Details are in Authentication.
4. Call an endpoint
Example — list account-related routes are under the Account & auth section in the API Reference. Use the API Explorer on any endpoint page to send a live request with your token pre-filled.
Regenerating the OpenAPI contract
The committed spec at docs/openapi.yaml is generated from the FastAPI app:
After regenerating, restart fern docs dev to pick up changes.
Local development
Point the API Explorer server dropdown at Local (http://localhost:8080).