Deattach a User from an Account

This method is used for detaching a User from an Account , that breaks the connection between the User and the Account. The user's access to the Customer Control Panel will be terminated.

Please note that all Services and credentials of the detachable User, which connected to the Account (including the mailboxes and its content, which were created by the Services), are permanently deleted. You should save all the data on the local computer.


DELETE /api/v2/vendor/account_accesses/detach.json?api_token={api_token}&account_id={accoun_id}&user_id={user_id}

Arguments

Name

Parameter Type

Data type

Required/Optional

Description

api_tokenquerystringRequiredAPI token of the manager who perform the operation (see API Token Authentication).
user_idqueryintegerRequiredAn ID of the User, which will be detached from the Account.
account_idqueryintegerRequiredAn ID of the Account, from which the User will be detached.

Request example

DELETE http://billing.activeplatform.com:80/api/v2/vendor/account_accesses/detach?api_token=654322&account_id=2000532&user_id=2001840

Response example

  • If the operation has been successfully completed, the method returns the following status code: HTTP 204 No Content.

  • If you try to disconnect a User with the Owner access level, the method returns:

    {
      "error": "Owner can't be detached"
    }
  • If you try to detach a nonexistent User, the method returns:

    {
      "error": "Couldn't find User with 'id'=2006106 "
    }
  • If you try to detach a User to a nonexistent Account, the method returns:

    {
      "error": "Couldn't find Account with 'id'=2000533 "
    }