POST /admin/tenants/{tenant_id}/api-keys/{key_id}/rotate
Rotate an API Key, generating a new key and immediately invalidating the old one.
Tenant Service `bearerAuth` application/json
Request Parameters
| Name | In | Type | Required | Default | Example | Constraints | Description |
id |
path |
string |
Yes |
|
|
|
Tenant ID |
key_id |
path |
string |
Yes |
|
|
|
API Key ID |
Referenced Schemas
dto.DataResponse-dto_RotateApiKeyResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
data |
dto.RotateApiKeyResponse |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|
dto.RotateApiKeyResponse
| Field | Type | Required | Example | Constraints | Description |
api_key |
string |
No |
tk_f6e7d8c9a0b1... |
|
|
created_at |
string |
No |
2026-05-12T16:00:00Z |
|
|
id |
string |
No |
tak_001 |
|
|
key_prefix |
string |
No |
tk_f6e7d8c9 |
|
|
message |
string |
No |
Please save the new API Key immediately; the old key is no longer valid |
|
|
gitee_com_linmes_authms_base_dto.SimpleResponse
| Field | Type | Required | Example | Constraints | Description |
code |
integer |
No |
|
|
|
message |
string |
No |
|
|
|
timestamp |
string |
No |
|
|
|