Skip to main content
POST
Bulk User Removal
DEPRECATED: This endpoint has been replaced by DELETE /admin/users.The new endpoint provides:
  • Cleaner RESTful structure
  • Better separation between users and invitations
  • Consistent response format
This endpoint will be removed in a future version.
This endpoint requires organization admin privileges. Only users with the org:admin role can bulk remove users from their organization.
Users cannot remove themselves from the organization using this endpoint. This prevents accidental lockouts.

Authentication

string
required
Bearer token for authentication. Must be from a user with org:admin role.

Body

array
required
Array of Clerk user IDs to remove from the organization (1-50 users per request)

Response

boolean
Whether all users were successfully removed
number
Total number of users requested to be removed
number
Number of users successfully removed
number
Number of users that failed to be removed
array
Array of successful removal results
array
Array of failed removals (only present if there were failures)

Examples

Error Codes

object
Bad Request - Invalid request data, validation errors, or attempting to remove yourself
object
Unauthorized - Invalid or missing authentication
object
Forbidden - User is not an admin in the organization
object
Method Not Allowed - Only POST requests are accepted
object
Multi-Status - Some removals succeeded, others failed (partial success)

Workflow

Step 1: Get User IDs

First, use the Get Organization Users endpoint to retrieve user IDs:

Step 2: Bulk Remove Users

Then use those IDs to remove users from the organization:

Use Cases

Department Restructuring

Remove all users from a specific department:

Inactive User Cleanup

Remove users who haven’t signed in recently:

Role-Based Removal

Remove users with specific roles or metadata:

Features

Safe Operations: Built-in protection against self-removal and comprehensive error handling.
  • Self-Protection: Admins cannot accidentally remove themselves
  • Batch Processing: Handle up to 50 users per request efficiently
  • Detailed Results: Know exactly which users were removed and which failed
  • Partial Success: Continue processing even if some removals fail

Security Notes

  • Only organization admins can remove users
  • Removed users lose access to the organization immediately
  • Organization-scoped metadata is deleted when a user is removed from the organization
  • Users can be re-invited after removal (with fresh metadata)
  • Action is logged in Clerk audit logs
  • Webhooks will fire for organizationMembership.deleted events

Limits

  • Batch Size: 1-50 user IDs per request
  • User ID Validation: All user IDs must be valid Clerk user identifiers
  • Rate Limiting: Subject to Clerk’s API rate limits
  • Self-Removal: Cannot remove your own user ID (will fail with error)
Use this endpoint in combination with Get Organization Users to build powerful user management workflows.