Radio hosting control panelICECAST • SHOUTCAST • AUTODJ
INR
Sign in Get AnowCast
API

Billing & Reseller API

Connect your billing system, website or scripts to your AnowCast panel: create, suspend, unsuspend and delete stations, change packages and passwords. The WHMCS module uses this same API.

API keys

  1. Server owner: Admin › Billing & API › REST API › New key.
  2. Reseller: Reseller › Billing › API keys › New key (when the reseller package allows the API).
  3. Tick only the scopes you need: stations:read, stations:write, packages:read, clients:write (create new radio owners).
  4. Optional for admin keys: allowed IP addresses, one per line – calls from other addresses are refused.
  5. 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

HTTPMeaning
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.

GET/api/v1/ping

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
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'
Answer · HTTP 200
{
    "ok": true,
    "data": {
        "version": "1.0.0",
        "account": "My Radio Host",
        "time": "2026-12-01T10:15:00+05:30"
    }
}
GET/api/v1/packages

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
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'
Answer · HTTP 200
{
    "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

FieldInRequiredMeaning
owner_emailquerynoOnly the stations of this radio owner
per_pagequeryno1–200, default 50
pagequerynoPage number
cURL
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'
Answer · HTTP 200
{
    "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
    }
}
GET/api/v1/stations/42

Read one station

Status, owner, package, server, ports, stream address and the panel link of one station.

Scope: stations:read · Success: HTTP 200

cURL
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'
Answer · HTTP 200
{
    "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

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

FieldInRequiredMeaning
namebodyyesStation name, up to 120 characters
packagebodyyesPackage slug from GET /packages
owner_emailbodyyesRadio owner's e-mail (an existing owner of yours is reused)
owner_namebodynoName of a new owner
owner_passwordbodynoPassword of a new owner, 8 or more characters (otherwise one is made)
genrebodynoGenre, up to 60 characters
paid_untilbodynoDate the station is paid until (YYYY-MM-DD)
external_idbodynoYour own service / order id, up to 80 characters
cURL
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"}'
Request body (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"
}
Answer · HTTP 201
{
    "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

FieldInRequiredMeaning
reasonbodynoShown to the owner, up to 200 characters
forbodynounpaid or manual (default)
cURL
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"}'
Request body (JSON)
{
    "reason": "Invoice #1234 is overdue",
    "for": "unpaid"
}
Answer · HTTP 200
{
    "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
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'
Answer · HTTP 200
{
    "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

FieldInRequiredMeaning
packagebodyyesPackage slug
cURL
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"}'
Request body (JSON)
{
    "package": "pro-1000"
}
Answer · HTTP 200
{
    "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

FieldInRequiredMeaning
passwordbodyyesNew password, at least 8 characters (or the panel's minimum)
cURL
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"}'
Request body (JSON)
{
    "password": "N3w-Secret-Pass"
}
Answer · HTTP 200
{
    "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
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'
Answer · HTTP 200
{
    "ok": true,
    "data": {
        "deleted": 42
    }
}
Free download

WHMCS modulev1.0.0

Sell radio hosting from your WHMCS: stations are created, suspended, unsuspended and removed automatically, with package changes, password resets and the panel link in the client area.

  1. Upload the folder modules/servers/anowcast to your WHMCS folder.
  2. In your AnowCast panel create a REST API key (Admin › Billing & API) with the scopes stations:read, stations:write, clients:write and packages:read.
  3. In WHMCS add a server: module AnowCast, hostname = your panel address, password = the API key, Secure ticked.
  4. Create a product, choose the AnowCast module and enter the panel package address (slug) under Module Settings.

Building your own integration? Read the Billing & Reseller API.

Download the WHMCS module (3 KB · zip)