deleteMember
EmployeeFullWrapper deleteMember(userId)
DELETE /api/2.0/people/{userId}
Delete a user
Deletes a portal profile and queues the erasure of the data behind it. The account has to be disabled first - set the Terminated status through PUT api/2.0/people/status/{status}, otherwise the operation answers 403 - and it must not be a system account or one imported from LDAP. The caller needs the permission to add and remove users, and has to be the portal owner to delete a DocSpace administrator. The profile disappears at once, together with its avatar, its group memberships, its file shares and its OAuth clients, while the data it owned is erased by a queued job afterwards, which can be watched through GET api/2.0/people/remove/progress/{userId}. The removal is permanent and cannot be undone, so hand the rooms and the shared files over first through POST api/2.0/people/reassign/start - an account whose reassignment has not finished cannot be deleted. The call raises a UserDeleted webhook and answers with the profile as it was just before it was removed. To delete several accounts at once use PUT api/2.0/people/delete.
Parameters
| Name | In | Type | Description | Notes |
|---|---|---|---|---|
| userId | path | String | The user ID. | [required] [example: 00000000-0000-0000-0000-000000000000] |
Responses
| Status code | Description | Type | Response headers |
|---|---|---|---|
| 200 | The profile as it was just before it was deleted | EmployeeFullWrapper | X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset |
| 403 | The account is not disabled, is a system or an LDAP account, the caller may not delete a DocSpace administrator, or the OAuth service refused to remove the OAuth clients of the account | - | - |
| 404 | No user has the specified ID | - | - |
| 500 | A reassignment of the data of the account has not finished yet, or the OAuth service cannot be reached | - | - |
| 401 | Unauthorized | ErrorApiResponse | - |
| 429 | Too Many Requests. | ErrorApiResponse | Retry-After |
| 400 | Bad Request. | ErrorApiResponse | - |
| 502 | Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
| 503 | Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON. | - | - |
Return type
Authorization
Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId
HTTP request headers
- Content-Type: Not defined
- Accept: application/json