DELETE/v2/organizations/{organizationId}/users/{userId}

Remove a user from an organization

Removes a user from an organization. Use this operation for users who are not managed by the organization; disable managed users instead. The organizationId and userId must identify the organization and user involved.

2 parameters
organizationIdintegerrequired
The integer identifier of the organization to remove the user from.
userIdintegerrequired
The integer identifier of the user to remove from the organization.

5 status codes
200Returns confirmation that the user was removed from the organization.
400Returned when the user is managed by the organization and cannot be removed.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
401Returned when the request is not authenticated.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
403Returned when the authenticated user is not permitted to remove users from the organization.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional
404Returned when the organization or user cannot be found.
codestringrequired
Allowed:unauthenticatedapi_access_forbiddenapi_key_not_foundinvalid_api_keyinvalid_project_api_keyproject_api_key_expiredbad_credentialsmfa_enabledinvalid_otp_codemfa_not_enabledcan_not_revoke_own_permissionsdata_corrupted
paramsarray<object>optional

Error handling

A 400 is returned when the user is managed by the organization and cannot be removed; disable the user instead. A 401 is returned when the request is not authenticated, and a 403 when the authenticated user cannot remove users from the organization. A 404 is returned when the organization or user cannot be found.