Skip to main content

keys.revoke

Revokes an API key, immediately preventing all access. This endpoint requires Clerk JWT authentication.

Authentication

Parameters

string
required
UUID of the API key to revoke (from keys.list)

Response

boolean
Returns true if the key was successfully revoked

Examples

Revoking a key immediately stops all applications using that key. Make sure to update your applications with a new key before revoking the old one.

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

If you suspect a key has been exposed:
Clean up keys that are no longer in use:
Revoke keys when team members leave:

List API Keys

Find keys to revoke

Create API Key

Create a replacement key

Authentication Guide

Learn about key security