These endpoints allow you to manage subaccounts under an HQ parent account.
Creates a subaccount under the given parent account
Parameters: |
|
---|---|
Returns : |
A response with the newly created subaccount's ‘account_id’, the ‘account_name’ of the newly created subaccount, and the ‘parent_account_id’ of the HQ parent. |
Retires a subaccount.
Be advised that using this endpoint will remove the subaccount from the HQ account, and all of the data associated with the subaccount will be purged completely from our system and will be unretrievable after 30 days. If you accidentally retire a subaccount, you will need to reach out to our Support team for assistance, as the subaccount cannot be re-instituted through the API.
Returns : | A response with the subaccount's ‘account_name’ and the ‘status’ of ‘retired’. |
---|---|
Raises : | Http404 if the subaccount does not exist. |
Gets a list of subaccounts.
This endpoint provides a list of subaccounts that the requesting user has access to. Calling this endpoint with no query parameters will return subaccounts in ‘active’, ‘trial’, ‘pending_retirement’, and ‘retired’ status. This endpoint is paginated, so if you have more than 500 subaccounts, you'll need to make multiple requests using the pagination params.
Parameters: |
|
---|---|
Returns : | A response with a list of subaccounts including their ‘account_name’, ‘account_id’, and their ‘account_status’. |
Raises : | Http404 if the parent account does not exist. |
Assign subaccounts to a user.
This endpoint allows owners, and managers with the ‘manage_users’ permission, to assign subaccounts to a specific ‘user_id’. The list of subaccounts provided in the call will overwrite the current list of subaccounts the user has access to, so you’ll need to ensure you’ve included every subaccount ID applicable to the user you are editing.
Parameters: |
|
---|---|
Raises : | Http400 if a non parent account is used in the route. |
Raises : | Http400 if the requesting user does not have access to all accounts provided in the request body. |
Raises : | Http401 if the requesting user is trying to edit a user with an equal or higher role. |