keys.revoke
Revokes an API key, immediately preventing all access. This endpoint requires Clerk JWT authentication.
Authentication
Parameters
Response
Examples
Key Rotation Workflow
1
Create a new API key
2
Update your applications
Update environment variables in all environments:Deploy the updates to all services.
3
Verify the new key works
Test your application to ensure the new key is working correctly.
4
Revoke the old key
Old key is now revoked and cannot be used.
Use Cases
Compromised key
Compromised key
If you suspect a key has been exposed:
Unused keys
Unused keys
Clean up keys that are no longer in use:
Employee offboarding
Employee offboarding
Revoke keys when team members leave:
Related Endpoints
List API Keys
Find keys to revoke
Create API Key
Create a replacement key
Authentication Guide
Learn about key security