POST /keys/{key_id}/rotate
Deactivate the old key and issue a new one with the same settings. The new full key value is returned once.
Request
注記
This endpoint uses JWT authentication (your login token), not an API key.
curl -X POST https://your-domain.com/api/v1/keys/key-abc123/rotate \
-H "Authorization: Bearer <your-jwt-token>"
Response
{
"id": "key-def456",
"name": "production",
"prefix": "chu_live",
"key": "chu_live_yyyyyyyyyyyyyyyyyyyyyyyy",
"scopes": ["jobs:read", "jobs:write"],
"rate_limit_rpm": 60
}
警告
The old key is immediately deactivated. Update your applications to use the new key right away.