Create Clerk API key

Create an API key for a subject in a connected Clerk application.

← All Clerk endpoints · Capability overview

POST/v1/clerk/api-keys

https://api.vee3.io/v1/clerk/api-keys

10 tokens

Create an API key for a subject in a connected Clerk application.

Authorization

Send your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

MCP

The same capability is available as an MCP tool on Vee3 hosted MCP.

Tool name

clerk.create_api_key
Parameters9 fields
clerk_instance_idstringOptional

Clerk instance id (ins_...) from clerk.get_connected_accounts. Omit to use the default connected account.

namestringRequired

Human-readable name for the new API key.

subjectstringRequired

Subject the API key is scoped to (user_... or org_...).

key_typestringOptional

API key type (typically "api_key").

descriptionstringOptional

Optional description for the API key.

claimsobjectOptional

Custom claims to embed in tokens minted from this API key.

scopesarrayOptional

Permission scopes to grant the API key.

created_bystringOptional

User id to record as the creator of this API key.

seconds_until_expirationnumberOptional

Seconds from creation until the API key expires.

Response17 fields
api_keyobject
16 fields

Newly created Clerk API key from the Backend API.

idstring

Clerk API key id (ak_...).

namestring

Human-readable API key name.

subjectstring

Subject the API key is scoped to (user_... or org_...).

key_typestring

API key type (typically "api_key").

descriptionstring

Optional description for the API key.

claimsobject
1 field

Custom claims embedded in tokens minted from this API key.

claim_keystring

A key in the custom claims object.

scopesarrayitems
1 field

Permission scopes granted to this API key.

itemstring

A single scope string.

created_bystring

User id that created the API key, when set.

created_atinteger

Unix timestamp in milliseconds when the API key was created.

updated_atinteger

Unix timestamp in milliseconds when the API key was last updated.

expirationinteger

Unix timestamp in milliseconds when the API key expires, if set.

revokedboolean

Whether the API key has been revoked.

revocation_reasonstring

Reason recorded when the API key was revoked.

secretstring

API key secret value. Treat as high-privilege — do not log.

HTTP errors: clerk_connection_required, clerk_connection_not_found, clerk_connection_invalid, validation_error, unauthorized, payment_required