Skip to content

Configure a capacity pool

POST
/capacity-pools
curl --request POST \
--url https://quikstik-core.fly.dev/capacity-pools \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-tenant-id: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--data '{ "pool_key": "example", "target": 1, "allowance_kind": "fixed", "allowance_value": 1, "parent_key": "example" }'

Operator-scoped, authoritative provisioning of a capacity pool’s configuration: its target, allowance (a fixed unit count or a percentage of target), and optional parent in the nesting tree. Resolves against operator effect authority; this is not a customer surface. Creates or replaces the pool (a re-config preserves the committed count). A structural nesting refusal (self / cycle / unknown parent / parent-has-events) returns 422.

x-tenant-id
required
string format: uuid

Tenant identifier (UUID).

Authn/authz semantics are intentionally TBD for this contract slice; this header exists to keep the contract explicitly multi-tenant from day 0.

Media typeapplication/json
object
pool_key
required

The pool key to configure (a departure/slot leaf or a fleet root).

string
>= 1 characters
target
required

Sellable units before allowance.

integer
<= 4294967295
allowance_kind
required
string
Allowed values: fixed percent
allowance_value
required

Interpreted per allowance_kind; for percent it must be 0..=255.

integer
<= 4294967295
parent_key

Optional parent pool key in the nesting tree.

string
>= 1 characters

Capacity pool configured

Malformed command (empty key, unknown allowance kind, percent out of range) or a rejected nesting placement