<developers/>

StackRegent REST API reference

Base URL, authentication, request and error format, paging and tasks, followed by every endpoint the panel registers, grouped by area, with the kind of key that may call it.

Last changed 13 Nov 2026

Base URL and transport#

The StackRegent REST API is served by the panel itself:

https://SERVER:9443/api/

SERVER is the panel's host name or IP address. 9443 is the default HTTPS port; if it was changed at install time (-HttpsPort) or later with stackregent panel-port, use that port. The panel's HTTP port (9080 by default) only redirects to HTTPS, so always call the HTTPS address. The Examples card on Tools & Settings › Remote API (REST), and on Account › API Keys for resellers and customers, shows the base address of your own server.

A fresh panel uses a self-signed certificate. Install a trusted certificate for the panel before you point a billing system at it, so that clients can verify the connection instead of skipping the check. Skipping certificate checks (curl -k, -SkipCertificateCheck) is acceptable only for a first test.

Authentication#

Every call except sign-in and GET /api/health needs an API key. Keys start with sr_ and are created in the panel; see API keys. Send the key in either header:

Authorization: Bearer sr_0123456789abcdef...
X-API-Key: sr_0123456789abcdef...

If both are present, X-API-Key is used. A key acts exactly as the account that created it: an administrator, a reseller or a customer. There are no per-key scopes. Calls made with a key need no session cookie and no CSRF token.

A key is refused with 401 invalid API key when it is wrong, has expired, is used from an address outside its Allowed from list, or belongs to an account that is no longer active. Administrator keys also obey IP Access Restriction Management. Reseller and customer keys stop working as soon as their plan loses the REST API permission, because that permission is checked on every call.

First call with curl#

curl -s https://panel.example.com:9443/api/subscriptions \
     -H "Authorization: Bearer sr_..."

First call with PowerShell#

[Net.ServicePointManager]::SecurityProtocol = 'Tls12'
$base = 'https://panel.example.com:9443/api'
$h = @{ Authorization = 'Bearer sr_...' }
Invoke-RestMethod -Uri "$base/subscriptions" -Headers $h

The first line makes Windows PowerShell 5.1 use TLS 1.2; PowerShell 7 does not need it.

Requests and responses#

  • Methods. GET reads, POST creates or starts an action, PUT changes, DELETE removes.
  • Bodies. Send JSON with Content-Type: application/json. Ordinary bodies are limited to 1 MiB; file uploads have their own endpoints.
  • Unknown fields are refused. The panel decodes request bodies strictly: a field it does not know, or a value of the wrong type, gives 400 invalid request. Check field names and types against the OpenAPI description (see below) when that happens.
  • Answers. JSON objects with status 200, or 202 for a few calls that only queue work. Download endpoints, such as backup and log downloads, return the file itself.
  • IDs. Objects are addressed by numeric IDs: /api/subscriptions/12, /api/websites/31. A website ID is the domain's ID, which you find in the domains list of GET /api/subscriptions/{id} or in GET /api/domains.

Tasks: work that runs in the background#

Creating, changing and removing hosting objects touches IIS, Windows accounts, NTFS permissions, DNS and mail. That work runs in the StackRegent task service, so the API answers quickly with a task ID:

POST /api/subscriptions            ->  {"id": 12, "task_id": 345}
POST /api/subscriptions/12/status  ->  {"task_id": 346}
POST /api/backups                  ->  {"id": 88, "task": 347}

Note that the backup call names the field task. Follow a task with GET /api/tasks/{id}. Its status is queued, running, success or failure; progress is a percentage and log holds what the task wrote. A finished task can be queued again with POST /api/tasks/{id}/retry. Administrators can list tasks with GET /api/tasks?status=failure&page=1&size=50; resellers and customers see their own recent tasks in GET /api/my/tasks and can read a single task they started.

Errors#

Errors use the HTTP status code and a JSON body with an error message. Validation errors also name the fields that failed:

HTTP/1.1 400 Bad Request
{"error": "Please correct the highlighted fields.", "fields": ["contact_name", "login"]}
StatusTypical messageMeaning
400invalid request, or a field messageThe body is not valid JSON, has an unknown field, or a value failed validation
401invalid API keyWrong, expired or deleted key, address not allowed, or account inactive
403This page is for the server administrator.A reseller or customer key called an endpoint outside its account
403Your hosting plan does not allow this. Ask your provider to enable it.The subscription's plan lacks the permission for this change
403Restricted mode does not allow this change.The key's administrator is a restricted administrator and the change is in a blocked group
403API keys cannot manage logins.Reseller and customer keys cannot log in as others, change passwords or manage keys
403The panel's licence is not in order: ...The license is restricted; the body also has "license": "restricted"
404unknown API endpoint, not foundNo such path for this method, or no such object (also for objects of another account)
409for example The backup is still being created.The object is in a state that does not allow the call yet
429Too many failed attempts. Try again in 15 minutes.Sign-in attempts only (POST /api/auth/login)

While the license is restricted, administrator keys can still read and set the license (GET and PUT /api/license, POST /api/license/check) and nothing else. Reseller and customer keys keep working, though nothing new can be created until the license is in order. Websites, mail and DNS are never affected.

Rate limits#

API keys have no request quota, and authenticated calls are not counted. The only limit in the API is on failed sign-ins at the login endpoint. Be considerate anyway: run bulk jobs one call at a time and wait for each task before starting the next large one, because the task service runs two workers.

List endpoints for customers, subscriptions and domains take page (from 1) and size (1 to 1000, default 25), plus a search term q:

GET /api/clients?type=customer&q=example&page=2&size=100
GET /api/subscriptions?client=7&page=1&size=50
GET /api/domains?subscription=12

They answer with one page and the total count:

{"items": [ ... ], "total": 214}

GET /api/clients lists customers by default; add type=reseller for resellers and owner=ID for one reseller's customers. There q matches the contact name, company, login and email address. In GET /api/subscriptions, client=ID limits the list to one customer, and q matches the subscription name, the customer's name and the system user. The task list takes page and size up to 100.

OpenAPI description#

GET /api/openapi.json returns an OpenAPI 3.0 document of every endpoint with its parameters. It needs a key or a signed-in session, like any other call:

curl -s -H "Authorization: Bearer sr_..." https://panel.example.com:9443/api/openapi.json -o stackregent-openapi.json

Load it into an OpenAPI tool to browse the endpoints or generate a client. The panel has no built-in playground: use curl, your OpenAPI tool, or stackregent api on the server.

Endpoint reference#

The tables below list every route the panel registers, grouped by area. The columns say which kind of key may call it:

  • Admin: an administrator's key. Restricted administrators are further limited by Restricted Mode Settings.
  • Reseller: a reseller's key, limited to the reseller's own customers, plans, subscriptions and IP pool.
  • Customer: a customer's key, limited to the customer's own subscriptions.

Where a reseller or customer call changes something, the subscription's plan must also allow it; the permission is named in brackets as it appears in the service plan. Parameters and fields are in the OpenAPI description. Placeholders such as {id} are numeric IDs.

Sign-in and health#

These answer without a key. The panel's own login page uses the auth endpoints; GET /api/health answers {"ok": true, "time": "..."} and suits an uptime monitor.

MethodPath
POST/api/auth/forgot
POST/api/auth/login
POST/api/auth/logout
POST/api/auth/reset
GET/api/auth/session
GET/api/health

Customers and resellers#

MethodPathAdminResellerCustomer
GET/api/clientsyesyesno
POST/api/clientsyesyesno
GET/api/clients/{id}yesyesno
PUT/api/clients/{id}yesyesno
DELETE/api/clients/{id}yesyesno
POST/api/clients/{id}/convertyesnono
POST/api/clients/{id}/login-asyesnono
POST/api/clients/{id}/statusyesyesno
GET/api/clients/{id}/usersyesyesno
POST/api/clients/{id}/usersyesnono
PUT/api/clients/{id}/users/{uid}yesnono
DELETE/api/clients/{id}/users/{uid}yesnono
GET/api/searchyesnono

Service plans#

MethodPathAdminResellerCustomer
GET/api/plan-schemayesyesno
GET/api/plansyesyesno
POST/api/plansyesyesno
GET/api/plans/{id}yesyesno
PUT/api/plans/{id}yesyesno
DELETE/api/plans/{id}yesyesno
POST/api/plans/{id}/cloneyesyesno

Subscriptions#

MethodPathAdminResellerCustomer
GET/api/subscriptionsyesyesno
POST/api/subscriptionsyesyesno
GET/api/subscriptions/{id}yesyesyes
DELETE/api/subscriptions/{id}yesyesno
PUT/api/subscriptions/{id}/descriptionyesyesyes
POST/api/subscriptions/{id}/domainsyesyes (changes need domain, subdomain or alias management)yes (changes need domain, subdomain or alias management)
PUT/api/subscriptions/{id}/planyesyesno
POST/api/subscriptions/{id}/repairyesnono
PUT/api/subscriptions/{id}/settingsyesnono
POST/api/subscriptions/{id}/statusyesyesno
PUT/api/subscriptions/{id}/subscriberyesnono
GET/api/suggest/sysuseryesyesno

Websites and domains#

MethodPathAdminResellerCustomer
GET/api/app-poolsyesnono
POST/api/app-pools/{name}/{action}yesnono
GET/api/aspnet/defaultsyesnono
PUT/api/aspnet/defaultsyesnono
GET/api/domainsyesyesyes
DELETE/api/domains/{id}yesyes (changes need domain, subdomain or alias management)yes (changes need domain, subdomain or alias management)
GET/api/phpyesyesyes
PUT/api/php/{ver}/enabledyesnono
GET/api/php/{ver}/iniyesnono
PUT/api/php/{ver}/iniyesnono
GET/api/preview/settingsyesnono
PUT/api/preview/settingsyesnono
GET/api/vhost-templateyesnono
POST/api/vhost-templateyesnono
DELETE/api/vhost-templateyesnono
GET/api/vhost-template/downloadyesnono
PUT/api/webdeploy/settingsyesnono
GET/api/website-schemayesyesyes
GET/api/websites/{id}yesyesyes
POST/api/websites/{id}/applyyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
GET/api/websites/{id}/connectionyesyesyes
PUT/api/websites/{id}/docrootyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
GET/api/websites/{id}/phpinfoyesyesyes
GET/api/websites/{id}/protectedyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
POST/api/websites/{id}/protectedyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
DELETE/api/websites/{id}/protected-users/{uid}yesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
PUT/api/websites/{id}/protected/{pid}yesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
DELETE/api/websites/{id}/protected/{pid}yesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
POST/api/websites/{id}/protected/{pid}/usersyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
POST/api/websites/{id}/resetyesyesyes
PUT/api/websites/{id}/settingsyesyesyes
GET/api/websites/{id}/vdirsyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
POST/api/websites/{id}/vdirsyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
PUT/api/websites/{id}/vdirs/{vid}yesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
DELETE/api/websites/{id}/vdirs/{vid}yesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
GET/api/websites/{id}/wafyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
PUT/api/websites/{id}/wafyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
GET/api/websites/{id}/webdeployyesyes (needs Web Deploy publishing)yes (needs Web Deploy publishing)
GET/api/websites/{id}/webdeploy/publishsettingsyesyes (needs Web Deploy publishing)yes (needs Web Deploy publishing)
GET/api/websites/{id}/webusersyesyes (changes need Web users management)yes (changes need Web users management)
POST/api/websites/{id}/webusersyesyes (changes need Web users management)yes (changes need Web users management)
PUT/api/websites/{id}/webusers/{uid}yesyes (changes need Web users management)yes (changes need Web users management)
DELETE/api/websites/{id}/webusers/{uid}yesyes (changes need Web users management)yes (changes need Web users management)

SSL/TLS certificates#

MethodPathAdminResellerCustomer
GET/api/certsyesyesyes
POST/api/certs/csryesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
POST/api/certs/selfsignedyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
POST/api/certs/uploadyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
DELETE/api/certs/{cid}yesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
PUT/api/certs/{cid}/autorenewyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
GET/api/certs/{cid}/downloadyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
POST/api/certs/{cid}/uploadyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
GET/api/panel-certyesnono
PUT/api/panel-certyesnono
POST/api/panel-cert/letsencryptyesnono
GET/api/service-certsyesnono
PUT/api/service-certsyesnono
GET/api/ssl/settingsyesnono
PUT/api/ssl/settingsyesnono
GET/api/websites/{id}/sslyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
PUT/api/websites/{id}/sslyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
POST/api/websites/{id}/ssl/letsencryptyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)

DNS#

MethodPathAdminResellerCustomer
POST/api/dns/apply-templateyesnono
PUT/api/dns/serveryesnono
GET/api/dns/settingsyesnono
PUT/api/dns/soayesnono
PUT/api/dns/subzonesyesnono
POST/api/dns/sync-allyesnono
PUT/api/dns/templateyesnono
PUT/api/dns/xfryesnono
PUT/api/dns/zones/{zid}/modeyesyes (changes need DNS zone management)yes (changes need DNS zone management)
POST/api/dns/zones/{zid}/recordsyesyes (changes need DNS zone management)yes (changes need DNS zone management)
POST/api/dns/zones/{zid}/records/deleteyesyes (changes need DNS zone management)yes (changes need DNS zone management)
PUT/api/dns/zones/{zid}/records/{rid}yesyes (changes need DNS zone management)yes (changes need DNS zone management)
POST/api/dns/zones/{zid}/resetyesyes (changes need DNS zone management)yes (changes need DNS zone management)
PUT/api/dns/zones/{zid}/soayesyes (changes need DNS zone management)yes (changes need DNS zone management)
GET/api/websites/{id}/dnsyesyesyes
POST/api/websites/{id}/dns/enableyesyes (changes need DNS zone management)yes (changes need DNS zone management)

File Manager#

MethodPathAdminResellerCustomer
GET/api/subscriptions/{id}/filesyesyesyes
GET/api/subscriptions/{id}/files/aclyesyesyes
PUT/api/subscriptions/{id}/files/aclyesyesyes
POST/api/subscriptions/{id}/files/createyesyesyes
GET/api/subscriptions/{id}/files/downloadyesyesyes
POST/api/subscriptions/{id}/files/extractyesyesyes
POST/api/subscriptions/{id}/files/removeyesyesyes
POST/api/subscriptions/{id}/files/renameyesyesyes
GET/api/subscriptions/{id}/files/searchyesyesyes
GET/api/subscriptions/{id}/files/sizeyesyesyes
GET/api/subscriptions/{id}/files/textyesyesyes
PUT/api/subscriptions/{id}/files/textyesyesyes
POST/api/subscriptions/{id}/files/transferyesyesyes
POST/api/subscriptions/{id}/files/uploadyesyesyes
POST/api/subscriptions/{id}/files/zipyesyesyes

FTP and the system user#

MethodPathAdminResellerCustomer
GET/api/ftp/sessionsyesnono
POST/api/ftp/sessions/{sid}/closeyesnono
GET/api/ftp/settingsyesnono
PUT/api/ftp/settingsyesnono
PUT/api/subscriptions/{id}/anon-ftpyesyes (changes need Anonymous FTP management)yes (changes need Anonymous FTP management)
GET/api/subscriptions/{id}/ftpyesyesyes
POST/api/subscriptions/{id}/ftpyesyes (changes need Additional FTP accounts management)yes (changes need Additional FTP accounts management)
PUT/api/subscriptions/{id}/ftp/{fid}yesyes (changes need Additional FTP accounts management)yes (changes need Additional FTP accounts management)
DELETE/api/subscriptions/{id}/ftp/{fid}yesyes (changes need Additional FTP accounts management)yes (changes need Additional FTP accounts management)
POST/api/subscriptions/{id}/passwordyesyesyes

Databases and ODBC#

MethodPathAdminResellerCustomer
GET/api/db-prefsyesnono
PUT/api/db-prefsyesnono
GET/api/db-serversyesnono
POST/api/db-serversyesnono
PUT/api/db-servers/{sid}yesnono
DELETE/api/db-servers/{sid}yesnono
POST/api/db-servers/{sid}/defaultyesnono
PUT/api/db-servers/{sid}/firewallyesnono
GET/api/db-servers/{sid}/processesyesnono
POST/api/db-servers/{sid}/processes/{pid}/killyesnono
PUT/api/db-servers/{sid}/visibilityyesnono
GET/api/odbcyesnono
POST/api/odbcyesnono
PUT/api/odbc/{did}yesnono
DELETE/api/odbc/{did}yesnono
POST/api/odbc/{did}/testyesnono
GET/api/subscriptions/{id}/databasesyesyes (changes need Databases management)yes (changes need Databases management)
POST/api/subscriptions/{id}/databasesyesyes (changes need Databases management)yes (changes need Databases management)
POST/api/subscriptions/{id}/databases/sizesyesyes (changes need Databases management)yes (changes need Databases management)
DELETE/api/subscriptions/{id}/databases/{dbid}yesyes (changes need Databases management)yes (changes need Databases management)
POST/api/subscriptions/{id}/databases/{dbid}/jobyesyes (changes need Databases management)yes (changes need Databases management)
POST/api/subscriptions/{id}/databases/{dbid}/phpmyadminyesyes (changes need Databases management)yes (changes need Databases management)
POST/api/subscriptions/{id}/databases/{dbid}/queryyesyes (changes need Databases management)yes (changes need Databases management)
GET/api/subscriptions/{id}/databases/{dbid}/tablesyesyes (changes need Databases management)yes (changes need Databases management)
POST/api/subscriptions/{id}/db-usersyesyes (changes need Databases management)yes (changes need Databases management)
PUT/api/subscriptions/{id}/db-users/{uid}yesyes (changes need Databases management)yes (changes need Databases management)
DELETE/api/subscriptions/{id}/db-users/{uid}yesyes (changes need Databases management)yes (changes need Databases management)
GET/api/subscriptions/{id}/odbcyesyesyes
POST/api/subscriptions/{id}/odbcyesyes (changes need ODBC DSN management)yes (changes need ODBC DSN management)
PUT/api/subscriptions/{id}/odbc/{did}yesyes (changes need ODBC DSN management)yes (changes need ODBC DSN management)
DELETE/api/subscriptions/{id}/odbc/{did}yesyes (changes need ODBC DSN management)yes (changes need ODBC DSN management)
POST/api/subscriptions/{id}/odbc/{did}/testyesyes (changes need ODBC DSN management)yes (changes need ODBC DSN management)

Mail#

MethodPathAdminResellerCustomer
GET/api/antivirusyesnono
PUT/api/antivirusyesnono
POST/api/antivirus/mailboxyesnono
POST/api/antivirus/updateyesnono
POST/api/mail/applyyesnono
POST/api/mail/delivery-checkyesnono
POST/api/mail/massyesnono
GET/api/mail/mass-templatesyesnono
PUT/api/mail/mass-templatesyesnono
GET/api/mail/outgoingyesnono
GET/api/mail/settingsyesnono
PUT/api/mail/settingsyesnono
POST/api/mail/testyesnono
GET/api/subscriptions/{id}/mailyesyesyes
POST/api/subscriptions/{id}/mail/accountsyesyes (changes need Mail accounts management)yes (changes need Mail accounts management)
PUT/api/subscriptions/{id}/mail/accounts/{aid}yesyes (changes need Mail accounts management)yes (changes need Mail accounts management)
DELETE/api/subscriptions/{id}/mail/accounts/{aid}yesyes (changes need Mail accounts management)yes (changes need Mail accounts management)
GET/api/subscriptions/{id}/mail/accounts/{aid}/mobileconfigyesyes (changes need Mail accounts management)yes (changes need Mail accounts management)
GET/api/subscriptions/{id}/mail/accounts/{aid}/spamyesyes (changes need Mail accounts management)yes (changes need Mail accounts management)
PUT/api/subscriptions/{id}/mail/accounts/{aid}/spamyesyes (changes need Mail accounts management)yes (changes need Mail accounts management)
PUT/api/subscriptions/{id}/mail/domains/{did}yesyes (changes need Mail accounts management)yes (changes need Mail accounts management)
POST/api/subscriptions/{id}/mail/domains/{did}/syncyesyes (changes need Mail accounts management)yes (changes need Mail accounts management)
POST/api/subscriptions/{id}/mail/listsyesyes (changes need Mailing lists management)yes (changes need Mailing lists management)
PUT/api/subscriptions/{id}/mail/lists/{lid}yesyes (changes need Mailing lists management)yes (changes need Mailing lists management)
DELETE/api/subscriptions/{id}/mail/lists/{lid}yesyes (changes need Mailing lists management)yes (changes need Mailing lists management)
GET/api/subscriptions/{id}/mail/outgoingyesyes (changes need Mail accounts management)yes (changes need Mail accounts management)
POST/api/subscriptions/{id}/mail/sizesyesyesyes

Applications, WordPress, Laravel and Git#

MethodPathAdminResellerCustomer
GET/api/appsyesyesyes
GET/api/apps/catalogyesyesyes
POST/api/apps/installyesyesyes
GET/api/apps/{id}yesyesyes
POST/api/apps/{id}/backupyesyesyes
DELETE/api/apps/{id}/backups/{name}yesyesyes
POST/api/apps/{id}/detachyesyesyes
POST/api/apps/{id}/refreshyesyesyes
POST/api/apps/{id}/removeyesyesyes
POST/api/apps/{id}/restoreyesyesyes
POST/api/apps/{id}/updateyesyesyes
PUT/api/git/{id}yesyes (changes need Git management)yes (changes need Git management)
DELETE/api/git/{id}yesyes (changes need Git management)yes (changes need Git management)
POST/api/git/{id}/deployyesyes (changes need Git management)yes (changes need Git management)
GET/api/git/{id}/historyyesyes (changes need Git management)yes (changes need Git management)
POST/api/git/{id}/pullyesyes (changes need Git management)yes (changes need Git management)
POST/api/laravel/{id}/artisanyesyes (changes need Laravel Toolkit)yes (changes need Laravel Toolkit)
GET/api/laravel/{id}/envyesyes (changes need Laravel Toolkit)yes (changes need Laravel Toolkit)
PUT/api/laravel/{id}/envyesyes (changes need Laravel Toolkit)yes (changes need Laravel Toolkit)
POST/api/laravel/{id}/refreshyesyes (changes need Laravel Toolkit)yes (changes need Laravel Toolkit)
PUT/api/laravel/{id}/switchyesyes (changes need Laravel Toolkit)yes (changes need Laravel Toolkit)
GET/api/websites/{id}/composeryesyesyes
POST/api/websites/{id}/composer/runyesyesyes
PUT/api/websites/{id}/composer/settingsyesyesyes
GET/api/websites/{id}/gityesyes (changes need Git management)yes (changes need Git management)
POST/api/websites/{id}/gityesyes (changes need Git management)yes (changes need Git management)
POST/api/websites/{id}/laravel/installyesyes (changes need Laravel Toolkit)yes (changes need Laravel Toolkit)
POST/api/websites/{id}/laravel/scanyesyes (changes need Laravel Toolkit)yes (changes need Laravel Toolkit)
POST/api/wordpress/installyesyes (changes need WordPress Toolkit)yes (changes need WordPress Toolkit)
POST/api/wordpress/scanyesyes (changes need WordPress Toolkit)yes (changes need WordPress Toolkit)
GET/api/wordpress/searchyesyesyes
POST/api/wordpress/{id}/cloneyesyes (changes need WordPress Toolkit)yes (changes need WordPress Toolkit)
POST/api/wordpress/{id}/itemsyesyes (changes need WordPress Toolkit)yes (changes need WordPress Toolkit)
POST/api/wordpress/{id}/loginyesyes (changes need WordPress Toolkit)yes (changes need WordPress Toolkit)
POST/api/wordpress/{id}/passwordyesyes (changes need WordPress Toolkit)yes (changes need WordPress Toolkit)
PUT/api/wordpress/{id}/policyyesyes (changes need WordPress Toolkit)yes (changes need WordPress Toolkit)
POST/api/wordpress/{id}/saltsyesyes (changes need WordPress Toolkit)yes (changes need WordPress Toolkit)
PUT/api/wordpress/{id}/securityyesyes (changes need WordPress Toolkit)yes (changes need WordPress Toolkit)
PUT/api/wordpress/{id}/switchyesyes (changes need WordPress Toolkit)yes (changes need WordPress Toolkit)
POST/api/wordpress/{id}/syncyesyes (changes need WordPress Toolkit)yes (changes need WordPress Toolkit)
POST/api/wordpress/{id}/updateyesyes (changes need WordPress Toolkit)yes (changes need WordPress Toolkit)

Scheduled tasks#

MethodPathAdminResellerCustomer
GET/api/cronyesyesyes
POST/api/cronyesyes (changes need Scheduled tasks management)yes (changes need Scheduled tasks management)
POST/api/cron/previewyesyesyes
PUT/api/cron/{id}yesyes (changes need Scheduled tasks management)yes (changes need Scheduled tasks management)
DELETE/api/cron/{id}yesyes (changes need Scheduled tasks management)yes (changes need Scheduled tasks management)
PUT/api/cron/{id}/enabledyesyes (changes need Scheduled tasks management)yes (changes need Scheduled tasks management)
POST/api/cron/{id}/runyesyes (changes need Scheduled tasks management)yes (changes need Scheduled tasks management)
GET/api/cron/{id}/runsyesyes (changes need Scheduled tasks management)yes (changes need Scheduled tasks management)

Backups, transfer and migration#

MethodPathAdminResellerCustomer
GET/api/backupsyesyesyes
POST/api/backupsyesyes (changes need a backup permission)yes (changes need a backup permission)
POST/api/backups/importyesnono
POST/api/backups/linksyesnono
GET/api/backups/remoteyesyesyes
PUT/api/backups/remoteyesyes (changes need remote backup storage permission)yes (changes need remote backup storage permission)
GET/api/backups/scheduleyesyesyes
PUT/api/backups/scheduleyesyes (changes need a backup permission)yes (changes need a backup permission)
POST/api/backups/uploadyesnono
DELETE/api/backups/{id}yesyes (changes need a backup permission)yes (changes need a backup permission)
GET/api/backups/{id}/contentsyesyes (changes need a backup permission)yes (changes need a backup permission)
GET/api/backups/{id}/downloadyesyes (changes need a backup permission)yes (changes need a backup permission)
POST/api/backups/{id}/export-pleskyesyes (changes need a backup permission)yes (changes need a backup permission)
POST/api/backups/{id}/restoreyesyes (changes need a backup permission)yes (changes need a backup permission)
POST/api/migration/exportsyesnono
GET/api/migration/exports/{id}yesnono
DELETE/api/migration/exports/{id}yesnono
GET/api/migration/exports/{id}/fileyesnono
GET/api/migration/inventoryyesnono
GET/api/migrationsyesnono
POST/api/migrationsyesnono
GET/api/migrations/{id}yesnono
DELETE/api/migrations/{id}yesnono
POST/api/migrations/{id}/refreshyesnono
POST/api/migrations/{id}/startyesnono
POST/api/websites/{id}/copyyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)
POST/api/websites/{id}/importyesyes (changes need Hosting settings management)yes (changes need Hosting settings management)

Statistics, monitoring and diagnostics#

MethodPathAdminResellerCustomer
GET/api/advisoryesnono
POST/api/advisor/fix/{id}yesnono
GET/api/dashboardyesnono
GET/api/diagnoseyesnono
POST/api/diagnoseyesnono
POST/api/diagnose/repairyesnono
GET/api/isolationyesnono
POST/api/isolation/{id}/checkyesnono
GET/api/metricsyesnono
GET/api/monitoringyesnono
GET/api/monitoring/alertsyesnono
PUT/api/monitoring/alertsyesnono
POST/api/monitoring/alerts/testyesnono
GET/api/monitoring/seriesyesnono
PUT/api/pagespeed/keyyesnono
GET/api/processesyesnono
POST/api/processes/{pid}/killyesnono
GET/api/resourcesyesnono
PUT/api/resources/settingsyesnono
GET/api/statisticsyesnono
POST/api/statistics/refreshyesnono
GET/api/statistics/settingsyesnono
PUT/api/statistics/settingsyesnono
GET/api/statistics/trafficyesnono
GET/api/subscriptions/{id}/processesyesyesyes
POST/api/subscriptions/{id}/processes/{pid}/killyesyesyes
GET/api/subscriptions/{id}/resourcesyesyesyes
PUT/api/subscriptions/{id}/resourcesyesnono
GET/api/subscriptions/{id}/statisticsyesyesyes
POST/api/subscriptions/{id}/statistics/refreshyesyesyes
GET/api/websites/{id}/logsyesyes (changes need Log rotation management)yes (changes need Log rotation management)
DELETE/api/websites/{id}/logsyesyes (changes need Log rotation management)yes (changes need Log rotation management)
GET/api/websites/{id}/logs/downloadyesyes (changes need Log rotation management)yes (changes need Log rotation management)
GET/api/websites/{id}/logs/viewyesyes (changes need Log rotation management)yes (changes need Log rotation management)
GET/api/websites/{id}/pagespeedyesyesyes
POST/api/websites/{id}/pagespeedyesyesyes
GET/api/websites/{id}/tracesyesyesyes
DELETE/api/websites/{id}/tracesyesyesyes
GET/api/websites/{id}/traces/zipyesyesyes
GET/api/websites/{id}/webstatsyesyesyes

Tasks and the action log#

MethodPathAdminResellerCustomer
GET/api/action-logyesnono
DELETE/api/action-logyesnono
GET/api/action-log/exportyesnono
GET/api/action-log/settingsyesnono
PUT/api/action-log/settingsyesnono
GET/api/tasksyesnono
GET/api/tasks/{id}yesyesyes
POST/api/tasks/{id}/retryyesnono

Security#

MethodPathAdminResellerCustomer
GET/api/prohibitedyesnono
POST/api/prohibitedyesnono
PUT/api/prohibited/settingsyesnono
DELETE/api/prohibited/{name}yesnono
GET/api/restricted-modeyesnono
PUT/api/restricted-modeyesnono
GET/api/security/firewallyesnono
PUT/api/security/firewallyesnono
POST/api/security/firewall/confirmyesnono
POST/api/security/firewall/resetyesnono
GET/api/security/firewall/stateyesnono
GET/api/security/firewall/statusyesnono
GET/api/security/guardyesnono
PUT/api/security/guardyesnono
POST/api/security/guard/bansyesnono
DELETE/api/security/guard/bans/{ip}yesnono
GET/api/security/guard/logyesnono
GET/api/security/ip-accessyesnono
PUT/api/security/ip-accessyesnono
GET/api/security/policyyesnono
PUT/api/security/policyyesnono
GET/api/security/rdpyesnono
POST/api/security/rdp/{sid}/{action}yesnono
GET/api/security/session-settingsyesnono
PUT/api/security/session-settingsyesnono
GET/api/security/sessionsyesnono
DELETE/api/security/sessions/{sid}yesnono
GET/api/security/wafyesnono
PUT/api/security/wafyesnono
POST/api/security/waf/update-rulesyesnono

Administrators, profile and API keys#

MethodPathAdminResellerCustomer
GET/api/adminsyesnono
POST/api/adminsyesnono
PUT/api/admins/{id}yesnono
DELETE/api/admins/{id}yesnono
GET/api/api-keysyesnono
POST/api/api-keysyesnono
DELETE/api/api-keys/{id}yesnono
GET/api/profileyesnono
PUT/api/profileyesnono
POST/api/profile/2fa/disableyesnono
POST/api/profile/2fa/enableyesnono
POST/api/profile/2fa/setupyesnono
POST/api/profile/passwordyesnono
POST/api/profile/password/checkyesnono
PUT/api/profile/themeyesnono

Server management#

MethodPathAdminResellerCustomer
GET/api/aboutyesnono
GET/api/componentsyesnono
POST/api/components/refreshyesnono
POST/api/components/{cid}/{action}yesnono
GET/api/eventsyesnono
POST/api/eventsyesnono
PUT/api/events/{id}yesnono
DELETE/api/events/{id}yesnono
GET/api/extensionsyesnono
GET/api/ipsyesyesno
POST/api/ips/rereadyesnono
PUT/api/ips/{id}yesnono
DELETE/api/ips/{id}yesnono
GET/api/licenseyesnono
PUT/api/licenseyesnono
POST/api/license/checkyesnono
GET/api/noticesyesnono
POST/api/notices/readyesnono
GET/api/notificationsyesnono
PUT/api/notificationsyesnono
GET/api/openapi.jsonyesnono
GET/api/poweryesnono
POST/api/poweryesnono
DELETE/api/poweryesnono
GET/api/server-settingsyesnono
PUT/api/server-settingsyesnono
PUT/api/server/hostnameyesnono
GET/api/server/infoyesnono
GET/api/servicesyesnono
PUT/api/services/{name}/startupyesnono
POST/api/services/{name}/{action}yesnono
GET/api/system-timeyesnono
PUT/api/system-timeyesnono
GET/api/updatesyesnono
POST/api/updates/checkyesnono
POST/api/updates/installyesnono
PUT/api/updates/settingsyesnono

Branding, languages and interface#

MethodPathAdminResellerCustomer
GET/api/brandingyesnono
PUT/api/brandingyesyesno
POST/api/branding/{kind}yesyesno
GET/api/buttonsyesyesyes
POST/api/buttonsyesnono
PUT/api/buttons/{id}yesnono
DELETE/api/buttons/{id}yesnono
GET/api/interfaceyesyesyes
PUT/api/interfaceyesnono
GET/api/languagesyesnono
POST/api/languagesyesnono
PUT/api/languagesyesnono
GET/api/languages/{code}yesnono
DELETE/api/languages/{code}yesnono

Reseller and customer account (/api/my)#

These answer for reseller and customer keys only. The rows marked no in every column (key management, password changes, logging in as a customer and returning from it) work only in a signed-in panel session, never with a key.

MethodPathAdminResellerCustomer
GET/api/my/accountnoyesyes
GET/api/my/api-keysnonono
POST/api/my/api-keysnonono
DELETE/api/my/api-keys/{id}nonono
POST/api/my/backnonono
GET/api/my/customersnoyesno
POST/api/my/customers/{id}/login-asnonono
GET/api/my/helpnoyesyes
GET/api/my/help/articles/{role}/{slug}noyesyes
GET/api/my/mailboxnoyesyes
PUT/api/my/mailboxnoyesyes
GET/api/my/overviewnoyesyes
POST/api/my/passwordnonono
PUT/api/my/profilenoyesyes
GET/api/my/rolesnoyesyes
POST/api/my/rolesnoyesyes
PUT/api/my/roles/{id}noyesyes
DELETE/api/my/roles/{id}noyesyes
GET/api/my/subscriptions/{id}/settingsnoyesyes
PUT/api/my/subscriptions/{id}/settingsnoyesyes
GET/api/my/tasksnoyesyes
GET/api/my/usersnoyesyes
POST/api/my/usersnoyesyes
PUT/api/my/users/{id}noyesyes
DELETE/api/my/users/{id}noyesyes
  • API keys: who a key acts as and how to limit it
  • Command line: stackregent api calls these endpoints on the server without a key of your own
  • Automation examples: complete scripts for provisioning, suspension and backups

Frequently asked questions

What is the base URL of the StackRegent API?

https://SERVER:9443/api/, where SERVER is your panel's host name or IP address and 9443 is the panel's HTTPS port. If you moved the panel to another port, the API is on that port too.

How do I authenticate to the StackRegent REST API?

Create an API key in the panel and send it as Authorization: Bearer sr_... or in an X-API-Key header. See API keys.

Why do I get 400 invalid request on a POST that looks right?

The panel refuses JSON with fields it does not know or values of the wrong type, for example a number sent as a string. Compare your field names and types with /api/openapi.json.

How do I know when a subscription is ready after creating it?

The create call returns a task_id. Poll GET /api/tasks/{id} until status is success or failure; the log field explains any failure.

Does the API have rate limits?

No quota applies to calls made with an API key. Only failed sign-ins on the login endpoint are limited.

Can I download the OpenAPI specification?

Yes. GET /api/openapi.json with your key returns an OpenAPI 3.0 description of every endpoint, which you can load into an OpenAPI tool or a client generator.

Which endpoints can a customer key call?

Only endpoints about the customer's own subscriptions, websites, mail, databases, files, applications, scheduled tasks and backups, as marked in the Customer column above. Changes also need the matching permission in the subscription's plan.