> ## 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 una conexión

> Elimina una conexión. No debe estar referenciada por una regla de enrutamiento activa.

Elimina una conexión que creaste previamente. Devuelve `204 No Content` si la operación es exitosa.

> [!WARNING]
>
> Problema conocido: después del `204`, la conexión sigue apareciendo como `ACTIVE` cuando la obtienes. La llamada no cambia el estado que devuelve la consulta.

> [!WARNING]
>
> Una conexión que todavía está referenciada por una regla de enrutamiento activa no se puede eliminar: la solicitud falla con `409 CONNECTION_IN_USE`. Desvincúlala primero de tus rutas y luego reintenta.

### Parámetros de ruta

**connection\_id** `string` *required*

El id devuelto por [Crear una conexión](https://docs.y.uno/es/reference/organizations/connections/create-connection.md). Debe pertenecer a la cuenta a la que está asociada tu clave de API.

### Encabezados

**X-Account-Code** `string` *required*

UUID de la cuenta a la que pertenece la conexión.

### Respuesta

Devuelve `204 No Content` con un cuerpo vacío.

```bash cURL theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
curl -X DELETE 'https://api.y.uno/v1/connections/f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e' \
  -H 'public-api-key: <YOUR_PUBLIC_KEY>' \
  -H 'private-secret-key: <YOUR_SECRET_KEY>' \
  -H 'X-Account-Code: a1b2c3d4-e5f6-7890-abcd-ef1234567890'
```

```json 409 — In Use theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "type": "conflict",
  "code": "CONNECTION_IN_USE",
  "message": "Connection 'f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e' is still referenced by an active routing rule",
  "details": { "connection_id": "f1a3c4d5-7b8e-4a2c-9d1e-3f4a5b6c7d8e" }
}
```

```json 404 Not Found theme={"theme":{"light":"github-dark","dark":"github-dark-dimmed"}}
{
  "type": "not_found",
  "code": "CONNECTION_NOT_FOUND",
  "message": "Connection '...' was not found",
  "details": { "connection_id": "..." }
}
```

### Errores

| HTTP | `code` |
| - | - |
| `401` | `NOT_AUTHENTICATED` Clave de API ausente o no válida. |
| `404` | `CONNECTION_NOT_FOUND` `connection_id` desconocido, o el id pertenece a otra cuenta. |
| `409` | `CONNECTION_IN_USE` La conexión todavía está referenciada por una regla de enrutamiento activa. |


## OpenAPI

````yaml openapi/es/organizations/connections/delete-connection.json DELETE /connections/{connection_id}
openapi: 3.1.0
info:
  title: Connections 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:
  /connections/{connection_id}:
    delete:
      summary: Eliminar una conexión
      description: >-
        Elimina una conexión. Problema conocido: la llamada devuelve 204, pero
        al recuperar la conexión después, esta sigue devolviendo ACTIVE.
      operationId: delete-connection
      parameters:
        - name: connection_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: X-Account-Code
          in: header
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '204':
          description: Sin contenido
        '401':
          description: No autorizado
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: auth_error
                  code:
                    type: string
                    example: NOT_AUTHENTICATED
                  message:
                    type: string
                    example: Not authenticated
        '404':
          description: No encontrado
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: not_found
                  code:
                    type: string
                    example: CONNECTION_NOT_FOUND
                  message:
                    type: string
                    example: Connection '...' was not found
        '409':
          description: Conflicto
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    example: conflict
                  code:
                    type: string
                    example: CONNECTION_IN_USE
                  message:
                    type: string
                    example: >-
                      Connection '...' is still referenced by an active routing
                      rule
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.