> ## 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.

> ## Agent Instructions
> Test in the sandbox first: base URL https://api-sandbox.y.uno (Test Mode in the Dashboard). Production is https://api.y.uno (Live Mode).
> Every API request needs the public-api-key and private-secret-key headers. Get them in the Dashboard at https://dashboard.y.uno/developers (Developers > Credentials); sandbox and production keys are different.
> Send an X-Idempotency-Key (a UUID) when creating payments, refunds and cancels, so retries do not create duplicates.
> Start with the Quickstart (https://docs.y.uno/docs/quickstart.md) and the agent guide (https://docs.y.uno/agents.md). To search these docs from a coding agent, connect the docs MCP server at https://docs.y.uno/mcp.

# Eliminar grupo de cuentas

> Elimina un grupo de cuentas vacío

Elimina un grupo de cuentas. El grupo debe estar vacío: un grupo que aún tiene cuentas (`GROUP_HAS_ACCOUNTS`) o subgrupos (`GROUP_HAS_SUBGROUPS`) se rechaza con `400`. Mueve o [elimina sus cuentas](https://docs.y.uno/es/reference/organizations/remove-account-from-group.md) y mueve o elimina sus subgrupos primero. Las cuentas nunca se reasignan automáticamente.


## OpenAPI

````yaml openapi/es/organizations/delete-account-group.json DELETE /organizations/account-groups/{account_group_id}
openapi: 3.1.0
info:
  title: Account Groups API - Delete
  version: 1.0.0
servers:
  - url: https://api-sandbox.y.uno/v1
    description: Sandbox
  - url: https://api.y.uno/v1
    description: Production (US)
security:
  - sec0: []
    sec1: []
paths:
  /organizations/account-groups/{account_group_id}:
    delete:
      summary: Eliminar un grupo de cuentas
      description: >-
        Elimina un grupo de cuentas. Un grupo solo puede eliminarse cuando está
        vacío: primero quita, mueve o elimina sus cuentas (consulta Remove
        Account from Group) y mueve o elimina sus subgrupos. Las cuentas nunca
        se reasignan automáticamente.
      operationId: delete-account-group
      parameters:
        - name: account_group_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: UUID del grupo de cuentas.
      responses:
        '204':
          description: 'Sin contenido: el grupo se eliminó.'
        '400':
          description: >-
            Solicitud incorrecta. El campo `code` indica el motivo:


            - `GROUP_HAS_ACCOUNTS`: el grupo todavía tiene cuentas. Quítalas
            primero del grupo.

            - `GROUP_HAS_SUBGROUPS`: el grupo todavía tiene subgrupos. Muévelos
            a otro padre (o desvincúlalos con Update Account Group) o elimínalos
            primero.
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: string
                    description: Código de error legible por máquina.
                  messages:
                    type: array
                    items:
                      type: string
                    description: Detalles legibles por personas.
              example:
                code: GROUP_HAS_SUBGROUPS
                messages:
                  - Cannot delete account group that still has sub-groups
        '404':
          description: >-
            No encontrado: no hay ningún grupo de cuentas con ese
            `account_group_id` en esta organización.
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>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.