Skip to main content

Deletes a domain for the instance. The active domain cannot be deleted.

Returns the DeletedObject.

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

    The ID of the domain 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 response = await clerkClient.domains.delete('domain_123')

Backend API (BAPI) endpoint

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

Feedback

What did you think of this content?

Last updated on