> ## Documentation Index
> Fetch the complete documentation index at: https://docs.y.uno/llms.txt
> Use this file to discover all available pages before exploring further.

# Remove Account from Group

> Detaches an account from an account group without deleting the account

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.


## OpenAPI

````yaml openapi/organizations/remove-account-from-group.json DELETE /organizations/account-groups/{account_group_id}/accounts/{account_id}
openapi: 3.1.0
info:
  title: Account Groups API - Remove Account
  version: 1.0.0
servers:
  - url: https://api-sandbox.y.uno/v1
  - url: https://api.eu.y.uno/v1
security:
  - sec0: []
    sec1: []
paths:
  /organizations/account-groups/{account_group_id}/accounts/{account_id}:
    delete:
      summary: Remove Account from Group
      description: >-
        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.
      operationId: remove-account-from-group
      parameters:
        - name: account_group_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Account group UUID.
        - name: account_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: >-
            UUID of the account to detach. It must currently belong to this
            group.
      responses:
        '204':
          description: No Content — the account was detached from the group.
        '400':
          description: >-
            Bad Request — `LAST_ACCOUNT_IN_GROUP`: the account is the only one
            left in the group. A group must contain at least one account.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Machine-readable error code.
                  messages:
                    type: array
                    items:
                      type: string
                    description: Human-readable details.
              example:
                code: LAST_ACCOUNT_IN_GROUP
                messages:
                  - A group must contain at least one account
        '404':
          description: >-
            Not Found — no such account group in this organization, or the
            account is not a member of this group.
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: PUBLIC-API-KEY
      x-default: <Your PUBLIC-API-KEY>
    sec1:
      type: apiKey
      in: header
      name: PRIVATE-SECRET-KEY
      x-default: <Your PRIVATE-SECRET-KEY>

````