Customer API: automate mailboxes, databases, DNS and cron

For hosting customers · Updated 2026-10-29

On this page
  1. Before you start
  2. Basics
  3. Endpoints
  4. Examples
  5. Good to know

Each hosting account can be automated with its own API: deploy scripts, a CI pipeline or your own tools can create mailboxes, databases, DNS records and cron jobs without signing in to the control panel.

Before you start

  1. Log in to the control panel (https://<server>:2083).
  2. Open API tokens (section Advanced), enter a Name, click Create token and copy the token. See create an API token.

If you do not see API tokens, your plan does not include it, or you are signed in as a team member.

Basics

  • Base URL: https://<server>:2083/api/v1
  • Header: Authorization: Bearer YOUR_TOKEN
  • Body: JSON (Content-Type: application/json) or form fields.
  • Answers: {"status": 1, "data": …} or {"status": 0, "error": "…"}.
  • Only the tools of your plan work. Otherwise: 403 This tool is not included in your plan.
  • A suspended account gets 403 This account is suspended.
  • Invalid input gets 422 with the reason, for example You have reached your email accounts limit (10).

Endpoints

Method and pathWhat it doesBody
GET /meUsername, domain, package, disk used and limit, counts—
GET /me/domainsDomains with type and document_root—
GET /me/emailMailboxes with quota_mb and used_mb—
POST /me/emailCreate a mailboxaddress, password, quota_mb (default 1024)
POST /me/email/{address}/passwordChange a mailbox passwordpassword
POST /me/email/{address}/deleteDelete a mailbox—
GET /me/forwardersForwarders with id, source, destination—
POST /me/forwardersAdd a forwardersource, destination
POST /me/forwarders/{id}/deleteDelete a forwarder—
GET /me/databasesMySQL databases with size_mb—
POST /me/databasesCreate a database and a user of the same name with all privilegesname, password
POST /me/databases/{name}/deleteDelete a database and its user of the same name—
GET /me/dns/{domain}DNS records with id—
POST /me/dns/{domain}Add a DNS recordname, type, content, ttl, priority
POST /me/dns/{domain}/{id}/deleteDelete a DNS record—
GET /me/cronCron jobs with id—
POST /me/cronAdd a cron jobschedule, command
POST /me/cron/{id}/deleteDelete a cron job—
GET /me/sslCertificate status, issuer and expires_at per domain—

All paths start with /api/v1.

Examples

Account and usage:

curl -s -H "Authorization: Bearer $TOKEN" https://server1.example.com:2083/api/v1/me

Create a mailbox of 2 GB (quota_mb 0–102400):

curl -s -X POST https://server1.example.com:2083/api/v1/me/email \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"address":"[email protected]","password":"Mailb0x-Passw0rd!","quota_mb":2048}'
# {"status": 1, "data": {"address": "[email protected]"}}

Create a database and its user. The name gets your username in front:

curl -s -X POST https://server1.example.com:2083/api/v1/me/databases \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"name":"blog","password":"Db-Passw0rd!2026"}'
# {"status": 1, "data": {"database": "shop1_blog", "user": "shop1_blog", "host": "localhost"}}

Add a DNS record (types A, AAAA, CNAME, MX, TXT, NS, SRV, CAA; TTL 60–604800):

curl -s -X POST https://server1.example.com:2083/api/v1/me/dns/example.com \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"name":"api","type":"A","content":"203.0.113.10","ttl":3600}'
# {"status": 1, "data": {"id": 87}}

Add a cron job every 15 minutes:

curl -s -X POST https://server1.example.com:2083/api/v1/me/cron \
  -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  -d '{"schedule":"*/15 * * * *","command":"/usr/bin/php ~/public_html/cron.php"}'

Delete a forwarder (the id comes from GET /me/forwarders):

curl -s -X POST -H "Authorization: Bearer $TOKEN" \
  https://server1.example.com:2083/api/v1/me/forwarders/42/delete
# {"status": 1, "data": {"deleted": true}}

Good to know

  • Database names: lowercase letters, digits and _, up to 32 characters before your username prefix.
  • Mailbox and database passwords follow the same rule as account passwords: 8+ characters with 3 of lowercase, uppercase, digits, symbols.
  • The plan's limits apply as in the control panel.
Was this article helpful?

Still stuck?

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