Docs

deleteOrganization()

Deletes an Organization

function deleteOrganization: (organizationId: string) => Promise<Organization>;
  • Name
    organizationId
    Type
    string
    Description

    The ID of the organization to delete.

const organizationId = 'org_123';

const response = await clerkClient.organizations.deleteOrganization(organizationId);

console.log(response);
/*
DeletedObject {
  object: 'organization',
  id: 'org_123',
  slug: null,
  deleted: true
}
*/

Backend API (BAPI) endpoint

This method in the SDK is a wrapper around the BAPI endpoint DELETE/organizations/{organization_id}. See the BAPI reference for more details.

Feedback

What did you think of this content?