Skip to main content
PUT
Change an API key policy assignment

Authorizations

Authorization
string
header
required

API key as bearer token in Authorization header

Path Parameters

hash
string
required

API key hash

Minimum string length: 1
Example:

"c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"

Body

application/json
assigned
boolean
required

true assigns the policy to the subject, false removes it

Example:

true

expected_assignment
object
required

The assignment state last read for the subject. The request fails with 409 if it changed since.

policy_id
string<uuid>
required

Policy ID

Example:

"550e8400-e29b-41d4-a716-446655440000"

policy_type
enum<string>
required

Policy type the assignment is read or changed for

Available options:
budget,
model_availability,
moderation,
rate_limit
Example:

"budget"

workspace_id
string<uuid>
required

Workspace the policy belongs to

Example:

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

Response

Assignment changed

data
boolean
required

Whether the assignment changed

Example:

true