Full API Reference
Complete endpoint documentation for the Egret REST API.
Base URL
https://api.getegret.com
Authentication
All endpoints require authentication via JWT Bearer token or API Key. See Authentication for details.
Endpoints overview
| Method | Path | Description |
|---|---|---|
POST | /auth/jwt/create/ | Login (obtain JWT) |
POST | /auth/jwt/refresh/ | Refresh access token |
GET | /api/v1/domains/ | List domains |
POST | /api/v1/domains/ | Create domain |
GET | /api/v1/domains/{id}/ | Domain detail |
POST | /api/v1/rag/query/ | RAG query |
GET | /api/v1/sessions/ | List sessions |
GET | /api/v1/sessions/{id}/ | Session detail |
DELETE | /api/v1/sessions/{id}/ | Delete session |
GET | /api/v1/organizations/{id}/ | Organization detail |
GET | /api/v1/organizations/{id}/members/ | List members |
GET | /api/v1/api-keys/ | List API keys |
POST | /api/v1/api-keys/ | Create API key |
DELETE | /api/v1/api-keys/{id}/ | Revoke API key |
GET | /api/v1/billing/usage/ | Credit usage |
GET | /api/v1/billing/subscription/ | Subscription info |
GET | /health/ | Health check |
Response format
All endpoints return JSON. Successful responses use 200, 201, or 204. Errors return a JSON object with detail and code fields.
Pagination
List endpoints support cursor-based pagination via ?cursor= and ?limit= query parameters. The response includes next and previous URLs.