API keys

Rotate API key

Replace a key: a new key with the same label and scopes (its token shown once in this response), and the old key kept working for graceSeconds (0 to 86400; 0 revokes it at once). One transaction. A rotating key does not count toward the 10-key cap; a rotation counts toward the 20 keys a day.

post/api_keys/{id}/rotate

Request

  • Base URL: https://arena-predictions.com/api/v1
  • URL: https://arena-predictions.com/api/v1/api_keys/{id}/rotate
  • Auth: one of:
    • API key in cookie sb-access-token
    • HTTP bearer

Path parameters

idstring uuid required

Request body

graceSecondsinteger

How long the old key keeps working. 0 revokes it at once.

expiresInDaysinteger

The new key's life. Omitted: the same life as the old key (at most 365 days), or none when the old key had none.

Response

Rotated.

tokenstring required

The new plaintext key. Shown once; only its hash is stored.

warningstring required

Changes

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