Getting Started
Base URL
https://api.radioreg.netAll endpoints are relative to this base URL. Example:
GET https://api.radioreg.net/streamResponse Format
The API always returns JSON. Errors follow this schema:
json
{
"statusCode": 404,
"message": "Not Found"
}Authentication
The RadioReg API supports two types of authentication.
JWT Bearer Token
All endpoints that require a logged-in user use a JWT token. You can obtain the token via the login endpoint.
http
Authorization: Bearer <your-jwt-token>Example:
bash
curl https://api.radioreg.net/user/streams \
-H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."Tokens are valid for 24 hours by default. Using thirtyDaysLogin: true during login extends the validity to 30 days.
Organization API Token
For webhook integrations (e.g. real-time stream updates), an organization-specific API token is used. You can find it in your organization settings.
http
Authorization: Bearer <organization-api-token>Example:
bash
curl -X POST https://api.radioreg.net/stream/update/your-stream-uuid \
-H "Authorization: Bearer rr_org_abc123..." \
-H "Content-Type: application/json" \
-d '{"title": "Song Name", "artist": "Artist Name"}'Public Endpoints
The following endpoints are accessible without authentication:
| Endpoint | Description |
|---|---|
GET /stream | List all streams |
GET /stream/:id/history | Song history of a stream |
GET /stream/:id/votes | Vote count for a stream |
GET /organization | List all organizations |
GET /organization/:id | Organization details |
GET /organization/name/:name | Organization by name |
GET /organization/limit/:limit | Random organizations |
GET /organization/:id/streams | Streams of an organization |
POST /user | Create a new account |
POST /user/login | Log in |
GET /stats | Platform statistics |
