v126

latestOpenAPI 3.1.0MITraw.githubusercontent.com2026-08-04957391.2 MB
Guardrails

Bulk assign keys to a guardrail

Assign multiple API keys to a specific guardrail. A key may hold at most one guardrail; assigning replaces any existing assignment. Management key required.

post/guardrails/{id}/assignments/keys

Path parameters

idstring uuid required

The unique identifier of the guardrail

Example:550e8400-e29b-41d4-a716-446655440000

The unique identifier of the guardrail

Request body

key_hashesstring[] required

Array of API key hashes to assign to the guardrail

Example request

{
  "key_hashes": [
    "c56454edb818d6b14bc0d61c46025f1450b0f4012d12304ab40aacb519fcbc93"
  ]
}

Response

Assignment result

assigned_countinteger required

Number of keys successfully assigned

Example response

{
  "assigned_count": 3
}