API keys
Roll an API key
No API key can call this route. It needs a signed-in dashboard user with the right role; a key answers 403. About scopes
POST
/
api/v1/api-keys/{id}/rollAuthorization
AuthorizationRequiredBearer <token>
An API key: gpy_test_… or gpy_live_… (or an agent key, agk_…).
In: header
Request Body
application/jsonOptionaloverlap_hoursinteger
Hours the old key keeps working. 0 stops it at once. Default 24.
Minimum:
0Maximum: 24Path Parameters
idRequiredstring
Format:
"uuid"Header Parameters
Idempotency-Keystring
A unique value for this operation, chosen by you. A retry with the same key and the same body returns the first response instead of running again. The same key with a different body answers 409 idempotency_key_reused; a key whose first request is still running answers 409 idempotency_in_progress.
Key rolled. Store secret now; it is unrecoverable.