Overview
Manage BytePanel servers from a billing system or your own tools.
The billing API, also called the application API, is how WHMCS, Blesta, Paymenter and BytePay create and manage servers. You can use it to connect any other system.
Base URL
Every endpoint is under /api/application on your panel:
https://panel.example.com/api/applicationThe full URL is shown under Admin → Settings → Billing.
Authentication
Generate an API key on the same settings page. Keys start with bpnl_ and are shown once, so store yours somewhere safe. Send it as a bearer token:
curl https://panel.example.com/api/application/catalog \
-H "Authorization: Bearer bpnl_..."There's one key per panel. Generating a new key replaces the old one straight away.
External IDs
Your system chooses each server's externalId when it creates the server, usually its own service or order ID, such as whmcs-1042. Every other endpoint finds the server by that ID, so you never need to store BytePanel's IDs.
Requests and responses
Send JSON with Content-Type: application/json. Responses are JSON, apart from 204 No Content on delete.
Most server endpoints return a server object.
Errors
Errors return a JSON body with an error message:
{ "error": "Server not found" }| Status | Meaning |
|---|---|
400 | The body isn't valid JSON. |
401 | The API key is missing or wrong. |
403 | A sign-in link was requested for a staff account. |
404 | No server has that externalId. |
422 | The request was understood but can't be done, for example a game that needs a bigger plan. Invalid bodies also include an issues array. |
502 | The node rejected the request or couldn't be reached. |
Retries
Creating a server again with the same externalId returns the existing server, and deleting a server that's already gone returns 204. Your system can safely retry any request that failed or timed out.
Endpoints
| Method | Path | |
|---|---|---|
GET | /catalog | List plans, games and locations |
POST | /servers | Create a server |
GET | /servers/{externalId} | Get a server |
PATCH | /servers/{externalId} | Change plan |
POST | /servers/{externalId}/suspend | Suspend |
DELETE | /servers/{externalId}/suspend | Unsuspend |
DELETE | /servers/{externalId} | Delete a server |
POST | /servers/{externalId}/login | Create a sign-in link |