API Reference
All endpoints require a valid API key in the
Authorization header.Authentication
Pass your key as a Bearer token in every request:
Authorization: Bearer vk_<your-key-value>
Scopes
Each key is issued with one or more scopes that determine which endpoints it can access.
| Scope | Description |
|---|---|
| analytics:read | Read platform analytics and usage metrics |
| reports:read | Export monthly reports |
| users:read | Read the user directory |
| support:read | Read support ticket data |
Data Endpoints
| Method | Path | Required Scope | Description |
|---|---|---|---|
| GET | /api/v1/data/analytics | analytics:read | Platform analytics summary |
| GET | /api/v1/data/reports | reports:read | Monthly report export |
| GET | /api/v1/data/users | users:read | User directory listing |
| GET | /api/v1/data/support | support:read | Support ticket summary |
Key Management
| Method | Path | Auth | Description |
|---|---|---|---|
| GET | /api/v1/keys/me | Any valid key | List your own keys |
| POST | /api/v1/keys | Any valid key | Create a new key programmatically |
| GET | /api/v1/users/{user_id}/keys | Any valid key | List keys for a specific user |
Examples
Fetch analytics:
curl https://ratapi.thexssrat.com/api/v1/data/analytics \
-H "Authorization: Bearer vk_your_key_here"
Create a key via API:
curl -X POST https://ratapi.thexssrat.com/api/v1/keys \
-H "Authorization: Bearer vk_your_key_here" \
-H "Content-Type: application/json" \
-d '{"name": "ci-service", "scopes": ["analytics:read", "reports:read"]}'
List keys for user ID 1:
curl https://ratapi.thexssrat.com/api/v1/users/1/keys \
-H "Authorization: Bearer vk_your_key_here"