Skip to main content
POST
Create a capacity policy

Authorizations

Authorization
string
header
required

API key as bearer token in Authorization header

Body

application/json
config
object
required
Example:
name
string
required

Policy name

Required string length: 1 - 255
Example:

"Engineering monthly budget"

policy_type
enum<string>
required
Available options:
rate_limit
workspace_id
string<uuid>
required

Workspace the capacity policy belongs to. Capacity policies require an organization-scoped management key.

Example:

"0df9e665-d932-5740-b2c7-b52af166bc11"

api_key_hashes
string[]

API key hashes

Required string length: 1 - 255
Example:
is_workspace_default
boolean

Make this the workspace default for its policy type. Defaults to false.

member_ids
string[]

Organization member user IDs

Required string length: 1 - 255
Example:
move_existing_assignments
boolean

When creating a new workspace default, also move the replaced default policy's explicit member and API key assignments onto this policy. Defaults to false.

opted_out_api_key_hashes
string[]

API keys that should not inherit the policy when it is the workspace default

Required string length: 1 - 255
Example:
opted_out_member_ids
string[]

Members that should not inherit the policy when it is the workspace default

Required string length: 1 - 255
Example:

Response

capacity policy created

data
object
required