Skip to main content

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​

NameInTypeDescriptionNotes
userIdpathStringThe user ID.[required] [example: 00000000-0000-0000-0000-000000000000]

Responses​

Status codeDescriptionTypeResponse headers
200The profile as it was just before it was deletedEmployeeFullWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
403The 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--
404No user has the specified ID--
500A reassignment of the data of the account has not finished yet, or the OAuth service cannot be reached--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
400Bad Request.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

EmployeeFullWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json