# Set the default team

`POST https://console.advinservers.com/api/v1/client/teams/{team}/default`

### Overview

Makes this team the account's default and returns it. Exactly one team is the default. New server orders and requests without a selected team use this team. Existing resources are not moved. Only the owner can change the default; other callers receive 404.

### Permissions

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

## Authorization

Send `Authorization: Bearer <token>` with the request. 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.

## Path parameters

- `team` (string, required): The team uuid short

## Response 200

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

- `id` (string, required): The id ID.
- `uuid_short` (string, required): The value of `uuid_short`.
- `name` (string, required): The name shown to customers.
- `is_owner` (boolean, required): Whether the resource is owner.
- `is_default` (boolean, required): 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_active` (boolean, required): 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_mode` (string, required): Whether the team pays up front or by the hour on a monthly invoice. Chosen at creation and never changed. One of: `prepaid`, `postpaid`.
- `owner` (object, required): The value of `owner`.
  - `name` (string | null, required): The name shown to customers.
  - `email` (string | null, required): The email address.
  - `gravatar_url` (string | null, required): The value of `gravatar_url`.
- `role` (object | null, required): The value of `role`.
  - `id` (string, required): The id ID.
  - `uuid_short` (string, required): The value of `uuid_short`.
  - `name` (string, required): The name shown to customers.
  - `is_system` (boolean, required): Whether the resource is system.
- `permissions` (string[], required): The value of `permissions`.
- `can_leave` (boolean, required): Only the owner may leave nothing behind; an owner cannot leave their own account, which is why this is not simply `! is_owner`.
- `members_count` (integer | null, required): The number of members count.
- `held_resources` (object | array | null, required): 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_at` (string | null, required): 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.

```json
{
  "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"
}
```

## 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.
- `404`: The resource was not found in the selected team. Resources in another account or team also return 404.
- `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.

## Example request

```bash
curl --request POST \
  --url 'https://console.advinservers.com/api/v1/client/teams/{team}/default' \
  --header 'Authorization: Bearer <token>' \
  --header 'Accept: application/json'
```
