Skip to the page

Shorten a key's expiry, lower its spend cap or set its IP allow-list

PATCH/v1/organisations/{id}/agent-keys/{keyId}

Operation agents.keyUpdate · since 2026-11-10 · beta

Needs a session withwritescopeAnswers200 OK

The key.

Path parameters

idstring (uuid)required
The organisation id.
keyIdstringrequired
The key.

Body (JSON)

expiresAtstring (date-time)optional
Only sooner.
spendCapUsdnumberoptional
Only lower.
ipAllowarray of addresses or CIDR rangesoptional
Where it works from.

Errors

Every error is { "error", "message", "detail"? } (Errors and references). Besides the codes any route can answer, this one refuses with:

  • only_shorter
  • only_lower
PATCH/v1/organisations/{id}/agent-keys/{keyId}
curl -X PATCH "https://api.rykloud.com/v1/organisations/$ORG_ID/agent-keys/$KEY_ID" \
  -H "Authorization: Bearer $RYKLOUD_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "spendCapUsd": 10
}'