FruxonDocs
ApiServiceaccounts

Rotate a service account's credential.

Mints a fresh API key for the service account and revokes its other active keys. Zero-downtime — the new key is live before the old ones are retired. The new key's plaintext secret is returned once.

POST
/v1/tenants/{tenant}/serviceAccounts/{serviceAccount}:rotate
AuthorizationBearer <token>

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.

In: header

Path Parameters

serviceAccount*string

The unique identifier of the service account.

tenant*string

The tenant identifier

Query Parameters

keyExpirationDays?integer

Optional expiry, in days, for the new key. Omit for a key that never expires.

Formatint32

Response Body

curl -X POST "https://api.fruxon.com/v1/tenants/string/serviceAccounts/string:rotate"
{
  "id": "string",
  "name": "string",
  "token": "string",
  "keyPrefix": "string",
  "scopes": [
    "string"
  ],
  "createdAt": 0,
  "expiresAt": 0,
  "type": "USER",
  "createdBy": "string"
}
Empty
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}