Docs

API reference

Connect billing systems and scripts to intoPanel with scoped API tokens.

Tokens#

Create tokens in the admin area under Developer Tools → API Tokens. Each token has:

  • a name, such as "Billing system";
  • an optional list of addresses it may be used from, such as 203.0.113.5, 203.0.113.0/24;
  • a scope: Everything, Create and manage accounts, but not delete them, or Read only;
  • an optional last day it works.

A token starts with ipt_ and is shown only once: only a fingerprint of it is stored. A server can have up to 50 tokens. Repeated calls with a wrong token from one address are blocked for a while.

Calling the API#

  • Send the token in the Authorization header: Authorization: Bearer ipt_your_token.
  • Addresses start with https://your-server:7447/api/v1/.
  • POST data is a JSON object of strings.
  • Every answer is a JSON object: "ok": true with the result, or "ok": false with "error" saying why.
StatusMeaning
401Missing, wrong or expired token
403The token's scope does not allow the call
422The call was refused; error says why
429Too many failed attempts
curl -s -H "Authorization: Bearer ipt_your_token" https://panel.example.com:7447/api/v1/accounts

The admin area's API Documentation page describes every call with its fields and a ready-made curl example, and can download the description as an OpenAPI 3 file.

Endpoints#

Reading (scope: read)#

CallReturns
GET /api/v1/systemThe server's name, software versions and load
GET /api/v1/packagesAll packages with their limits
GET /api/v1/accountsAll hosting accounts; ?q=text searches by username or domain
GET /api/v1/accounts/{username}One account: package, suspension, disk and data transfer used
GET /api/v1/list_account_enhancementsAll add-on features with the accounts that have each
GET /api/v1/accounts/{username}/enhancementsThe add-on features, marked with whether this account has them

Managing (scope: manage)#

CallDoes
POST /api/v1/accountsCreates an account: username, domain, password required; package, email optional
POST /api/v1/accounts/{username}/suspendSuspends an account; optional reason
POST /api/v1/accounts/{username}/unsuspendRestores a suspended account
POST /api/v1/accounts/{username}/packageMoves the account to package
POST /api/v1/accounts/{username}/passwordSets a new panel password
POST /api/v1/accounts/{username}/modifyaccountChanges package and enhancements (comma-separated IDs)
POST /api/v1/assign_account_enhancementGives an add-on feature: user, id
POST /api/v1/unassign_account_enhancementTakes an add-on feature away: user, id

Deleting (scope: everything)#

CallDoes
DELETE /api/v1/accounts/{username}Deletes an account with its websites, mail and databases. This cannot be undone.

Example: create an account#

curl -s -X POST https://panel.example.com:7447/api/v1/accounts \
  -H "Authorization: Bearer ipt_your_token" \
  -H "Content-Type: application/json" \
  -d '{"username":"shop1","domain":"shop1.example.com","password":"a-long-random-password","package":"Business"}'

Frequently asked questions

Is there a module for my billing system?

Billing systems connect through this API with a token of their own. Ask in the community or write to sales@intopanel.com about ready-made modules for your billing system.

Can a token be limited to one IP address?

Yes. Enter the addresses or networks it may be used from when you create it.

Can I see when a token was last used?

Yes. The token list shows when each token was last used and from which address.