Servers
API routes to list, create, connect and delete servers, follow an install, run managed servers, restore deleted servers and share a server.
These routes manage the servers of an organization: the five ways to add one, the list, deleting and restoring, managed servers and sharing. The routes for what is inside a server, such as databases, firewall and applications, are on their own pages. See the guide pages Add a server, Servers and Delete and restore.
In the paths below, {organization} is the organization id from GET /organizations and {server} is a server id from the server list.
Both kinds of token can call every route on this page except the sharing routes: everything under .../servers/{server}/shares and /shared-servers. Those need a login token. With the personal API token they answer 403 with the code api_token_not_allowed. See Authentication.
The server object
A server in an answer looks like this. Fields that do not apply to the way the server was added are null.
{
"id": 145,
"name": "web-1",
"hostname": "web-1",
"source": "cloud",
"source_label": "Your cloud account",
"status": "ready",
"status_label": "Ready",
"failure_reason": null,
"failure_message": null,
"failure_detail": null,
"api_url": "https://api.203-0-113-10.nip.io",
"panel_url": "https://panel.203-0-113-10.nip.io",
"public_ip": "203.0.113.10",
"country_code": "US",
"country": "United States",
"stack": "lemp",
"provider": "digitalocean",
"region": "ams3",
"size": "s-1vcpu-2gb",
"is_managed": false,
"system_info": {
"oss_version": "1.0.14",
"os": "Ubuntu 24.04.4 LTS",
"cpu": "Intel(R) Xeon(R) Gold 6138 CPU @ 2.00GHz",
"cores": 2,
"memory_total": 4106067968,
"disk_total": 61285326848,
"web_server": "nginx",
"app_count": 4,
"database_engines": [ { "engine": "mysql", "version": "8.0.46" } ]
},
"installation_status": null,
"connected_at": "2026-11-25T01:23:21+00:00",
"last_seen_at": "2026-11-25T06:18:55+00:00",
"connection": "online",
"connection_label": "Online",
"unreachable_since": null,
"created_by": { "id": 1, "name": "Jane Doe" },
"created_at": "2026-11-25T01:23:21+00:00",
"is_shared": false
}| Field | Values |
|---|---|
source | cloud (your cloud account), managed, root_password, install_command, connect_oss (a connected OSS panel) or lite. |
status | pending, creating, installing, connecting, ready or failed. |
stack | lemp, lamp, mern, ols or docker. |
connection | online, offline or unknown. unreachable_since is set while the server is offline. |
memory_total and disk_total are in bytes. country_code and country are null until Central has found the server's country. permissions appears in some answers: what you may do with this server.
Follow an install
While status is not yet ready, read one server with GET /organizations/{organization}/servers/{server}. Its installation_status shows the progress:
{
"step": 3,
"total": 9,
"title": "Installing web server",
"message": null,
"log_file": "/var/log/serveravatar/install.log",
"started_at": "2026-11-25T01:20:00+00:00",
"last_report_at": "2026-11-25T01:22:10+00:00",
"deadline_at": "2026-11-25T01:50:00+00:00",
"state": "running",
"reason": null,
"steps": [],
"log_tail": null,
"code": null,
"findings": null
}The values above are an example. step and total give the position. steps and log_tail hold the steps reported so far and the end of the install log; they are in the single-server answer only, not in the list. When the install fails, status is failed, and failure_reason, failure_message and failure_detail say why. See Install progress.
List and read
| Route | Purpose |
|---|---|
GET /organizations/{organization}/servers | List the servers of the organization. |
GET /organizations/{organization}/servers/{server} | One server. |
POST /organizations/{organization}/servers/{server}/status-check | Check the connection now and return the server with a live block. |
GET /shared-servers | Servers other people shared with you. Login token. |
GET /organizations/{organization}/servers
A paged list. Permission: Server (view).
| Query | Type | Rules |
|---|---|---|
page | integer | From 1. |
per_page | integer | 1 to 50. The default is 12. |
search | string | 1 to 100 characters. Matches name, hostname, public IP, provider, stack or operating system. |
filter[is_managed] | boolean | true, false, 1 or 0. Only managed servers, or only the others. |
sort | string | name, -name, created_at or -created_at. A leading - sorts the other way. |
curl "https://<api-address>/api/v1/organizations/590/servers?per_page=20&sort=-created_at" \
-H "Accept: application/json" \
-H "Authorization: Bearer <token>"200 has data (a list of server objects), links and meta.
GET /organizations/{organization}/servers/{server}
One server, with the full installation_status. Allowed for members with Server (view) and for people the server is shared with. 410 when the server was deleted because its install failed; the answer holds the failure. 404 when it does not exist or you have no access.
Add a server
Every route here needs Server (manage). A new server answers 201 with the server object. The server is not ready yet: follow it as described above.
The ways to add a server take an optional panel administrator, the first user of the new panel:
| Field | Type | Required | Rules |
|---|---|---|---|
panel_admin_username | string | with panel_admin_password | 3 to 32 letters, digits, - and _. |
panel_admin_password | string | with panel_admin_username | 12 to 128 characters, no control characters. |
Send both or neither. If you send neither, Central makes one: the username admin and a random 24-character password. The answer that starts the install then has a panel_admin block with the username, the password and generated: true. This is the only time the password is shown, so keep it.
All routes below also take stack: lemp, lamp, mern, ols or docker, where the table says.
In your own cloud account
First choose the account, the region and the size:
| Route | Returns |
|---|---|
GET .../servers/cloud/accounts | Your connected cloud provider accounts, and meta.supported_providers. |
GET .../servers/cloud/accounts/{cloudProviderAccount}/regions | The regions of the account. |
GET .../servers/cloud/accounts/{cloudProviderAccount}/sizes?region=<region> | The sizes in a region (region is required, lowercase letters, digits and -), and meta.categories. |
POST /organizations/{organization}/servers/cloud
| Field | Type | Required | Rules |
|---|---|---|---|
cloud_provider_account_id | integer | yes | An account of this organization. |
name | string | yes | At most 63 characters. Letters, digits, . and -. Each provider has stricter rules (Vultr, Lightsail and Linode); the error message says which. |
region | string | yes | At most 50 characters: lowercase letters, digits and -. |
size | string | yes | At most 100 characters: lowercase letters, digits, _, . and -. |
ubuntu | string | yes | 22.04, 24.04 or 26.04. |
stack | string | yes | See above. |
ssh_public_key | string | no | One line, at most 4000 characters, a complete ssh-ed25519, ssh-rsa or ecdsa-sha2-nistp256/384/521 key. |
root_password | string | Linode only | At most 128 characters, at least 11, with a lowercase letter, an uppercase letter, a digit and one of @ $ ! % * # ? &. Refused for other providers. |
zone | string | Lightsail only | The availability zone, for example us-east-1a. Must belong to region. Refused for other providers. |
panel_admin_username, panel_admin_password | string | no | As above. |
POST /organizations/{organization}/servers/root-password
Adds a server you already have by signing in over SSH with the root password. Limit: 5 tries a minute for the same server address (the ip you send), so a server's root password can't be guessed through Central.
| Field | Type | Required | Rules |
|---|---|---|---|
name | string | yes | At most 100 characters. |
stack | string | yes | See above. |
ip | string | yes | The public IPv4 address of the server. |
ssh_port | integer | no | 1 to 65535. |
root_password | string | yes | At most 255 characters. Central uses it for the install and does not keep it. |
panel_admin_username, panel_admin_password | string | no | As above. |
POST /organizations/{organization}/servers/install-command
Makes a server record and an install command to run on the server yourself.
| Field | Type | Required | Rules |
|---|---|---|---|
name | string | yes | At most 100 characters. |
stack | string | yes | See above. |
panel_admin_username, panel_admin_password | string | no | As above. |
201 returns the server with install_command (a curl ... | sudo bash line) and install_command_expires_at. The link works once. If it expired or you lost it before running it, call POST /organizations/{organization}/servers/{server}/install-command/new (with the optional panel administrator fields) to get a new command; the old one stops working.
POST /organizations/{organization}/servers/connect
Connects a server that already runs an OSS panel.
| Field | Type | Required | Rules |
|---|---|---|---|
api_url | string | yes | The panel's API address, at most 255 characters. |
token | string | yes | The Central token from the panel. It starts with sv_central_, has no spaces, and is at most 255 characters. |
name | string | no | At most 100 characters. |
201 returns the server.
Errors for all four: 422 A server with this IP address is already in ServerAvatar. (server_ip_in_use), 422 Enter the public IPv4 address of the server., and validation messages in errors.
Managed servers
A managed server runs in ServerAvatar's own provider account and is billed from your credits. See Managed server and Managed server billing.
| Route | Purpose | Permission |
|---|---|---|
GET .../servers/managed/plans | The plans you can buy, and the providers and regions that have them. Query: provider, region. | Server (manage) |
GET .../servers/managed/credits | The organization owner's credits. | Server (view) |
POST .../servers/managed | Create a managed server. Needs a verified email. | Server (manage) |
GET .../servers/{server}/managed/usage | Charges for a managed server. | Server (view) |
GET .../servers/{server}/managed/power | The power state. | Server (view) |
POST .../servers/{server}/managed/power | Power on or off. | Server (manage) |
GET .../servers/{server}/managed/resize | The resize options. | Resize (view) |
PATCH .../servers/{server}/managed/resize | Resize the server. | Resize (manage) |
... stands for /organizations/{organization}. The routes with {server} need a ready, managed server and answer 404 for any other.
GET .../servers/managed/plans
{
"data": [
{
"id": 20,
"provider": "digitalocean",
"provider_label": "DigitalOcean",
"region": "Amsterdam 3",
"region_code": "ams3",
"name": "s-1vcpu-2gb",
"type": "basic",
"size_slug": "s-1vcpu-2gb",
"cores": 1,
"ram": 2048,
"disk": 50,
"bandwidth": "2.00",
"price_per_month": "14.00",
"hourly_price": "0.0192",
"is_popular": false,
"is_recommended": false
}
],
"meta": {
"providers": [
{ "provider": "digitalocean", "label": "DigitalOcean", "regions": [ { "code": "ams3", "name": "Amsterdam 3" } ] }
],
"trial_mode": true
}
}ram is in MB. Prices are in dollars, as text.
GET .../servers/managed/credits
{
"data": {
"currency": "USD",
"paid_credits": "0.00",
"free_credits": "0.00",
"promo_credits": "0.00",
"total_credits": "0.00",
"as_of": "2026-11-25T06:28:54.800737Z"
},
"meta": { "trial_mode": true }
}POST .../servers/managed
| Field | Type | Required | Rules |
|---|---|---|---|
plan_id | integer | yes | The id of a plan from the plan list. |
name | string | yes | At most 63 characters, with the name rules of the plan's provider. |
ubuntu | string | yes | 22.04, 24.04 or 26.04. |
stack | string | yes | lemp, lamp, mern, ols or docker. |
ssh_public_key | string | no | As for a cloud server. |
You cannot send cloud_provider_account_id, region or size; the plan decides them. Central always makes the panel administrator for a managed server, so the 201 answer has a panel_admin block.
Creating a managed server needs a verified email address (403 email_not_verified otherwise) and the owner's paid credits must cover one month of the plan. If they do not, the answer says Your credits are not enough for one month of this server. Please add $<amount> to your credits and try again. In trial mode you can only choose a popular size, unless your credits cover one month of the size you chose.
Usage, power and resize
GET .../servers/{server}/managed/usagereturnsmonthly_price,billing_started_at,billed_until,billing_stopped_at,this_monthandtotal(each withhoursandamount) andlast_charged_at.GET .../servers/{server}/managed/powerreturns{ "data": { "state": "..." } }.POST .../servers/{server}/managed/powertakesaction,onoroff. 202 withdata.stateand the messageThe server is being powered on.orThe server is being powered off.You cannot power a server on or off while the credits are used up.GET .../servers/{server}/managed/resizereturnscurrent(plan, size, monthly price, disk),power,disk_option,migration_option,resize(the running or last resize) andplans, each withallowed,reasonandreason_label.PATCH .../servers/{server}/managed/resizetakesplan_id(required),disk(boolean, only wheredisk_optionistrue) andmigration_type(coldorwarm, only wheremigration_optionistrue). 202 withdata.statusrunningand the messageThe resize has started. The server may be offline for a few minutes.
Change, delete and restore
PATCH /organizations/{organization}/servers/{server}/ip
Saves a new public IP address after the server's address changed. The server must be ready. Permission: Server (manage).
| Field | Type | Required | Rules |
|---|---|---|---|
public_ip | string | yes | A public IPv4 address. A private or reserved address is refused with Enter the public IPv4 address of the server. |
200 returns the server.
DELETE /organizations/{organization}/servers/{server}
Deletes a server. Permission: Server (manage). A Control Panel customer can delete a server with the server.delete permission of their login.
| Field | Type | Required | Rules |
|---|---|---|---|
delete_at_provider | boolean | no | Also delete the machine at the cloud provider. |
A server that is ready is kept as a deleted server so you can restore it. 200 returns:
{
"data": {
"oss_token_revoked": true,
"oss_disconnect": "revoked",
"deleted_at_provider": false,
"restorable": false
}
}An install that never became ready is removed at once and answers 204 with no body.
Deleted servers
| Route | Purpose |
|---|---|
GET /organizations/{organization}/deleted-servers | List the deleted servers. Query: page, per_page (1 to 50, default 12), search (name or public IP), sort (name, -name, deleted_at or -deleted_at). |
POST /organizations/{organization}/deleted-servers/{server}/restore | Restore a server. |
DELETE /organizations/{organization}/deleted-servers/{server} | Delete it for good. |
These routes work for the organization owner only. Each item of the list is a short server object with restorable (whether it can be restored), os, and deleted_at. A server deleted at the provider, a managed server, or one deleted before restoring existed is not restorable.
Share a server
Sharing gives one person access to one server, with chosen permissions, without making them a member of the organization. Login token only. You need the Share Server permission. See Share a server.
| Route | Purpose |
|---|---|
GET .../servers/{server}/shares | List the shares of a server (paged: page, per_page 1 to 50, default 25). |
POST .../servers/{server}/shares | Share the server with an email address. |
PATCH .../servers/{server}/shares/{share} | Change the permissions of a share. |
DELETE .../servers/{server}/shares/{share} | Stop sharing. 204. |
POST .../servers/{server}/shares/{share}/resend | Send a new sign-up link to a pending share. |
GET /shared-servers | The servers shared with you (paged: page, per_page 1 to 50, search, sort by name, -name, shared_at or -shared_at). |
GET /shared-servers/{server}/menu | The screens of a shared server that you may open. |
DELETE /shared-servers/{server}/access | Leave a shared server. 204. |
... stands for /organizations/{organization}.
POST .../servers/{server}/shares
| Field | Type | Required | Rules |
|---|---|---|---|
email | string | yes | A valid email address, at most 254 characters. |
permissions | array | yes | 1 to 100 items. |
permissions.*.name | string | yes | A permission that can be shared. Use GET /organizations/{organization}/permissions?type=shared for the list. No repeats. |
permissions.*.view | boolean | no | View access. |
permissions.*.manage | boolean | no | Manage access. It includes view. |
201 returns the share:
{
"data": {
"id": 9,
"server_id": 145,
"status": "active",
"email": "dev@example.com",
"user": { "id": 4, "name": "Sam Lee", "email": "dev@example.com" },
"permissions": [ { "name": "server", "view": true, "manage": false } ],
"invited_by": { "id": 1, "name": "Jane Doe" },
"accepted_at": "2026-11-25T10:00:00+00:00",
"created_at": "2026-11-25T10:00:00+00:00",
"updated_at": "2026-11-25T10:00:00+00:00"
},
"message": "web-1 is now shared with dev@example.com."
}status is pending when no account uses the email yet. Then user is null, and the message is No account uses dev@example.com yet. We sent a sign-up link; the server is shared with them when they sign up. PATCH takes the same permissions and answers Sharing permissions updated.
Errors, all 422: This server is already shared with this person., This person is a member of the organization. Members use their role, not sharing., Only a ready server can be shared., This permission cannot be shared., Choose at least one permission to share., and for resend This share is already active; there is no sign-up link to resend.
Routes the installer calls
POST /server-install/report and GET /server-install/script/{code} are called by the install script on the new server. They need no token and are not for scripts of yours.
Limits
- Server name: 63 characters for cloud and managed servers, 100 for the other ways.
- Server list: at most 50 a page, 12 by default.
- Root-password installs: 5 tries a minute for each server address (
ip). - Panel administrator password: 12 to 128 characters.
- The general rate limit applies.
Who can do this
| What | Needs |
|---|---|
| List and read servers, credits, usage, power | Server (view). A shared person reads the servers shared with them. |
| Add a server, manage a managed server's power, change the IP | Server (manage). |
| See or change the resize options | Resize (view or manage). |
| Delete a server | Server (manage). |
| List, restore or delete deleted servers | The organization owner. |
| Share a server | Share Server, and a login token. |
Common errors
- You do not have permission to do this in this organization. (403) Your role lacks the permission.
- Please verify your email address to continue. (
email_not_verified, 403) A managed server needs a verified email address. - A server with this IP address is already in ServerAvatar. (
server_ip_in_use, 422 or 409) The IP address is already in use. - The requested item was not found. (
not_found, 404) The server does not exist, is not ready where the route needs it, or you have no access.
Related
Integrations
API routes for cloud provider accounts, Git accounts, backup storage accounts and Cloudflare accounts of an organization.
Server panel
API routes for the server screens, from the dashboard, settings and system users to the firewall, Fail2ban, cron jobs, services, PHP, Node.js, Docker, logs, sync, alerts and databases.