Attach a User to an Account
This method is used to attach a User to the selected Account. As a consequence, the User gets access to the Customer Control Panel.
POST /api/v2/vendor/account_accesses.json?api_token={api_token}&account_id={account_id}&user_id={user_id}&role=not_required[user, admin, owner]
Arguments
Name | Parameter Type | Data type | Required/Optional | Description |
---|---|---|---|---|
token | query | string | Required | API token of the manager who perform the operation (see API Token Authentication). |
account_id | query | integer | Required | An ID of the Account, to which the User will be attached. |
user_id | query | integer | Required | An ID of the User, which will be attached to the Account. |
role | query | string | Optional | Users can have following roles:
By default, the User gets the User role if the role parameter is empty. |
Request example
POST http://billing.activeplatform.com:80/api/v2/vendor/account_accesses?api_token=654321&account_id=2000532&user_id=2000188
Response example
If the operation has been successfully completed, the method returns the following status code: HTTP 201 Created.
If you try to attach a nonexistent User, the method returns:
{ "error": "Couldn't find User with 'id'=2006106 " }
If you try to attach a User to a nonexistent Account, the method returns:
{ "error": "Couldn't find Account with 'id'=2000533 " }