Base URL
- Production:
https://api.example.com - Staging:
https://staging-api.example.com - Local:
http://localhost:8080
Conventions
- Content-Type:
application/json - Date/Time: ISO 8601 (UTC)
- Pagination:
limit,offset - Error format: See “Error Responses (Global)” in
docs/api/endpoint-template.md
Endpoints
GET /api/v1/credits/balance
Summary: Return the current credit balance for the authenticated user. Idempotent: Yes Tags: creditsRequest
HeadersContent-Type: application/json
| Name | Type | Required | Default | Description | Example |
|---|---|---|---|---|---|
| user_id | string (uuid) | No | - | Target user ID (admins only) | 550e8400-e29b-41d4-a716-446655440000 |
Responses
200 OK - Credit balance| Field | Type | Description |
|---|---|---|
| user_id | string | User UUID |
| balance | integer | Current credit balance |
Notes
- Admin tokens that do not map to a user UUID must supply
user_id.