Regenerate a token
Regenerate a token
Issue a new secret for an existing token, invalidating the old one.
Keeps the id, name and scopes; replaces the secret. The old secret stops working immediately — for a zero-downtime rotation, create a second token instead.
POST
/v1/tokens/{id}/regeneratePath parameters
idstringrequiredtok_….
curl -X POST https://api.logstreem.com/v1/tokens/{id}/regenerate \
-H "Authorization: Bearer $LOGSTREEM_TOKEN"Responses
200OK
{
"object": "token",
"id": "tok_1d7e4b3a09c2f856d4a1",
"name": "CI ingest",
"token": "lstrm_live_4a81e0c3f6a5b2d1e0c9",
"regenerated_at": "2026-09-06T09:20:00.000Z"
}401Unauthorized
{
"error": {
"type": "authentication_error",
"code": "missing_token",
"message": "No API token provided.",
"doc_url": "https://logstreem.com/docs/errors#missing_token",
"request_id": "req_9f3c2a7b41de08c5b2e6"
}
}Try itsandbox