clerk.update_api_key
Update an API key in a connected Clerk application.
Call clerk.get_connected_accounts first. Pass clerk_instance_id to target a specific connection, or omit it to use the default account.
Returns the updated API key summary.
Cost = 8 tokens.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| claims | No | Updated custom claims for tokens minted from this API key. | |
| scopes | No | Updated permission scopes for the API key. | |
| subject | No | Updated subject (user_... or org_...). | |
| api_key_id | Yes | Clerk API key id (ak_...) to retrieve, update, delete, or revoke. | |
| description | No | Updated description for the API key. | |
| clerk_instance_id | No | Clerk instance id (ins_...) from clerk.get_connected_accounts. Omit to use the default connected account. | |
| seconds_until_expiration | No | Updated seconds until expiration from now. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| api_key | No | Updated Clerk API key from the Backend API. |