Skip to Content
Docs

Issue a new secret for a token and reset its expiry

POST
/api/user/tokens/{token_id}/regenerate

Name, scopes and restrictions stay; the old secret stops working at once. expires_in_days is optional and defaults to the lifetime the token was last issued with. An expired token can be renewed this way; a revoked one cannot. The plaintext token is returned here and never again.

Not available to personal access tokens; call it from a signed-in session.

Authorization

bearer
headerAuthorizationBearer <token>

A session token or a personal access token. Leave it empty when the instance runs without authentication (AUTH_TYPE unset).

Path Parameters

token_id*string

Response Body

Success

Example Request
curl -X POST 'http://localhost:7091/api/user/tokens/string/regenerate'
Example Response200
Empty