Remove Account from Group

Detaches an account from an account group. The account is not deleted or disabled — it becomes a standalone account of your organization and can be attached to another group later. A group must always keep at least one account, so the last account cannot be removed this way — move it into another group or delete the account instead.

DELETE/organizations/account-groups/{account_group_id}/accounts/{account_id}

Detaches an account from an account group. The account itself is not deleted or disabled: it keeps its users, permissions and configuration and becomes a standalone account of the organization, so it can be attached to another group later with Create Account. A group must always keep at least one account, so the last account of a group cannot be removed this way: move it into another group (with account_codes on Create Account Group) or delete the account instead.

Path Parameters

account_group_idstringrequired

Account group UUID.

account_idstringrequired

UUID of the account to detach. It must currently belong to this group.

Response

No Content — the account was detached from the group.

Bad Request — LAST_ACCOUNT_IN_GROUP: the account is the only one left in the group. A group must contain at least one account.

codestring

Machine-readable error code.

messagesstring[]

Human-readable details.

Not Found — no such account group in this organization, or the account is not a member of this group.

Request
curl -X DELETE "https://api-sandbox.whitelabel.com/v1/organizations/account-groups/<account_group_id>/accounts/<account_id>" \
  -H "PUBLIC-API-KEY: <PUBLIC-API-KEY>" \
  -H "PRIVATE-SECRET-KEY: <PRIVATE-SECRET-KEY>"
Response
(no body)