Skip to content

Create a team

POST/teams

Overview

Creates an empty team owned by your account. Send name with 1 to 191 characters and no control characters. Duplicate names are allowed. Optionally send billing_mode as prepaid or postpaid; it cannot be changed later. Without it the team is postpaid when postpaid billing is on for your account, and prepaid otherwise. Accounts opened from the sign-up form can only create postpaid teams. The team starts with Admin, Member and Restricted roles. It does not become the default team.

Permissions

Requires the account permission teams.manage (Manage teams).

curl --request POST \
  --url 'https://console.advinservers.com/api/v1/client/teams' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Hazard Course"
}'
{
  "id": "fbb31f5f-bd6f-4019-a3ed-1062a28f56f7",
  "uuid_short": "Uuid short",
  "name": "Anomalous Materials",
  "is_owner": true,
  "is_default": true,
  "is_active": true,
  "billing_mode": "prepaid",
  "owner": {
    "name": "Gordon Freeman",
    "email": "gordon.freeman@blackmesa.example.com",
    "gravatar_url": "https://www.gravatar.com/avatar/6108e5fddd878d82e464d4282b011ed7?s=64&d=404"
  },
  "role": null,
  "permissions": [
    "team.read",
    "team.manage",
    "alert.read",
    "alert.manage",
    "server.read",
    "server.power",
    "server.console",
    "server.update",
    "server.credentials",
    "server.reinstall",
    "server.transfer",
    "backup.read",
    "backup.create",
    "backup.restore",
    "backup.download",
    "backup.delete",
    "snapshot.read",
    "snapshot.create",
    "snapshot.restore",
    "snapshot.delete",
    "snapshot.update",
    "snapshot.transfer",
    "firewall.read",
    "firewall.update",
    "firewall.delete",
    "network.read",
    "network.update",
    "network.transfer",
    "network.delete",
    "sshkey.read",
    "sshkey.update",
    "sshkey.delete",
    "script.read",
    "script.update",
    "script.delete",
    "iso.read",
    "iso.update",
    "iso.delete",
    "measured_boot.read",
    "measured_boot.update",
    "measured_boot.delete",
    "billing.read",
    "billing.manage",
    "billing.purchase"
  ],
  "can_leave": false,
  "members_count": 1,
  "held_resources": {
    "servers": 2,
    "ssh_keys": 2,
    "firewall_groups": 1,
    "private_networks": 1,
    "floating_ips": 1,
    "snapshots": 1,
    "backups": 3,
    "snapshot_storages": 1
  },
  "created_at": "2025-11-18T21:07:44+00:00"
}

Authorization

Authorizationstringheaderrequired

Your API key, sent as a bearer token. Create one in the control panel under API Keys, give it only the permissions the integration needs, and copy it when it is created. It cannot be shown again. Each key is restricted to one owned team. The key determines the team for every request.

Send it as Bearer <token>.

Body

application/json
namestringrequired

The name shown to customers.

1 to 191 characters

Must match ^[^\p{C}]+$

billing_modestring

The value of billing_mode.

One of: prepaid, postpaid

Response 200

application/json

The record, as a JSON object. There is no envelope.

idstringrequired

The id ID.

uuid_shortstringrequired

The value of uuid_short.

namestringrequired

The name shown to customers.

is_ownerbooleanrequired

Whether the resource is owner.

is_defaultbooleanrequired

Where a resource lands when nothing has said otherwise, and the team a session falls back to. Exactly one of an account's teams carries it, which the database enforces rather than trusts.

is_activebooleanrequired

Which team the browser is currently working in, compared against the id the resolver settled on rather than against the raw session key. An account may own several teams, so "the one you own" stopped being an answer the moment the session key was empty - every one of them would have read as active at once.

billing_modestringrequired

Whether the team pays up front or by the hour on a monthly invoice. Chosen at creation and never changed.

One of: prepaid, postpaid

ownerobjectrequired

The value of owner.

Show child attributes
namestring | nullrequired

The name shown to customers.

emailstring | nullrequired

The email address.

gravatar_urlstring | nullrequired

The value of gravatar_url.

roleobject | nullrequired

The value of role.

Show child attributes
idstringrequired

The id ID.

uuid_shortstringrequired

The value of uuid_short.

namestringrequired

The name shown to customers.

is_systembooleanrequired

Whether the resource is system.

permissionsstring[]required

The value of permissions.

can_leavebooleanrequired

Only the owner may leave nothing behind; an owner cannot leave their own account, which is why this is not simply ! is_owner.

members_countinteger | nullrequired

The number of members count.

held_resourcesobject | array | nullrequired

What is still inside the team, so the listing can say it before a deletion is attempted rather than only in the refusal that comes back from one. Both are read from the same method deliberately: a preview that disagreed with the refusal would send somebody looking for a server that is not where they were told it was.

created_atstring | nullrequired

Written out with an explicit format rather than left to the date serialiser, because that is what the transformer this replaces published: seconds and an offset, not microseconds and a Z.

Errors

401
The key was missing, malformed, revoked, or belongs to an account that no longer exists.
403
Access denied. Check the key's team, permissions and allowed IP addresses. Some actions, such as managing API keys, require a browser session. The response message explains the reason.
422
A field is missing or invalid, or the resource cannot accept this change in its current state. Check message for details. Field validation also includes an errors object keyed by field name.
429
Too many requests. The Retry-After header says how many seconds to wait. Limits are per account, so several keys on one account share them.