API ReferenceTenantsIdKeysKeyidRotate
Rotate a tenant key
Mint a successor to one of the tenant's keys. The old key keeps working for graceHours (default 24, at most 168), so you can move over without downtime. 0 revokes it at once. Partner accounts only: call it with your partner account's account-wide key, which needs the admin scope, and without X-Tenant-Id.
AuthorizationBearer <token>
API key in the Authorization header: Authorization: Bearer ace_live_.... Use an ace_test_... key for the free, rate-capped sandbox.
In: header
Path Parameters
id*string
Format
uuidkeyId*string
Format
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/tenants/497f6eca-6276-4993-bfeb-53cbbbba6f08/keys/497f6eca-6276-4993-bfeb-53cbbbba6f08/rotate" \ -H "Content-Type: application/json" \ -d '{}'{ "data": { "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "tenantId": "f97df110-f4de-492e-8849-4a6af68026b0", "name": "string", "env": "live", "keyPrefix": "ace_live_Ab12Cd34", "scopes": [ "string" ], "rateLimitPerMinute": 0, "expiresAt": "2019-08-24T14:15:22Z", "lastUsedAt": "2019-08-24T14:15:22Z", "rotatedAt": "2019-08-24T14:15:22Z", "graceExpiresAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "key": "string" }}