Rotate an API key
Makes a replacement for an API key, with the same permissions and reach. The old key keeps working for the overlap, so that you can move your programs over. The new key is shown once, in this response.
/_luna/tokens/{id}/rotateAuthorizationBearer token · headerrequiredAn account key (la_…), an API key (lt_…) or a session token (ls_…). The scopes listed are the permissions the operation needs.
tokens:writeidstringrequiredThe key's id: 16 hex characters.
application/jsonoverlapSecondsinteger<int64> | nullHow long the old key keeps working, in seconds. One hour when left out. 0 ends it at once.
nullThe replacement key.
idstringrequiredThe key's id, for revoking or rotating it.
tokenstringrequiredThe key. Send it as Authorization: Bearer <TOKEN>.
expiresMsinteger<int64> | nullWhen the key stops working, in milliseconds since the Unix epoch. Null when it does not expire.
The request failed. The status says how and error.message says why.
errorErrorDetailrequiredShow propertiesHide properties
codestring | nullA code for programs to branch on, when the error has one.
messagestringrequiredWhat went wrong, in a sentence a person can read.