Skip to content
StraventaDocs

Rotate the service-account API key

Permission-gated on `platform.service_account.rotate_key`. Invalidates every active key and inserts a fresh one atomically. The returned plaintext is shown exactly once. No request body is required.

POST
/v1/admin/service-accounts/{id}/rotate-key

Permission-gated on platform.service_account.rotate_key. Invalidates every active key and inserts a fresh one atomically. The returned plaintext is shown exactly once. No request body is required.

Authorization

bearerAuth
AuthorizationBearer <token>

JWT Bearer access token. Clock skew tolerance is ±60 seconds.

In: header

Path Parameters

id*string
Formatuuid

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/admin/service-accounts/497f6eca-6276-4993-bfeb-53cbbbba6f08/rotate-key"
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "key": "string"
}
{
  "error": "unauthenticated",
  "message": "missing or invalid bearer token",
  "request_id": "req_01abc123"
}
{
  "error": "permission_denied",
  "message": "caller does not hold the required permission",
  "request_id": "req_01abc124"
}
{
  "error": "not_found",
  "message": "the requested resource was not found",
  "request_id": "req_01abc125"
}

Was this page helpful?