API Documentation
Customer API and reseller API documentation
Client API Documentation
Manage your own SIP accounts, balance, vouchers, tariff plan, Caller ID, call history, refill history and account password through a clean JSON API.
Authorization
Every request must include your API key in the HTTP header.
X-API-Key: YOUR_API_KEY
Account status
curl -k -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/client-api/index.php?endpoint=me"
{
"success": true,
"data": {
"id": 1001,
"username": "1234567801",
"balance": "1.0000",
"active": 1,
"id_plan": 101,
"plan_name": "STANDARD-PLAN"
}
}
Balance
curl -k -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/client-api/index.php?endpoint=balance"
Available plans
Returns only tariff plans available to your account.
curl -k -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/client-api/index.php?endpoint=plans"
Change plan
Change your tariff plan to one of the available plans.
curl -k -sS \
-X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id_plan":8}' \
"https://magnusbilling.net/client-api/index.php?endpoint=change-plan"
SIP accounts
List your SIP accounts, including SIP login and SIP password.
curl -k -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/client-api/index.php?endpoint=sip"
Create additional SIP account
Create an additional SIP account under your own account.
curl -k -sS \
-X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
"https://magnusbilling.net/client-api/index.php?endpoint=create-sip"
You can also provide your own SIP password:
{
"password": "StrongSipPass123"
}
Change SIP password
curl -k -sS \
-X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"1234567802","password":"NewSipPass456"}' \
"https://magnusbilling.net/client-api/index.php?endpoint=update-sip-password"
Delete SIP account
curl -k -sS \
-X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"1234567802"}' \
"https://magnusbilling.net/client-api/index.php?endpoint=delete-sip"
IP Authentication
Manage IP-based SIP authentication for your own SIP accounts. Your regular SIP login/password continues working.
List IP authorizations
List your SIP accounts and active/inactive IP-auth records.
curl -k -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/client-api/index.php?endpoint=ip-auth-list"
Create IP authorization
Add a public static PBX IP address to one of your SIP accounts.
curl -k -sS \
-X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"sip_login":"1234567801","ip":"203.0.113.10"}' \
"https://magnusbilling.net/client-api/index.php?endpoint=ip-auth-create"
{
"success": true,
"message": "IP authentication created",
"data": {
"id": 6,
"sip_login": "1234567801",
"peer_name": "1234567801_ipa1",
"ip": "203.0.113.10",
"port": 5060,
"status": 1
}
}
Disable IP authorization
The IP-auth record stays in your account but becomes inactive. The SIP peer is removed from Asterisk.
curl -k -sS \
-X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id":6}' \
"https://magnusbilling.net/client-api/index.php?endpoint=ip-auth-disable"
Enable IP authorization
Re-enable a previously disabled IP-auth record.
curl -k -sS \
-X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id":6}' \
"https://magnusbilling.net/client-api/index.php?endpoint=ip-auth-enable"
Delete IP authorization
Delete the IP-auth record permanently.
curl -k -sS \
-X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"id":6}' \
"https://magnusbilling.net/client-api/index.php?endpoint=ip-auth-delete"
Caller ID
curl -k -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/client-api/index.php?endpoint=callerids"
Add Caller ID
curl -k -sS \
-X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"cid":"+1234567890","name":"Main Caller ID","set_active":true}' \
"https://magnusbilling.net/client-api/index.php?endpoint=add-callerid"
Set existing Caller ID as active
{
"cid": "+1234567890"
}
Delete Caller ID
{
"id": 80
}
Clear active SIP Caller ID
curl -k -sS \
-X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{}' \
"https://magnusbilling.net/client-api/index.php?endpoint=clear-callerid"
Call history
curl -k -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/client-api/index.php?endpoint=calls&limit=50&offset=0"
Refill history
curl -k -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/client-api/index.php?endpoint=refills&limit=50&offset=0"
Redeem voucher
Redeem an existing voucher code and add its value to your balance.
curl -k -sS \
-X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"voucher":"123456"}' \
"https://magnusbilling.net/client-api/index.php?endpoint=redeem-voucher"
Change account password
curl -k -sS \
-X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"current_password":"OldPassword","new_password":"NewPassword987"}' \
"https://magnusbilling.net/client-api/index.php?endpoint=change-password"
SMS API / CryptoSMS
Send SMS from your MagnusBilling account using the same X-API-Key. SMS is billed from your account balance.
Authorization
Use the same API key that you already use for Client API or Reseller API.
X-API-Key: YOUR_API_KEY
Sender ID / Caller ID is not guaranteed. The displayed sender depends on the selected provider, destination country and mobile operator rules.
SMS fee is charged for the sending attempt. Final delivery depends on the destination mobile operator.
Endpoints
- GET
?endpoint=providers— List providers - GET
?endpoint=rates— SMS tariffs - GET
?endpoint=quota&provider=cryptosms— SMS balance estimate - POST
?endpoint=send— Send SMS - POST
?endpoint=schedule— Schedule SMS - GET
?endpoint=scheduled&limit=20— Scheduled SMS list - POST
?endpoint=cancel-scheduled— Cancel scheduled SMS - POST
?endpoint=bulk— Bulk SMS campaign - GET
?endpoint=campaigns&limit=20— Bulk campaign list - POST
?endpoint=cancel-campaign— Cancel bulk campaign - GET
?endpoint=status&id=SMS_ID— Check SMS status - GET
?endpoint=history&limit=20— SMS history
Send SMS
curl -k -sS \
-X POST "https://magnusbilling.net/sms-api/index.php?endpoint=send" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "+447575396991",
"provider": "cryptosms",
"sender_id": "MyBrand",
"message": "MyBrand: Your code is 123456"
}'
{
"success": true,
"sms_id": 1,
"provider": "cryptosms",
"provider_name": "CryptoSMS",
"status": "SENT_TO_PROVIDER",
"balance_after": "49.6500",
"sender_id": {
"requested": "MyBrand",
"guaranteed": false,
"warning": "Sender ID / Caller ID is not guaranteed."
}
}
Schedule SMS
curl -k -sS \
-X POST "https://magnusbilling.net/sms-api/index.php?endpoint=schedule" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"phone": "+1234567890",
"provider": "cryptosms",
"sender_id": "MyBrand",
"message": "API scheduled test",
"scheduled_at": "2026-05-09 23:00:00"
}'
{
"success": true,
"scheduled_sms_id": 10,
"provider": "cryptosms",
"status": "SCHEDULED",
"server_utc_offset": "+03:00"
}
Cancel scheduled SMS
curl -k -sS \
-X POST "https://magnusbilling.net/sms-api/index.php?endpoint=cancel-scheduled" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"scheduled_sms_id":10}'
Bulk SMS campaign
curl -k -sS \
-X POST "https://magnusbilling.net/sms-api/index.php?endpoint=bulk" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "cryptosms",
"sender_id": "MyBrand",
"message": "API bulk test",
"scheduled_at": "2026-05-09 23:00:00",
"phones": ["+1234567890", "+1234567891"]
}'
{
"success": true,
"campaign_id": 20,
"recipients_queued": 2,
"status": "QUEUED"
}
Bulk campaign list
curl -k -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/sms-api/index.php?endpoint=campaigns&limit=20"
Cancel bulk campaign
curl -k -sS \
-X POST "https://magnusbilling.net/sms-api/index.php?endpoint=cancel-campaign" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"campaign_id":20}'
Check SMS status
curl -k -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/sms-api/index.php?endpoint=status&id=1"
SMS history
curl -k -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/sms-api/index.php?endpoint=history&limit=20"
eSIM API / Global data packages
Sell eSIM data packages from your MagnusBilling.net account using the same X-API-Key. Prices are charged from the account balance.
Authorization
Use the same API key that is already used for Client API or Reseller API.
Endpoints
- GET
?endpoint=packages&q=Europe&limit=20— List packages and current prices - GET
?endpoint=coverage&package_code=PACKAGE_CODE— Package coverage by country and network - GET
?endpoint=balance— Account balance - POST
?endpoint=buy— Buy eSIM package - GET
?endpoint=orders— Order history, QR/activation data and usage - GET
?endpoint=sync-order&order_id=ORDER_ID— Refresh order, QR and data usage
List packages
curl -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/esim-api/index.php?endpoint=packages&q=Europe&limit=5"
Buy eSIM
curl -sS -X POST "https://magnusbilling.net/esim-api/index.php?endpoint=buy" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-d '{"package_code":"P2CYMUS93"}'
Orders and usage
curl -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/esim-api/index.php?endpoint=orders"
Security rules
- The client can access only their own account.
- The client can access only their own SIP accounts.
- The client can manage IP authentication only for their own SIP accounts.
- The client can add, change and delete only their own Caller IDs.
- The client can choose tariff plan only from the available plan list.
- The client cannot create, edit or delete tariff plans.
- The client can redeem only existing voucher codes.
- The client cannot delete the main SIP account.
- The client cannot manage other clients, resellers or admin data.
Reseller API Documentation
Create SIP clients, manage balances, view reseller plans, check client status, and control customers through a clean JSON API.
Authorization
Every request must include your API key in the HTTP header.
X-API-Key: YOUR_API_KEY
Account status
curl -k -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/reseller-api/index.php?endpoint=me"
{
"ok": true,
"reseller": {
"id": 1001,
"username": "1234567890",
"group": "Agent",
"balance": 1,
"active": true
}
}
Plans
curl -k -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/reseller-api/index.php?endpoint=plans"
{
"ok": true,
"plans": [
{
"id": 33,
"name": "TEST-RESELLER-PLAN",
"signup": true,
"initial_credit": 0,
"tariff_limit": 3,
"agent_rates": 66875
}
]
}
Create client
Create a new SIP client under your reseller account.
curl -k -sS \
-X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"plan_id":101}' \
"https://magnusbilling.net/reseller-api/index.php?endpoint=create-client"
You can also provide your own login and password:
{
"login": "1234567891",
"password": "StrongPass123",
"plan_id": 101
}
Get client
curl -k -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/reseller-api/index.php?endpoint=client&login=1234567892"
Client list
curl -k -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/reseller-api/index.php?endpoint=clients&limit=10&offset=0"
True reseller billing model
The transfer endpoint grants retail credit to the reseller’s own client. It does not debit the reseller immediately.
By default, reseller client rates are created with a +20% markup. The reseller can change the markup and retail prices for their own clients.
When the client places calls, the client balance is charged at the reseller/client retail rate, and the reseller balance is charged at the wholesale rate.
If the reseller’s wholesale balance is exhausted or is not enough for the minimum billing block, reseller clients cannot place calls even if they still have retail credit.
Grant retail credit
Grant retail credit to one of the reseller’s own clients. This does not debit the reseller immediately; the reseller wholesale balance is charged only when the client places calls.
curl -k -sS \
-X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"login":"1234567892","amount":1,"external_id":"ORDER-DEMO-10001"}' \
"https://magnusbilling.net/reseller-api/index.php?endpoint=transfer"
Transactions
curl -k -sS \
-H "X-API-Key: YOUR_API_KEY" \
"https://magnusbilling.net/reseller-api/index.php?endpoint=transactions&limit=10&offset=0"
Filter only successful transactions:
https://magnusbilling.net/reseller-api/index.php?endpoint=transactions&status=success&limit=10&offset=0
Set client status
Deactivate client:
curl -k -sS \
-X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"login":"1234567892","active":false}' \
"https://magnusbilling.net/reseller-api/index.php?endpoint=set-client-status"
Activate client:
{
"login": "1234567892",
"active": true
}
Change client plan
curl -k -sS \
-X POST \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"login":"1234567892","plan_id":101}' \
"https://magnusbilling.net/reseller-api/index.php?endpoint=change-plan"
White-label Agent Portal API
Endpoints for agent-hosted PHP portals: client login, dashboard, SIP, calls, payments, tariffs, markup control and Web Phone token flow.
Client portal endpoints
- GET
?endpoint=portal-bootstrap— Installer/API connection check - POST
?endpoint=client-auth— Client login for the agent portal - GET
?endpoint=client-dashboard&login=CLIENT_LOGIN— Client dashboard and visible balance - GET
?endpoint=client-sip&login=CLIENT_LOGIN— Client SIP accounts; service accounts are hidden by default - GET
?endpoint=client-calls&login=CLIENT_LOGIN&limit=50— Successful calls - GET
?endpoint=client-failed-calls&login=CLIENT_LOGIN&limit=50— Failed calls - GET
?endpoint=client-refills&login=CLIENT_LOGIN&limit=50— Client refill history - GET
?endpoint=client-callerids&login=CLIENT_LOGIN— Client Caller ID list - GET
?endpoint=client-rates&login=CLIENT_LOGIN&limit=100— Client retail rates
Payment/top-up endpoint
Client payments are received by the agent portal through Plisio, Heleket or custom methods. After confirmation, the portal calls register-agent-payment. This credits the client and does not immediately debit the reseller balance; reseller balance is charged later when calls are placed.
curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=register-agent-payment" \
-H "X-API-Key: YOUR_RESELLER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"login": "CLIENT_LOGIN",
"amount": "20.00",
"currency": "EUR",
"provider": "plisio",
"external_id": "plisio_order_123",
"provider_txid": "tx_or_invoice_id",
"status": "paid"
}'
Tariff markup endpoints
set-agent-markup uses the reseller existing retail plan when one already exists. If the requested markup is already applied, rate rows are not rewritten.
- GET
?endpoint=agent-markup— Current agent markup and retail tariff - POST
?endpoint=preview-agent-markup— Preview prices for a new markup - POST
?endpoint=set-agent-markup— Apply a new markup to the agent retail tariff
curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=set-agent-markup" \
-H "X-API-Key: YOUR_RESELLER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"markup_percent":50}'
Janus Web Phone token
The portal should show a Web Phone button. Service SIP accounts such as _web1 are used internally by Janus and are not shown in the normal SIP list unless include_service=1 is requested.
curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=client-softphone-token" \
-H "X-API-Key: YOUR_RESELLER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"login":"CLIENT_LOGIN"}'
Reseller SMS API / CryptoSMS
Resellers can send SMS for their own clients using the same Reseller X-API-Key. The client_login parameter is required for reseller API keys.
Available endpoints
- POST
?endpoint=send— Send one SMS - POST
?endpoint=schedule— Schedule one SMS - GET
?endpoint=scheduled&client_login=CLIENT_LOGIN&limit=20— List scheduled SMS - POST
?endpoint=cancel-scheduled— Cancel scheduled SMS - POST
?endpoint=bulk— Create bulk SMS campaign - GET
?endpoint=campaigns&client_login=CLIENT_LOGIN&limit=20— List bulk campaigns - POST
?endpoint=cancel-campaign— Cancel bulk campaign - GET
?endpoint=quota&provider=cryptosms&client_login=CLIENT_LOGIN— SMS balance estimate for a client - GET
?endpoint=history&client_login=CLIENT_LOGIN&limit=20— SMS history for a client - GET
?endpoint=status&id=SMS_ID&client_login=CLIENT_LOGIN— Check SMS status for a client
Example: send SMS for your client
curl -sS -X POST "https://magnusbilling.net/sms-api/index.php?endpoint=send" \
-H "X-API-Key: YOUR_RESELLER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"client_login": "CLIENT_LOGIN",
"phone": "+1234567890",
"message": "Your SMS text",
"provider": "cryptosms",
"sender_id": "MyBrand"
}'
Example: bulk SMS campaign
curl -sS -X POST "https://magnusbilling.net/sms-api/index.php?endpoint=bulk" \
-H "X-API-Key: YOUR_RESELLER_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"client_login": "CLIENT_LOGIN",
"phones": ["+1234567890", "+1234567891"],
"message": "Bulk SMS text",
"provider": "cryptosms",
"sender_id": "MyBrand",
"scheduled_at": "2026-05-10 16:30:00"
}'
Reseller eSIM API
Resellers can sell eSIM data packages using the same reseller X-API-Key. eSIM purchases are charged from the reseller account balance.
Available endpoints
- GET
?endpoint=packages&q=Europe&limit=20— List eSIM packages and current reseller prices - GET
?endpoint=coverage&package_code=PACKAGE_CODE— Show countries and networks included in a package - GET
?endpoint=balance— Check reseller account balance - POST
?endpoint=buy— Buy an eSIM package - GET
?endpoint=orders— View reseller eSIM orders, activation data and usage - GET
?endpoint=sync-order&order_id=ORDER_ID— Refresh activation details and remaining data
List eSIM packages
curl -sS \
-H "X-API-Key: YOUR_RESELLER_API_KEY" \
"https://magnusbilling.net/esim-api/index.php?endpoint=packages&q=Europe&limit=5"
Buy eSIM package
curl -sS -X POST "https://magnusbilling.net/esim-api/index.php?endpoint=buy" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_RESELLER_API_KEY" \
-d '{"package_code":"P2CYMUS93"}'
Check reseller eSIM orders and usage
curl -sS \
-H "X-API-Key: YOUR_RESELLER_API_KEY" \
"https://magnusbilling.net/esim-api/index.php?endpoint=orders"
The order response includes package name, price, status, ICCID, activation details, total data, used data, remaining data and expiry time when available. Data usage can update with a short delay from the mobile network.
Security rules
- The reseller can access only clients created under their Agent account.
- The reseller can use only their own plans.
- The reseller cannot access admin clients or other resellers' clients.
- The reseller can grant retail credit only to their own clients. Client calls still require available reseller wholesale balance.
- SIP passwords are returned only once during client creation.
- Existing SIP passwords and secrets are not returned by client endpoints.
- White-label portal clients must never see reseller balance, wholesale rates, markup percentage or internal reseller credit logic.
- Service SIP accounts such as _webN and _ipaN are hidden from normal client SIP lists; Web Phone must use client-softphone-token.
Agent Portal account management API
Additional endpoints for white-label agent portals: password reset, SIP password reset and client profile update.
Endpoints
- GET/POST
?endpoint=check-client-login- Check whether a login exists or is available - POST
?endpoint=reset-client-password- Generate a new temporary client login password - POST
?endpoint=set-client-password- Set a client login password chosen by the portal or admin - POST
?endpoint=client-change-password- Change client login password after verifying the current password - POST
?endpoint=reset-client-sip-password- Generate a new temporary SIP password for a normal SIP account - POST
?endpoint=client-profile-update- Update client profile fields: name, email, phone and language
curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=reset-client-password" \
-H "X-API-Key: YOUR_RESELLER_API_KEY" \
-H "Content-Type: application/json" \
--data '{"login":"6307210"}'
curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=reset-client-sip-password" \
-H "X-API-Key: YOUR_RESELLER_API_KEY" \
-H "Content-Type: application/json" \
--data '{"login":"6307210"}'
curl -sS -X POST "https://magnusbilling.net/reseller-api/index.php?endpoint=client-profile-update" \
-H "X-API-Key: YOUR_RESELLER_API_KEY" \
-H "Content-Type: application/json" \
--data '{"login":"6307210","email":"client@example.com","phone":"+123456789","language":"en"}'
Service accounts such as _webN and _ipaN are excluded from SIP password reset.