Delete Users
Connecteam's API allows you to permanently delete users from the system. Unlike archiving, this action is irreversible and should be used with caution.
Important WarningPermanent deletion cannot be undone. Once a user is deleted, their data cannot be recovered. We recommend archiving users instead unless permanent deletion is specifically required for compliance or data retention policies.
Delete User Endpoint
DELETE /users/v1/users/{userId}?deletionType=delete
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| deletionType | string | No | archive | archive or delete. Use delete for permanent deletion |
Restrictions
Before deleting a user, be aware of these restrictions:
- Cannot delete yourself - Admins cannot delete their own account
- Cannot delete owners - Users with owner permissions cannot be deleted via API
- Cannot delete archived users - If a user is already archived, you must unarchive them first before permanent deletion
Example Request
curl -X DELETE \
'https://api.connecteam.com/users/v1/users/123456?deletionType=delete' \
-H 'Authorization: Bearer YOUR_ACCESS_TOKEN'Success Response (200)
{
"requestId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"data": {
"count": 1
}
}Error Responses
| Status | Error | Description |
|---|---|---|
| 400 | Admin cannot archive / delete himself | You cannot delete your own account |
| 400 | Can't archive user who is already archived | User must be unarchived first |
| 403 | Cannot archive user with owner permissions | Owner users cannot be deleted |
| 404 | User not found | The specified userId does not exist |
What Happens When a User is Deleted
- User is first archived (if not already)
- User is permanently marked as deleted
USER_DELETEDwebhook is triggered- User is logged out from all devices
- Manager permissions are removed (if applicable)
- Benefits tokens are restored to the company
Updated 23 days ago
