fastmon Docs
Api keys

Rotate an API key

Report an issue

Issue a successor with the same name, scopes and reach, and retire this one. The response carries the new secret, and nothing shows it again.

Mint conditions apply, because whoever rotates walks away with a working secret: the scopes are re-checked against what this person holds today, so a key cannot outlive its creator's authority by being rotated. That is the same precondition editing carries, and it is literally the same call.

grace_period_hours keeps the old secret alive for a while, so a deploy can reach every consumer before it stops.

Authorization

bearerAuth
AuthorizationBearer <token>

API token generated from the fastmon dashboard (Account → API Token) or at organization level (fmo_…, one that outlives its creator). Send as Authorization: Bearer fm_... or paste the full token (including its prefix) into the Authorize dialog.

In: header

Path Parameters

org_id*Org Id
Formatuuid
key_id*Key Id
Formatuuid

Request Body

application/json

Replace a key's secret, optionally letting the old one live a little.

The successor copies name, scopes and reach, so nothing about what the credential may do changes - only the secret does. Rotating therefore carries the mint conditions: whoever does it sees a new secret, and it is checked against what they hold today rather than what the original minter held.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

POST
/organizations/{org_id}/api-keys/{key_id}/rotate
curl -X POST "https://example.com/organizations/497f6eca-6276-4993-bfeb-53cbbbba6f08/api-keys/497f6eca-6276-4993-bfeb-53cbbbba6f08/rotate" \  -H "Content-Type: application/json" \  -d '{}'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "kind": "personal",  "name": "string",  "prefix": "string",  "last4": "string",  "scopes": [],  "expires_at": "2019-08-24T14:15:22Z",  "last_used_at": "2019-08-24T14:15:22Z",  "reach": {    "scope": "string",    "partner_org_id": "6d083317-c55a-4f41-82ae-8c86d8187f47",    "organization_ids": [],    "organization_count": 0  },  "created_at": "2019-08-24T14:15:22Z",  "revoked_at": "2019-08-24T14:15:22Z",  "editable": true,  "key": "string"}