ServerAvatarDocs
API Reference

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
}
FieldValues
sourcecloud (your cloud account), managed, root_password, install_command, connect_oss (a connected OSS panel) or lite.
statuspending, creating, installing, connecting, ready or failed.
stacklemp, lamp, mern, ols or docker.
connectiononline, 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

RoutePurpose
GET /organizations/{organization}/serversList the servers of the organization.
GET /organizations/{organization}/servers/{server}One server.
POST /organizations/{organization}/servers/{server}/status-checkCheck the connection now and return the server with a live block.
GET /shared-serversServers other people shared with you. Login token.

GET /organizations/{organization}/servers

A paged list. Permission: Server (view).

QueryTypeRules
pageintegerFrom 1.
per_pageinteger1 to 50. The default is 12.
searchstring1 to 100 characters. Matches name, hostname, public IP, provider, stack or operating system.
filter[is_managed]booleantrue, false, 1 or 0. Only managed servers, or only the others.
sortstringname, -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:

FieldTypeRequiredRules
panel_admin_usernamestringwith panel_admin_password3 to 32 letters, digits, - and _.
panel_admin_passwordstringwith panel_admin_username12 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:

RouteReturns
GET .../servers/cloud/accountsYour connected cloud provider accounts, and meta.supported_providers.
GET .../servers/cloud/accounts/{cloudProviderAccount}/regionsThe 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

FieldTypeRequiredRules
cloud_provider_account_idintegeryesAn account of this organization.
namestringyesAt most 63 characters. Letters, digits, . and -. Each provider has stricter rules (Vultr, Lightsail and Linode); the error message says which.
regionstringyesAt most 50 characters: lowercase letters, digits and -.
sizestringyesAt most 100 characters: lowercase letters, digits, _, . and -.
ubuntustringyes22.04, 24.04 or 26.04.
stackstringyesSee above.
ssh_public_keystringnoOne line, at most 4000 characters, a complete ssh-ed25519, ssh-rsa or ecdsa-sha2-nistp256/384/521 key.
root_passwordstringLinode onlyAt most 128 characters, at least 11, with a lowercase letter, an uppercase letter, a digit and one of @ $ ! % * # ? &. Refused for other providers.
zonestringLightsail onlyThe availability zone, for example us-east-1a. Must belong to region. Refused for other providers.
panel_admin_username, panel_admin_passwordstringnoAs 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.

FieldTypeRequiredRules
namestringyesAt most 100 characters.
stackstringyesSee above.
ipstringyesThe public IPv4 address of the server.
ssh_portintegerno1 to 65535.
root_passwordstringyesAt most 255 characters. Central uses it for the install and does not keep it.
panel_admin_username, panel_admin_passwordstringnoAs above.

POST /organizations/{organization}/servers/install-command

Makes a server record and an install command to run on the server yourself.

FieldTypeRequiredRules
namestringyesAt most 100 characters.
stackstringyesSee above.
panel_admin_username, panel_admin_passwordstringnoAs 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.

FieldTypeRequiredRules
api_urlstringyesThe panel's API address, at most 255 characters.
tokenstringyesThe Central token from the panel. It starts with sv_central_, has no spaces, and is at most 255 characters.
namestringnoAt 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.

RoutePurposePermission
GET .../servers/managed/plansThe plans you can buy, and the providers and regions that have them. Query: provider, region.Server (manage)
GET .../servers/managed/creditsThe organization owner's credits.Server (view)
POST .../servers/managedCreate a managed server. Needs a verified email.Server (manage)
GET .../servers/{server}/managed/usageCharges for a managed server.Server (view)
GET .../servers/{server}/managed/powerThe power state.Server (view)
POST .../servers/{server}/managed/powerPower on or off.Server (manage)
GET .../servers/{server}/managed/resizeThe resize options.Resize (view)
PATCH .../servers/{server}/managed/resizeResize 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

FieldTypeRequiredRules
plan_idintegeryesThe id of a plan from the plan list.
namestringyesAt most 63 characters, with the name rules of the plan's provider.
ubuntustringyes22.04, 24.04 or 26.04.
stackstringyeslemp, lamp, mern, ols or docker.
ssh_public_keystringnoAs 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/usage returns monthly_price, billing_started_at, billed_until, billing_stopped_at, this_month and total (each with hours and amount) and last_charged_at.
  • GET .../servers/{server}/managed/power returns { "data": { "state": "..." } }.
  • POST .../servers/{server}/managed/power takes action, on or off. 202 with data.state and the message The server is being powered on. or The server is being powered off. You cannot power a server on or off while the credits are used up.
  • GET .../servers/{server}/managed/resize returns current (plan, size, monthly price, disk), power, disk_option, migration_option, resize (the running or last resize) and plans, each with allowed, reason and reason_label.
  • PATCH .../servers/{server}/managed/resize takes plan_id (required), disk (boolean, only where disk_option is true) and migration_type (cold or warm, only where migration_option is true). 202 with data.status running and the message The 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).

FieldTypeRequiredRules
public_ipstringyesA 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.

FieldTypeRequiredRules
delete_at_providerbooleannoAlso 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

RoutePurpose
GET /organizations/{organization}/deleted-serversList 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}/restoreRestore 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.

RoutePurpose
GET .../servers/{server}/sharesList the shares of a server (paged: page, per_page 1 to 50, default 25).
POST .../servers/{server}/sharesShare 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}/resendSend a new sign-up link to a pending share.
GET /shared-serversThe 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}/menuThe screens of a shared server that you may open.
DELETE /shared-servers/{server}/accessLeave a shared server. 204.

... stands for /organizations/{organization}.

POST .../servers/{server}/shares

FieldTypeRequiredRules
emailstringyesA valid email address, at most 254 characters.
permissionsarrayyes1 to 100 items.
permissions.*.namestringyesA permission that can be shared. Use GET /organizations/{organization}/permissions?type=shared for the list. No repeats.
permissions.*.viewbooleannoView access.
permissions.*.managebooleannoManage 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

WhatNeeds
List and read servers, credits, usage, powerServer (view). A shared person reads the servers shared with them.
Add a server, manage a managed server's power, change the IPServer (manage).
See or change the resize optionsResize (view or manage).
Delete a serverServer (manage).
List, restore or delete deleted serversThe organization owner.
Share a serverShare 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.

On this page