REST API overview: authentication, requests and responses

For server administrators · Updated 2026-10-29

On this page
  1. Base URL
  2. Authentication
  3. Requests
  4. Responses
  5. Endpoints for administrators and resellers
  6. A first request
  7. Good to know

The server has a JSON API for your own scripts and integrations. Administrators and resellers use it to create and manage hosting accounts; each hosting customer can use their own part of it (customer API) for mailboxes, databases, DNS and cron jobs.

Base URL

https://<server>:2087/api/v1

Use the server's hostname so the certificate matches. Customer endpoints are under https://<server>:2083/api/v1/me.

Authentication

Every request sends an API token in the Authorization header:

Authorization: Bearer YOUR_TOKEN

Create the token in the admin panel under API Tokens (section Account). See create an API token. There are no cookies or sessions.

Requests

  • Read with GET, change with POST. There are no PUT or DELETE requests.
  • Send the body as JSON (Content-Type: application/json) or as form fields (application/x-www-form-urlencoded). Both work the same.

Responses

Every answer is JSON with an envelope:

{"status": 1, "data": { ... }}

On failure:

{"status": 0, "error": "Package not found."}
HTTP statusMeaning
200Success, status is 1.
401No token, a wrong or expired token, or a token not allowed from your address. error says which.
403Your IP is blocked after failed attempts, a read-only token tried to change something, or a reseller lacks the privilege.
422The request was understood but refused, for example an invalid username. error explains why.

Endpoints for administrators and resellers

Method and pathWhat it doesBody
GET /api/v1/accountsList accounts (optional ?search=)—
POST /api/v1/accountsCreate an accountusername, domain, email, password, package
GET /api/v1/accounts/{username}One account—
POST /api/v1/accounts/{username}/suspendSuspendreason (optional)
POST /api/v1/accounts/{username}/unsuspendUnsuspend—
POST /api/v1/accounts/{username}/passwordChange the passwordpassword
POST /api/v1/accounts/{username}/packageChange the packagepackage
POST /api/v1/accounts/{username}/terminateDelete the account for good—
POST /api/v1/accounts/{username}/loginOne-time sign-in link (60 seconds)—
GET /api/v1/packagesList packages—
GET /api/v1/jobs/{id}Status of a server task—
GET /api/v1/server/statusLoad, memory, disk, services, version (administrators only)—

POST /api/v1/dns/secondary is used between servers of a DNS cluster; you do not call it yourself.

A first request

curl -s -H "Authorization: Bearer $TOKEN" \
  https://server1.example.com:2087/api/v1/packages

Good to know

  • A reseller's token sees and changes only the reseller's own accounts and packages, within the reseller's privileges.
  • Wrong tokens count as failed logins: too many from one address block it. See API errors.
  • To be told when something happens instead of asking, use webhooks.
Was this article helpful?

Still stuck?

Ask the AI about your exact situation — it answers from this knowledge base — or contact us.