API keys
Server owner: Admin › Billing & API › REST API › New key. Reseller: Reseller › Billing › API keys › New key (when the reseller package allows the API). Tick only the scopes you need: stations:read, stations:write, packages:read, clients:write (create new radio owners). Optional for admin keys: allowed IP addresses, one per line – calls from other addresses are refused. The key looks like ack_xxxxxxxx_… and is shown once. Keep it secret; revoke it in the same place if it leaks.
Basics
Base address: https://YOUR-PANEL-DOMAIN/api/v1, for example https://panel.yourradio.com/api/v1. Use the address where you installed AnowCast (the same address you open the control panel with). The examples below keep it in a variable PANEL_URL.
Send the key in every call: Authorization: Bearer ack_xxxxxxxx_YOUR_SECRET. There is no session and no cookie. Answers are JSON: {"ok": true, "data": …} or {"ok": false, "error": "…"} with an HTTP error code. The key acts as its owner: an admin key sees every station of that admin, a reseller key only the reseller's own clients and packages. Limits: API calls per minute per key are set in the panel (Admin › Billing & API, default 60); 120 calls a minute per IP; 20 wrong keys from one IP block it for 10 minutes. Always use https. Send JSON bodies with Content-Type: application/json.
Errors
HTTP Meaning
401The API key is missing, wrong or revoked, or its owner is not active. 20 failed tries from one IP block that IP for 10 minutes (429). 403The key may not do this: a missing scope ("The key has no stations:write permission."), the calling IP is not in the key's allow-list, or the e-mail belongs to an account the key cannot use (409). 404The station does not exist or the key's owner may not see it. 409Create: the owner e-mail belongs to an account you cannot use. 422A field is missing or wrong, or the package is unknown. The message says which. 429Too many calls: more than the panel's "API calls per minute per key" (default 60), or 120 calls a minute from one IP. 502The change was saved but the streaming server did not answer (unsuspend, package). 503The API is switched off in the panel (Admin › Billing & API).
{
"ok": false,
"error": "The key has no stations:write permission."
}
Using WHMCS? The free WHMCS module makes these calls for you.
cURL PHP (cURL) PHP (Guzzle / Laravel Http) Node.js (fetch) Python (requests)
Check the key
Answers the panel version and whose key it is. Use it as the "Test connection" of your billing system.
Scope: any valid key · Success: HTTP 200
cURL Copy
PANEL_URL='https://panel.yourradio.com'
API_KEY='ack_xxxxxxxx_YOUR_SECRET'
curl -X GET "$PANEL_URL/api/v1/ping" \
-H "Authorization: Bearer $API_KEY" \
-H 'Accept: application/json'
PHP (cURL) Copy
<?php
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
$ch = curl_init($PANEL_URL.'/api/v1/ping');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.$API_KEY,
'Accept: application/json',
'Content-Type: application/json',
],
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'HTTP '.$status);
}
$data = $answer['data'];
PHP (Guzzle / Laravel Http) Copy
use Illuminate\Support\Facades\Http;
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$answer = Http::withToken('ack_xxxxxxxx_YOUR_SECRET')
->acceptJson()
->timeout(60)
->get($PANEL_URL.'/api/v1/ping')
->json();
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'API error');
}
$data = $answer['data'];
// Plain Guzzle:
// (new GuzzleHttp\Client)->request('GET', $PANEL_URL.'/api/v1/ping', [
// 'headers' => ['Authorization' => 'Bearer ack_xxxxxxxx_YOUR_SECRET', 'Accept' => 'application/json'],
// 'http_errors' => false,
// ]);
Node.js (fetch) Copy
const PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
const API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
const res = await fetch(`${PANEL_URL}/api/v1/ping`, {
method: 'GET',
headers: {
Authorization: `Bearer ${API_KEY}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
});
const answer = await res.json();
if (!answer.ok) throw new Error(answer.error || `HTTP ${res.status}`);
const data = answer.data;
Python (requests) Copy
import requests
PANEL_URL = 'https://panel.yourradio.com' # where you installed AnowCast
API_KEY = 'ack_xxxxxxxx_YOUR_SECRET'
res = requests.get(
f'{PANEL_URL}/api/v1/ping',
headers={'Authorization': f'Bearer {API_KEY}', 'Accept': 'application/json'},
timeout=60,
)
answer = res.json()
if not answer.get('ok'):
raise RuntimeError(answer.get('error') or f'HTTP {res.status_code}')
data = answer['data']
Answer · HTTP 200 Copy
{
"ok": true,
"data": {
"version": "1.0.0",
"account": "My Radio Host",
"time": "2026-12-01T10:15:00+05:30"
}
}
List packages
The active station packages the key's owner sells: an admin key lists the admin packages, a reseller key the reseller's own packages. Use the slug when you create a station.
Scope: packages:read · Success: HTTP 200
cURL Copy
PANEL_URL='https://panel.yourradio.com'
API_KEY='ack_xxxxxxxx_YOUR_SECRET'
curl -X GET "$PANEL_URL/api/v1/packages" \
-H "Authorization: Bearer $API_KEY" \
-H 'Accept: application/json'
PHP (cURL) Copy
<?php
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
$ch = curl_init($PANEL_URL.'/api/v1/packages');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.$API_KEY,
'Accept: application/json',
'Content-Type: application/json',
],
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'HTTP '.$status);
}
$data = $answer['data'];
PHP (Guzzle / Laravel Http) Copy
use Illuminate\Support\Facades\Http;
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$answer = Http::withToken('ack_xxxxxxxx_YOUR_SECRET')
->acceptJson()
->timeout(60)
->get($PANEL_URL.'/api/v1/packages')
->json();
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'API error');
}
$data = $answer['data'];
// Plain Guzzle:
// (new GuzzleHttp\Client)->request('GET', $PANEL_URL.'/api/v1/packages', [
// 'headers' => ['Authorization' => 'Bearer ack_xxxxxxxx_YOUR_SECRET', 'Accept' => 'application/json'],
// 'http_errors' => false,
// ]);
Node.js (fetch) Copy
const PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
const API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
const res = await fetch(`${PANEL_URL}/api/v1/packages`, {
method: 'GET',
headers: {
Authorization: `Bearer ${API_KEY}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
});
const answer = await res.json();
if (!answer.ok) throw new Error(answer.error || `HTTP ${res.status}`);
const data = answer.data;
Python (requests) Copy
import requests
PANEL_URL = 'https://panel.yourradio.com' # where you installed AnowCast
API_KEY = 'ack_xxxxxxxx_YOUR_SECRET'
res = requests.get(
f'{PANEL_URL}/api/v1/packages',
headers={'Authorization': f'Bearer {API_KEY}', 'Accept': 'application/json'},
timeout=60,
)
answer = res.json()
if not answer.get('ok'):
raise RuntimeError(answer.get('error') or f'HTTP {res.status_code}')
data = answer['data']
Answer · HTTP 200 Copy
{
"ok": true,
"data": [
{
"slug": "pro-500",
"name": "Pro 500",
"max_listeners": 500,
"max_bitrate": 192,
"disk_mb": 20480,
"bandwidth_gb": 0,
"price_month": "12.00",
"price_quarter": "33.00",
"price_year": "120.00",
"features": {
"autodj": true,
"live_dj": true
}
}
]
}
GET /api/v1/stations?owner_email=priya@example.com&per_page=50
List stations
Every station the key's owner may see, oldest first, 50 per page (per_page 1–200, page=2 …). Optional filter owner_email.
Scope: stations:read · Success: HTTP 200
Field In Required Meaning
owner_emailquery no Only the stations of this radio owner per_pagequery no 1–200, default 50 pagequery no Page number
cURL Copy
PANEL_URL='https://panel.yourradio.com'
API_KEY='ack_xxxxxxxx_YOUR_SECRET'
curl -X GET "$PANEL_URL/api/v1/stations?owner_email=priya@example.com&per_page=50" \
-H "Authorization: Bearer $API_KEY" \
-H 'Accept: application/json'
PHP (cURL) Copy
<?php
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
$ch = curl_init($PANEL_URL.'/api/v1/stations?owner_email=priya@example.com&per_page=50');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.$API_KEY,
'Accept: application/json',
'Content-Type: application/json',
],
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'HTTP '.$status);
}
$data = $answer['data'];
PHP (Guzzle / Laravel Http) Copy
use Illuminate\Support\Facades\Http;
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$answer = Http::withToken('ack_xxxxxxxx_YOUR_SECRET')
->acceptJson()
->timeout(60)
->get($PANEL_URL.'/api/v1/stations?owner_email=priya@example.com&per_page=50')
->json();
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'API error');
}
$data = $answer['data'];
// Plain Guzzle:
// (new GuzzleHttp\Client)->request('GET', $PANEL_URL.'/api/v1/stations?owner_email=priya@example.com&per_page=50', [
// 'headers' => ['Authorization' => 'Bearer ack_xxxxxxxx_YOUR_SECRET', 'Accept' => 'application/json'],
// 'http_errors' => false,
// ]);
Node.js (fetch) Copy
const PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
const API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
const res = await fetch(`${PANEL_URL}/api/v1/stations?owner_email=priya@example.com&per_page=50`, {
method: 'GET',
headers: {
Authorization: `Bearer ${API_KEY}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
});
const answer = await res.json();
if (!answer.ok) throw new Error(answer.error || `HTTP ${res.status}`);
const data = answer.data;
Python (requests) Copy
import requests
PANEL_URL = 'https://panel.yourradio.com' # where you installed AnowCast
API_KEY = 'ack_xxxxxxxx_YOUR_SECRET'
res = requests.get(
f'{PANEL_URL}/api/v1/stations?owner_email=priya@example.com&per_page=50',
headers={'Authorization': f'Bearer {API_KEY}', 'Accept': 'application/json'},
timeout=60,
)
answer = res.json()
if not answer.get('ok'):
raise RuntimeError(answer.get('error') or f'HTTP {res.status_code}')
data = answer['data']
Answer · HTTP 200 Copy
{
"ok": true,
"data": {
"stations": [
{
"id": 42,
"name": "Sunrise FM",
"slug": "sunrise-fm",
"status": "active",
"suspended_reason": null,
"owner": {
"id": 17,
"name": "Priya Sharma",
"email": "priya@example.com"
},
"package": "pro-500",
"node": "Server 1",
"host": "panel.yourradio.com",
"port": 8010,
"source_port": 8011,
"max_listeners": 500,
"bitrate": 128,
"stream_url": "https://panel.yourradio.com:8010/live",
"mounts": [
"/live",
"/mobile"
],
"paid_until": "2027-01-01T00:00:00+05:30",
"panel_url": "https://panel.yourradio.com/radio/42"
}
],
"total": 1,
"page": 1,
"pages": 1
}
}
Read one station
Status, owner, package, server, ports, stream address and the panel link of one station.
Scope: stations:read · Success: HTTP 200
cURL Copy
PANEL_URL='https://panel.yourradio.com'
API_KEY='ack_xxxxxxxx_YOUR_SECRET'
curl -X GET "$PANEL_URL/api/v1/stations/42" \
-H "Authorization: Bearer $API_KEY" \
-H 'Accept: application/json'
PHP (cURL) Copy
<?php
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
$ch = curl_init($PANEL_URL.'/api/v1/stations/42');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'GET',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.$API_KEY,
'Accept: application/json',
'Content-Type: application/json',
],
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'HTTP '.$status);
}
$data = $answer['data'];
PHP (Guzzle / Laravel Http) Copy
use Illuminate\Support\Facades\Http;
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$answer = Http::withToken('ack_xxxxxxxx_YOUR_SECRET')
->acceptJson()
->timeout(60)
->get($PANEL_URL.'/api/v1/stations/42')
->json();
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'API error');
}
$data = $answer['data'];
// Plain Guzzle:
// (new GuzzleHttp\Client)->request('GET', $PANEL_URL.'/api/v1/stations/42', [
// 'headers' => ['Authorization' => 'Bearer ack_xxxxxxxx_YOUR_SECRET', 'Accept' => 'application/json'],
// 'http_errors' => false,
// ]);
Node.js (fetch) Copy
const PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
const API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
const res = await fetch(`${PANEL_URL}/api/v1/stations/42`, {
method: 'GET',
headers: {
Authorization: `Bearer ${API_KEY}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
});
const answer = await res.json();
if (!answer.ok) throw new Error(answer.error || `HTTP ${res.status}`);
const data = answer.data;
Python (requests) Copy
import requests
PANEL_URL = 'https://panel.yourradio.com' # where you installed AnowCast
API_KEY = 'ack_xxxxxxxx_YOUR_SECRET'
res = requests.get(
f'{PANEL_URL}/api/v1/stations/42',
headers={'Authorization': f'Bearer {API_KEY}', 'Accept': 'application/json'},
timeout=60,
)
answer = res.json()
if not answer.get('ok'):
raise RuntimeError(answer.get('error') or f'HTTP {res.status_code}')
data = answer['data']
Answer · HTTP 200 Copy
{
"ok": true,
"data": {
"id": 42,
"name": "Sunrise FM",
"slug": "sunrise-fm",
"status": "active",
"suspended_reason": null,
"owner": {
"id": 17,
"name": "Priya Sharma",
"email": "priya@example.com"
},
"package": "pro-500",
"node": "Server 1",
"host": "panel.yourradio.com",
"port": 8010,
"source_port": 8011,
"max_listeners": 500,
"bitrate": 128,
"stream_url": "https://panel.yourradio.com:8010/live",
"mounts": [
"/live",
"/mobile"
],
"paid_until": "2027-01-01T00:00:00+05:30",
"panel_url": "https://panel.yourradio.com/radio/42"
}
}
Create a station
Creates the station on a server with room and, when the e-mail is new, its radio owner. owner_password is returned only when a new owner was made (and only in this answer). Store external_id to find your service again.
Scope: stations:write (+ clients:write for a new owner) · Success: HTTP 201
Field In Required Meaning
namebody yes Station name, up to 120 characters packagebody yes Package slug from GET /packages owner_emailbody yes Radio owner's e-mail (an existing owner of yours is reused) owner_namebody no Name of a new owner owner_passwordbody no Password of a new owner, 8 or more characters (otherwise one is made) genrebody no Genre, up to 60 characters paid_untilbody no Date the station is paid until (YYYY-MM-DD) external_idbody no Your own service / order id, up to 80 characters
cURL Copy
PANEL_URL='https://panel.yourradio.com'
API_KEY='ack_xxxxxxxx_YOUR_SECRET'
curl -X POST "$PANEL_URL/api/v1/stations" \
-H "Authorization: Bearer $API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"name":"Sunrise FM","package":"pro-500","owner_email":"priya@example.com","owner_name":"Priya Sharma","genre":"Tamil hits","paid_until":"2027-01-01","external_id":"whmcs-1234"}'
PHP (cURL) Copy
<?php
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
$ch = curl_init($PANEL_URL.'/api/v1/stations');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.$API_KEY,
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Sunrise FM',
'package' => 'pro-500',
'owner_email' => 'priya@example.com',
'owner_name' => 'Priya Sharma',
'genre' => 'Tamil hits',
'paid_until' => '2027-01-01',
'external_id' => 'whmcs-1234',
]),
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'HTTP '.$status);
}
$data = $answer['data'];
PHP (Guzzle / Laravel Http) Copy
use Illuminate\Support\Facades\Http;
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$answer = Http::withToken('ack_xxxxxxxx_YOUR_SECRET')
->acceptJson()
->timeout(60)
->post($PANEL_URL.'/api/v1/stations', [
'name' => 'Sunrise FM',
'package' => 'pro-500',
'owner_email' => 'priya@example.com',
'owner_name' => 'Priya Sharma',
'genre' => 'Tamil hits',
'paid_until' => '2027-01-01',
'external_id' => 'whmcs-1234',
])
->json();
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'API error');
}
$data = $answer['data'];
// Plain Guzzle:
// (new GuzzleHttp\Client)->request('POST', $PANEL_URL.'/api/v1/stations', [
// 'headers' => ['Authorization' => 'Bearer ack_xxxxxxxx_YOUR_SECRET', 'Accept' => 'application/json'],
// 'json' => [...the fields above...],
// 'http_errors' => false,
// ]);
Node.js (fetch) Copy
const PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
const API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
const res = await fetch(`${PANEL_URL}/api/v1/stations`, {
method: 'POST',
headers: {
Authorization: `Bearer ${API_KEY}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
name: "Sunrise FM",
package: "pro-500",
owner_email: "priya@example.com",
owner_name: "Priya Sharma",
genre: "Tamil hits",
paid_until: "2027-01-01",
external_id: "whmcs-1234",
}),
});
const answer = await res.json();
if (!answer.ok) throw new Error(answer.error || `HTTP ${res.status}`);
const data = answer.data;
Python (requests) Copy
import requests
PANEL_URL = 'https://panel.yourradio.com' # where you installed AnowCast
API_KEY = 'ack_xxxxxxxx_YOUR_SECRET'
res = requests.post(
f'{PANEL_URL}/api/v1/stations',
headers={'Authorization': f'Bearer {API_KEY}', 'Accept': 'application/json'},
json={
'name': "Sunrise FM",
'package': "pro-500",
'owner_email': "priya@example.com",
'owner_name': "Priya Sharma",
'genre': "Tamil hits",
'paid_until': "2027-01-01",
'external_id': "whmcs-1234",
},
timeout=60,
)
answer = res.json()
if not answer.get('ok'):
raise RuntimeError(answer.get('error') or f'HTTP {res.status_code}')
data = answer['data']
Request body (JSON) Copy
{
"name": "Sunrise FM",
"package": "pro-500",
"owner_email": "priya@example.com",
"owner_name": "Priya Sharma",
"genre": "Tamil hits",
"paid_until": "2027-01-01",
"external_id": "whmcs-1234"
}
Answer · HTTP 201 Copy
{
"ok": true,
"data": {
"id": 42,
"name": "Sunrise FM",
"slug": "sunrise-fm",
"status": "active",
"suspended_reason": null,
"owner": {
"id": 17,
"name": "Priya Sharma",
"email": "priya@example.com"
},
"package": "pro-500",
"node": "Server 1",
"host": "panel.yourradio.com",
"port": 8010,
"source_port": 8011,
"max_listeners": 500,
"bitrate": 128,
"stream_url": "https://panel.yourradio.com:8010/live",
"mounts": [
"/live",
"/mobile"
],
"paid_until": "2027-01-01T00:00:00+05:30",
"panel_url": "https://panel.yourradio.com/radio/42",
"owner_password": "k7Pq2mXr9TzW4n",
"setup_error": null
}
}
POST /api/v1/stations/42/suspend
Suspend
Stops the station and blocks its owner's panel. "for": "unpaid" marks it as an unpaid suspension.
Scope: stations:write · Success: HTTP 200
Field In Required Meaning
reasonbody no Shown to the owner, up to 200 characters forbody no unpaid or manual (default)
cURL Copy
PANEL_URL='https://panel.yourradio.com'
API_KEY='ack_xxxxxxxx_YOUR_SECRET'
curl -X POST "$PANEL_URL/api/v1/stations/42/suspend" \
-H "Authorization: Bearer $API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"reason":"Invoice #1234 is overdue","for":"unpaid"}'
PHP (cURL) Copy
<?php
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
$ch = curl_init($PANEL_URL.'/api/v1/stations/42/suspend');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.$API_KEY,
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'reason' => 'Invoice #1234 is overdue',
'for' => 'unpaid',
]),
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'HTTP '.$status);
}
$data = $answer['data'];
PHP (Guzzle / Laravel Http) Copy
use Illuminate\Support\Facades\Http;
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$answer = Http::withToken('ack_xxxxxxxx_YOUR_SECRET')
->acceptJson()
->timeout(60)
->post($PANEL_URL.'/api/v1/stations/42/suspend', [
'reason' => 'Invoice #1234 is overdue',
'for' => 'unpaid',
])
->json();
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'API error');
}
$data = $answer['data'];
// Plain Guzzle:
// (new GuzzleHttp\Client)->request('POST', $PANEL_URL.'/api/v1/stations/42/suspend', [
// 'headers' => ['Authorization' => 'Bearer ack_xxxxxxxx_YOUR_SECRET', 'Accept' => 'application/json'],
// 'json' => [...the fields above...],
// 'http_errors' => false,
// ]);
Node.js (fetch) Copy
const PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
const API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
const res = await fetch(`${PANEL_URL}/api/v1/stations/42/suspend`, {
method: 'POST',
headers: {
Authorization: `Bearer ${API_KEY}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
reason: "Invoice #1234 is overdue",
for: "unpaid",
}),
});
const answer = await res.json();
if (!answer.ok) throw new Error(answer.error || `HTTP ${res.status}`);
const data = answer.data;
Python (requests) Copy
import requests
PANEL_URL = 'https://panel.yourradio.com' # where you installed AnowCast
API_KEY = 'ack_xxxxxxxx_YOUR_SECRET'
res = requests.post(
f'{PANEL_URL}/api/v1/stations/42/suspend',
headers={'Authorization': f'Bearer {API_KEY}', 'Accept': 'application/json'},
json={
'reason': "Invoice #1234 is overdue",
'for': "unpaid",
},
timeout=60,
)
answer = res.json()
if not answer.get('ok'):
raise RuntimeError(answer.get('error') or f'HTTP {res.status_code}')
data = answer['data']
Request body (JSON) Copy
{
"reason": "Invoice #1234 is overdue",
"for": "unpaid"
}
Answer · HTTP 200 Copy
{
"ok": true,
"data": {
"status": "suspended",
"suspended_reason": "Invoice #1234 is overdue",
"id": 42,
"name": "Sunrise FM",
"slug": "sunrise-fm",
"owner": {
"id": 17,
"name": "Priya Sharma",
"email": "priya@example.com"
},
"package": "pro-500",
"node": "Server 1",
"host": "panel.yourradio.com",
"port": 8010,
"source_port": 8011,
"max_listeners": 500,
"bitrate": 128,
"stream_url": "https://panel.yourradio.com:8010/live",
"mounts": [
"/live",
"/mobile"
],
"paid_until": "2027-01-01T00:00:00+05:30",
"panel_url": "https://panel.yourradio.com/radio/42"
}
}
POST /api/v1/stations/42/unsuspend
Unsuspend
Starts the station again.
Scope: stations:write · Success: HTTP 200
cURL Copy
PANEL_URL='https://panel.yourradio.com'
API_KEY='ack_xxxxxxxx_YOUR_SECRET'
curl -X POST "$PANEL_URL/api/v1/stations/42/unsuspend" \
-H "Authorization: Bearer $API_KEY" \
-H 'Accept: application/json'
PHP (cURL) Copy
<?php
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
$ch = curl_init($PANEL_URL.'/api/v1/stations/42/unsuspend');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.$API_KEY,
'Accept: application/json',
'Content-Type: application/json',
],
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'HTTP '.$status);
}
$data = $answer['data'];
PHP (Guzzle / Laravel Http) Copy
use Illuminate\Support\Facades\Http;
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$answer = Http::withToken('ack_xxxxxxxx_YOUR_SECRET')
->acceptJson()
->timeout(60)
->post($PANEL_URL.'/api/v1/stations/42/unsuspend')
->json();
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'API error');
}
$data = $answer['data'];
// Plain Guzzle:
// (new GuzzleHttp\Client)->request('POST', $PANEL_URL.'/api/v1/stations/42/unsuspend', [
// 'headers' => ['Authorization' => 'Bearer ack_xxxxxxxx_YOUR_SECRET', 'Accept' => 'application/json'],
// 'http_errors' => false,
// ]);
Node.js (fetch) Copy
const PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
const API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
const res = await fetch(`${PANEL_URL}/api/v1/stations/42/unsuspend`, {
method: 'POST',
headers: {
Authorization: `Bearer ${API_KEY}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
});
const answer = await res.json();
if (!answer.ok) throw new Error(answer.error || `HTTP ${res.status}`);
const data = answer.data;
Python (requests) Copy
import requests
PANEL_URL = 'https://panel.yourradio.com' # where you installed AnowCast
API_KEY = 'ack_xxxxxxxx_YOUR_SECRET'
res = requests.post(
f'{PANEL_URL}/api/v1/stations/42/unsuspend',
headers={'Authorization': f'Bearer {API_KEY}', 'Accept': 'application/json'},
timeout=60,
)
answer = res.json()
if not answer.get('ok'):
raise RuntimeError(answer.get('error') or f'HTTP {res.status_code}')
data = answer['data']
Answer · HTTP 200 Copy
{
"ok": true,
"data": {
"id": 42,
"name": "Sunrise FM",
"slug": "sunrise-fm",
"status": "active",
"suspended_reason": null,
"owner": {
"id": 17,
"name": "Priya Sharma",
"email": "priya@example.com"
},
"package": "pro-500",
"node": "Server 1",
"host": "panel.yourradio.com",
"port": 8010,
"source_port": 8011,
"max_listeners": 500,
"bitrate": 128,
"stream_url": "https://panel.yourradio.com:8010/live",
"mounts": [
"/live",
"/mobile"
],
"paid_until": "2027-01-01T00:00:00+05:30",
"panel_url": "https://panel.yourradio.com/radio/42"
}
}
POST /api/v1/stations/42/package
Change package
Moves the station to another package of yours (listeners and bitrate follow the package).
Scope: stations:write · Success: HTTP 200
Field In Required Meaning
packagebody yes Package slug
cURL Copy
PANEL_URL='https://panel.yourradio.com'
API_KEY='ack_xxxxxxxx_YOUR_SECRET'
curl -X POST "$PANEL_URL/api/v1/stations/42/package" \
-H "Authorization: Bearer $API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"package":"pro-1000"}'
PHP (cURL) Copy
<?php
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
$ch = curl_init($PANEL_URL.'/api/v1/stations/42/package');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.$API_KEY,
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'package' => 'pro-1000',
]),
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'HTTP '.$status);
}
$data = $answer['data'];
PHP (Guzzle / Laravel Http) Copy
use Illuminate\Support\Facades\Http;
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$answer = Http::withToken('ack_xxxxxxxx_YOUR_SECRET')
->acceptJson()
->timeout(60)
->post($PANEL_URL.'/api/v1/stations/42/package', [
'package' => 'pro-1000',
])
->json();
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'API error');
}
$data = $answer['data'];
// Plain Guzzle:
// (new GuzzleHttp\Client)->request('POST', $PANEL_URL.'/api/v1/stations/42/package', [
// 'headers' => ['Authorization' => 'Bearer ack_xxxxxxxx_YOUR_SECRET', 'Accept' => 'application/json'],
// 'json' => [...the fields above...],
// 'http_errors' => false,
// ]);
Node.js (fetch) Copy
const PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
const API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
const res = await fetch(`${PANEL_URL}/api/v1/stations/42/package`, {
method: 'POST',
headers: {
Authorization: `Bearer ${API_KEY}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
package: "pro-1000",
}),
});
const answer = await res.json();
if (!answer.ok) throw new Error(answer.error || `HTTP ${res.status}`);
const data = answer.data;
Python (requests) Copy
import requests
PANEL_URL = 'https://panel.yourradio.com' # where you installed AnowCast
API_KEY = 'ack_xxxxxxxx_YOUR_SECRET'
res = requests.post(
f'{PANEL_URL}/api/v1/stations/42/package',
headers={'Authorization': f'Bearer {API_KEY}', 'Accept': 'application/json'},
json={
'package': "pro-1000",
},
timeout=60,
)
answer = res.json()
if not answer.get('ok'):
raise RuntimeError(answer.get('error') or f'HTTP {res.status_code}')
data = answer['data']
Request body (JSON) Copy
{
"package": "pro-1000"
}
Answer · HTTP 200 Copy
{
"ok": true,
"data": {
"package": "pro-1000",
"max_listeners": 1000,
"id": 42,
"name": "Sunrise FM",
"slug": "sunrise-fm",
"status": "active",
"suspended_reason": null,
"owner": {
"id": 17,
"name": "Priya Sharma",
"email": "priya@example.com"
},
"node": "Server 1",
"host": "panel.yourradio.com",
"port": 8010,
"source_port": 8011,
"bitrate": 128,
"stream_url": "https://panel.yourradio.com:8010/live",
"mounts": [
"/live",
"/mobile"
],
"paid_until": "2027-01-01T00:00:00+05:30",
"panel_url": "https://panel.yourradio.com/radio/42"
}
}
POST /api/v1/stations/42/password
Change the owner's password
Sets a new sign-in password for the radio owner and signs the owner out everywhere.
Scope: stations:write · Success: HTTP 200
Field In Required Meaning
passwordbody yes New password, at least 8 characters (or the panel's minimum)
cURL Copy
PANEL_URL='https://panel.yourradio.com'
API_KEY='ack_xxxxxxxx_YOUR_SECRET'
curl -X POST "$PANEL_URL/api/v1/stations/42/password" \
-H "Authorization: Bearer $API_KEY" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"password":"N3w-Secret-Pass"}'
PHP (cURL) Copy
<?php
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
$ch = curl_init($PANEL_URL.'/api/v1/stations/42/password');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.$API_KEY,
'Accept: application/json',
'Content-Type: application/json',
],
CURLOPT_POSTFIELDS => json_encode([
'password' => 'N3w-Secret-Pass',
]),
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'HTTP '.$status);
}
$data = $answer['data'];
PHP (Guzzle / Laravel Http) Copy
use Illuminate\Support\Facades\Http;
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$answer = Http::withToken('ack_xxxxxxxx_YOUR_SECRET')
->acceptJson()
->timeout(60)
->post($PANEL_URL.'/api/v1/stations/42/password', [
'password' => 'N3w-Secret-Pass',
])
->json();
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'API error');
}
$data = $answer['data'];
// Plain Guzzle:
// (new GuzzleHttp\Client)->request('POST', $PANEL_URL.'/api/v1/stations/42/password', [
// 'headers' => ['Authorization' => 'Bearer ack_xxxxxxxx_YOUR_SECRET', 'Accept' => 'application/json'],
// 'json' => [...the fields above...],
// 'http_errors' => false,
// ]);
Node.js (fetch) Copy
const PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
const API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
const res = await fetch(`${PANEL_URL}/api/v1/stations/42/password`, {
method: 'POST',
headers: {
Authorization: `Bearer ${API_KEY}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
body: JSON.stringify({
password: "N3w-Secret-Pass",
}),
});
const answer = await res.json();
if (!answer.ok) throw new Error(answer.error || `HTTP ${res.status}`);
const data = answer.data;
Python (requests) Copy
import requests
PANEL_URL = 'https://panel.yourradio.com' # where you installed AnowCast
API_KEY = 'ack_xxxxxxxx_YOUR_SECRET'
res = requests.post(
f'{PANEL_URL}/api/v1/stations/42/password',
headers={'Authorization': f'Bearer {API_KEY}', 'Accept': 'application/json'},
json={
'password': "N3w-Secret-Pass",
},
timeout=60,
)
answer = res.json()
if not answer.get('ok'):
raise RuntimeError(answer.get('error') or f'HTTP {res.status_code}')
data = answer['data']
Request body (JSON) Copy
{
"password": "N3w-Secret-Pass"
}
Answer · HTTP 200 Copy
{
"ok": true,
"data": {
"station": 42,
"owner": "priya@example.com"
}
}
DELETE /api/v1/stations/42
Delete a station
Removes the station with its music and statistics. This cannot be undone.
Scope: stations:write · Success: HTTP 200
cURL Copy
PANEL_URL='https://panel.yourradio.com'
API_KEY='ack_xxxxxxxx_YOUR_SECRET'
curl -X DELETE "$PANEL_URL/api/v1/stations/42" \
-H "Authorization: Bearer $API_KEY" \
-H 'Accept: application/json'
PHP (cURL) Copy
<?php
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
$ch = curl_init($PANEL_URL.'/api/v1/stations/42');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'DELETE',
CURLOPT_HTTPHEADER => [
'Authorization: Bearer '.$API_KEY,
'Accept: application/json',
'Content-Type: application/json',
],
]);
$answer = json_decode(curl_exec($ch), true);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'HTTP '.$status);
}
$data = $answer['data'];
PHP (Guzzle / Laravel Http) Copy
use Illuminate\Support\Facades\Http;
$PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
$answer = Http::withToken('ack_xxxxxxxx_YOUR_SECRET')
->acceptJson()
->timeout(60)
->delete($PANEL_URL.'/api/v1/stations/42')
->json();
if (! ($answer['ok'] ?? false)) {
throw new RuntimeException($answer['error'] ?? 'API error');
}
$data = $answer['data'];
// Plain Guzzle:
// (new GuzzleHttp\Client)->request('DELETE', $PANEL_URL.'/api/v1/stations/42', [
// 'headers' => ['Authorization' => 'Bearer ack_xxxxxxxx_YOUR_SECRET', 'Accept' => 'application/json'],
// 'http_errors' => false,
// ]);
Node.js (fetch) Copy
const PANEL_URL = 'https://panel.yourradio.com'; // where you installed AnowCast
const API_KEY = 'ack_xxxxxxxx_YOUR_SECRET';
const res = await fetch(`${PANEL_URL}/api/v1/stations/42`, {
method: 'DELETE',
headers: {
Authorization: `Bearer ${API_KEY}`,
Accept: 'application/json',
'Content-Type': 'application/json',
},
});
const answer = await res.json();
if (!answer.ok) throw new Error(answer.error || `HTTP ${res.status}`);
const data = answer.data;
Python (requests) Copy
import requests
PANEL_URL = 'https://panel.yourradio.com' # where you installed AnowCast
API_KEY = 'ack_xxxxxxxx_YOUR_SECRET'
res = requests.delete(
f'{PANEL_URL}/api/v1/stations/42',
headers={'Authorization': f'Bearer {API_KEY}', 'Accept': 'application/json'},
timeout=60,
)
answer = res.json()
if not answer.get('ok'):
raise RuntimeError(answer.get('error') or f'HTTP {res.status_code}')
data = answer['data']
Answer · HTTP 200 Copy
{
"ok": true,
"data": {
"deleted": 42
}
}