Create a server pool

Create a server pool. The warm servers boot from a snapshot of the team, or from a base image with a server_type. Send snapshot_id or image, not both. Warm servers boot a few at a time, so a large min_size fills over minutes. Each warm server is billed as a server of its type from its boot.

POST https://{availability_zone}.betterstackcloud.com/v1/servers/pools
Authorization string required

Bearer $TOKEN

Content-Type string

application/json

team_id string required

The ID of the team that owns the pool. betterstack team list shows it.

name string required

The pool's name, unique in the team. Up to 63 lowercase letters, digits and hyphens, starting and ending with a letter or digit.

image string

The slug of the base image to boot from. List the images with betterstack image list. Send a server_type with image. Can't be changed after the pool is created.

snapshot_id string

The ID of an available snapshot of the team to boot from. The warm servers get the snapshot's server type. Can't be changed after the pool is created.

server_type string

The server type of the warm servers. List the server types with betterstack server-type list. Required with image. With snapshot_id, leave server_type out or send the snapshot's type. Can't be changed after the pool is created.

min_size integer default: 0

The fewest warm servers the pool aims for.

max_size integer default: 0

The most warm servers the pool aims for, counted toward the server_pool_size quota.

growth_multiplier number default: 2.0

The factor target_size is multiplied by when a claim finds the pool empty, from 1 to 10. 1 turns growing off.

shrink_multiplier number default: 0.8

The factor target_size is multiplied by when the pool has had no claim for idle_minutes. More than 0 and at most 1. 1 turns shrinking off.

idle_minutes integer default: 5

Minutes without a claim before the pool shrinks, from 1 to 1440.

enabled boolean default: true

Whether the pool keeps warm servers. Send false to create the pool without warm servers.

public_ipv4 boolean default: true

Whether the warm servers get a public IPv4 address. A warm server without one has only IPv6. Can't be changed after the pool is created.

defaults object

What every warm server gets when it boots, such as ssh_keys, firewalls, private networks and tags. Any other key is refused.

defaults.ssh_keys array of strings

The slugs of the SSH keys to add.

defaults.firewall_ids array of strings

The IDs of the firewalls to attach.

defaults.network_ids array of strings

The IDs of the private networks to join.

defaults.metadata object

Tags as string pairs. Accepts any keys.

201 Created
{
  "id": "example",
  "name": "Example server pool",
  "server_type": "AM1",
  "snapshot_id": "123456789",
  "image": "ubuntu-26-04",
  "min_size": 0,
  "max_size": 0,
  "growth_multiplier": 2.0,
  "shrink_multiplier": 0.8,
  "idle_minutes": 5,
  "enabled": true,
  "public_ipv4": true,
  "defaults": {
    "ssh_keys": [
      "example"
    ],
    "firewall_ids": [
      "123456789"
    ],
    "network_ids": [
      "123456789"
    ],
    "metadata": {
      "example": "value"
    }
  },
  "target_size": 1,
  "available": 1,
  "warming": 1,
  "claims_total": 1,
  "created_at": "2026-07-01T12:00:00.000Z",
  "updated_at": "2026-07-01T12:00:00.000Z",
  "team_id": "t123"
}

Returns the newly created server pool.

id string

The pool's ID, a UUID.

name string

The pool's name, unique in the team. Up to 63 lowercase letters, digits and hyphens, starting and ending with a letter or digit. Warm servers are named after the pool, with 6 hex characters added, until a claim renames them.

server_type string

The server type of the warm servers. For a pool that boots from a snapshot, it's the snapshot's type.

snapshot_id string or null

The ID of the snapshot the warm servers boot from, or null for a pool that boots from an image.

image string or null

The slug of the base image the warm servers boot from, or null for a pool that boots from a snapshot.

min_size integer

The fewest warm servers the pool aims for, from 0 up to max_size.

max_size integer

The most warm servers the pool aims for. Together, the max_size of all the organization's pools can't be more than its server_pool_size quota.

growth_multiplier number

The factor target_size is multiplied by when a claim finds the pool empty, from 1 to 10. 1 turns growing off.

shrink_multiplier number

The factor target_size is multiplied by each minute while the pool is full and has had no claim for idle_minutes. More than 0 and at most 1. 1 turns shrinking off.

idle_minutes integer

Minutes without a claim before the pool shrinks, from 1 to 1440.

enabled boolean

Whether the pool keeps warm servers. A disabled pool removes all its warm servers and keeps its settings. A claim on a disabled pool is refused.

public_ipv4 boolean

Whether the warm servers get a public IPv4 address. A warm server without one has only IPv6.

defaults object

What every warm server gets when it boots, such as ssh_keys, firewalls, private networks and tags. When a claim adds nothing to these, the server is ready as soon as the claim returns.

defaults.ssh_keys array of strings

The slugs of the SSH keys to add.

defaults.firewall_ids array of strings

The IDs of the firewalls to attach.

defaults.network_ids array of strings

The IDs of the private networks to join.

defaults.metadata object

Tags as string pairs.

target_size integer

The number of warm servers the pool aims for, from min_size to max_size. The target changes as claims come in, and is 0 while the pool is disabled.

available integer

How many warm servers a claim can get now.

warming integer

How many warm servers are still booting.

claims_total integer

How many claims the pool has served.

created_at datetime

When the pool was created. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

updated_at datetime

When the pool was last updated. In ISO 8601 format, such as 2026-07-01T12:00:00Z.

team_id string

The ID of the team that owns the pool and its servers.