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
Authorizationheader: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": truewith the result, or"ok": falsewith"error"saying why.
| Status | Meaning |
|---|---|
| 401 | Missing, wrong or expired token |
| 403 | The token's scope does not allow the call |
| 422 | The call was refused; error says why |
| 429 | Too many failed attempts |
curl -s -H "Authorization: Bearer ipt_your_token" https://panel.example.com:7447/api/v1/accountsThe 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)#
| Call | Returns |
|---|---|
GET /api/v1/system | The server's name, software versions and load |
GET /api/v1/packages | All packages with their limits |
GET /api/v1/accounts | All 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_enhancements | All add-on features with the accounts that have each |
GET /api/v1/accounts/{username}/enhancements | The add-on features, marked with whether this account has them |
Managing (scope: manage)#
| Call | Does |
|---|---|
POST /api/v1/accounts | Creates an account: username, domain, password required; package, email optional |
POST /api/v1/accounts/{username}/suspend | Suspends an account; optional reason |
POST /api/v1/accounts/{username}/unsuspend | Restores a suspended account |
POST /api/v1/accounts/{username}/package | Moves the account to package |
POST /api/v1/accounts/{username}/password | Sets a new panel password |
POST /api/v1/accounts/{username}/modifyaccount | Changes package and enhancements (comma-separated IDs) |
POST /api/v1/assign_account_enhancement | Gives an add-on feature: user, id |
POST /api/v1/unassign_account_enhancement | Takes an add-on feature away: user, id |
Deleting (scope: everything)#
| Call | Does |
|---|---|
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.