Keys

Rotate API key

Creates a new key and schedules the old key for revocation after a 5-minute grace window. During the grace window both keys are valid. After the window, the old key stops working. The rotated key counts toward the 10-key limit during the grace period.

post/api/v1/keys/{keyID}/rotate

Request

  • Base URL: https://api.uptimemonitoring.com
  • URL: https://api.uptimemonitoring.com/api/v1/keys/{keyID}/rotate
  • Auth: HTTP bearer

Path parameters

keyIDinteger required

API key ID.

Request body

labelstring

Optional label for the new key. Trimmed of surrounding whitespace before persistence. Must be 3..100 characters after trimming, or omitted entirely.

Response

New key created. The key field contains the plaintext (shown once).

idinteger
account_idinteger
key_prefixstring
labelstring nullable
revoked_atstring date-time nullable
created_atstring date-time
keystring

Full plaintext API key. Shown once — store it securely.

Example response

{
  "key_prefix": "umk_live_a1b2c3d4",
  "key": "umk_live_a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6"
}

Changes

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