MiraBridge exposes a REST API for authentication, user management, and billing. Real-time features use WebSocket (see the WebSocket Protocol page).
Base URL
https://api.mirabridge.io/api
Authentication
All API requests require a JWT bearer token:
curl -H "Authorization: Bearer YOUR_TOKEN" https://api.mirabridge.io/api/user/meKey Endpoints
Auth
| Method | Path | Description | |--------|------|-------------| | POST | /auth/login | Email/password login | | POST | /auth/register | Create account | | POST | /auth/refresh | Refresh access token | | GET | /auth/github | GitHub OAuth | | GET | /auth/google | Google OAuth |
User
| Method | Path | Description | |--------|------|-------------| | GET | /user/me | Get current user | | PATCH | /user/me | Update profile | | DELETE | /user/me | Delete account |
Billing
| Method | Path | Description | |--------|------|-------------| | GET | /billing/balance | Get token balance | | GET | /billing/usage | Get usage history | | POST | /billing/subscribe | Create subscription |
Health
| Method | Path | Description | |--------|------|-------------| | GET | /status/health | Health check |
Next Steps
- WebSocket Protocol — real-time API
- Troubleshooting — common issues