service-accounts

Rotate API Key

Mints a replacement key carrying the outgoing key's name/scope/expiry, and pulls the outgoing key's own expiry in to now+grace_seconds (0..86400, default 0) instead of revoking it outright — a grace of 0 stops it on its very next use.

post/service-accounts/{id}/api-keys/{keyId}/rotate

Request

  • Base URL: https://api.instruxi.dev/api/v1/enforcer
  • URL: https://api.instruxi.dev/api/v1/enforcer/service-accounts/{id}/api-keys/{keyId}/rotate
  • Auth: one of:
    • API key in header Authorization
    • API key in header X-API-Key

Path parameters

idstring required

id

keyIdstring required

api key id

Request body

grace_secondsinteger

GraceSeconds is how long the OUTGOING key keeps working, 0..86400 (default 0 — AGENTS_CONTRACT §6.1).

Response

OK

successboolean

Example response

{
  "data": {
    "key": "env3_AbCdEf…"
  },
  "success": true
}

Changes

No recorded changes to this operation across all 1 revision of this API.