Skip to main content

Note

To use this method, you must enable API keys in the Clerk Dashboard.

Deletes the given API key.

Returns the DeletedObject object.

function delete(apiKeyId: string): Promise<DeletedObject>
  • Name
    apiKeyId
    Type
    string
    Description

    The ID of the API key to delete.

Note

Using clerkClient varies based on the SDK you're using. Refer to the overview for usage details, including guidance on how to access the userId and other properties.

const apiKeyId = 'apikey_123'

const response = await clerkClient.apiKeys.delete(apiKeyId)

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint DELETE/api_keys/{apiKeyID}. See the BAPI reference for more information.

Feedback

What did you think of this content?

Last updated on