Skip to content
masterclassBuddyTech Buzz5 fresh blogs · 5:00 AM IST

Clerk · Module

users.deleteUser

Deletes a Clerk user by ID through the Backend API. The method accepts a user ID and returns a promise for the deleted User.

How it works

Call clerkClient.users.deleteUser() with the target user's Clerk ID from trusted server-side code. The SDK wraps Clerk's Backend API deletion endpoint, resolves to the deleted User, and requires the SDK's configured authentication credentials.

Syntax

function deleteUser(userId: string): Promise<User>

Parameters

NameTypeDescription
userIdstringThe ID of the user to delete.

Returns

Promise<User> resolving to the deleted User.

Key points

  • The method removes the user represented by the supplied identifier.
  • Its only parameter is the target user's Clerk ID.
  • The signature takes a string and returns a promise resolving to a User.
  • The SDK method delegates the deletion to Clerk's Backend API.
  • The exact client-access pattern depends on which Clerk SDK is installed.

Common mistakes

  • The operation supports one user at a time; bulk deletion is not available through the SDK.
  • Direct API requests require the Clerk Secret Key, so keep deletion logic on the server and never expose that credential.

Example: Delete a user from a server route

import { clerkClient } from '@clerk/express'

export async function DELETE(request: Request) {
  const userId = new URL(request.url).searchParams.get('userId')
  if (!userId) return new Response('Missing userId', { status: 400 })

  await clerkClient.users.deleteUser(userId)
  return Response.json({ success: true })
}

Deletes the user identified by the query-string userId and returns a success response.

When to use it

Remove an individual user from a server-side admin workflow

Account administration

Delete a user's Clerk account after validating an approved erasure request

Privacy requests

Remove a test or temporary user from an automated backend process

Lifecycle cleanup

Interview questions

QWhat does deleteUser() accept and return?

deleteUser(userId: string) accepts the Clerk user ID and returns a Promise<User>. It deletes the specified user through Clerk's Backend API.

Follow-up: Which backend endpoint does the SDK wrap? It wraps DELETE/users/{user_id}.

QHow do you invoke the method?

Use clerkClient.users.deleteUser(userId) from server-side code. The userId must identify the user to delete.

Follow-up: How would you delete a user without the SDK? Send an authenticated HTTP DELETE request to Clerk's user endpoint using the Secret Key.

QDoes the method support bulk deletion?

The method deletes a single user programmatically. Clerk's documentation explicitly says bulk deletion cannot currently be performed programmatically.

Follow-up: What should an application do for a bulk-delete requirement? Contact Clerk Support, as recommended by the documentation.

  • clerkClient
  • getUser()
  • createUser()
  • Backend API
  • BAPI endpoint

Source: deleteUser() - Users | Clerk Docs. Checked 2026-10-15.