Overview
The Remove Employees Bulk API allows you to remove multiple employees from your organization in a single request using their email addresses. This public API is designed for external systems and integrations to manage employee access without requiring admin authentication through the standard JWT flow. It requires an Organization Bearer Token (auth_token) for authentication, ensuring only authorized organizations can remove employees from their workspace.
Path URL
API Usage
Endpoint:Headers
| Header | Description | Example |
|---|---|---|
Authorization | Bearer token used for authentication. Must be a valid Organization Auth Token. | Bearer YOUR-BEARER-TOKEN |
Content-Type | The content type of the request body | application/json |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
emails | array of strings | Yes | Array of employee email addresses to remove from the organization |
Example cURL Request
Sample Request Code (Node.js with Axios)
Example Response (Success)
Response Fields
| Field | Type | Description |
|---|---|---|
statusCode | number | HTTP status code (200 for success, 400/401/404/500 for errors) |
status | string | Status of the request ("success" or "error") |
message | string | Human-readable message describing the result |
data | object | Response data containing removed and not found emails |
data.removedEmails | array of strings | List of email addresses that were successfully removed |
data.notFoundEmails | array of strings | List of email addresses that were not found in the system |
Error Responses
401 Unauthorized - Invalid Access Token
400 Bad Request - No Emails Provided
404 Not Found - No Users Found
500 Internal Server Error
How to Get Organization’s Auth Token
Log in to EazyBe Workspace
The organization’s admin must log in to the EazyBe Workspace using their credentials.
Response Status Codes
| Status Code | Description |
|---|---|
| 200 | Employees successfully removed from the organization |
| 400 | Bad request - invalid input or missing required fields |
| 401 | Unauthorized - invalid or missing access token |
| 404 | Not found - no users found for the provided email addresses |
| 500 | Internal server error - unexpected server-side error |
Important Notes
What happens when you remove employees?
- Employees are removed from the organization’s workspace (
callyzer_user_details) - Their organization membership is revoked (
callyzer_user_mappings) - The users are not deleted from the system entirely - only their association with this specific organization is removed
- The API will process all valid emails and report which ones were successfully removed and which were not found
Partial Success
If some emails are not found in the system, the API will still remove the employees that were found and return both lists in the response:- removedEmails: Successfully removed employees
- notFoundEmails: Emails that don’t exist in the system
Hygiene Practices
Use Cases
- Offboarding Automation: Automatically remove employees when they leave the company
- Bulk User Management: Remove multiple employees at once during organizational restructuring
- Integration with HR Systems: Sync employee removals from your HR platform to EazyBe
- Access Control: Quickly revoke access for multiple users in emergency situations
- External System Integration: Allow third-party systems to manage employee access
If you have any questions or need further assistance, feel free to reach out to us at [email protected].