Configure a capacity pool
const url = 'https://quikstik-core.fly.dev/capacity-pools';const options = { method: 'POST', headers: { 'x-tenant-id': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"pool_key":"example","target":1,"allowance_kind":"fixed","allowance_value":1,"parent_key":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Header Parameters
Section titled “Header Parameters”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.
Request Bodyrequired
Section titled “Request Bodyrequired”object
The pool key to configure (a departure/slot leaf or a fleet root).
Sellable units before allowance.
Interpreted per allowance_kind; for percent it must be 0..=255.
Optional parent pool key in the nesting tree.
Responses
Section titled “Responses”Capacity pool configured
Malformed command (empty key, unknown allowance kind, percent out of range) or a rejected nesting placement