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

# Supprimer une connexion

> Supprime une connexion. Elle ne doit pas être référencée par une règle de routage active.

Supprime une connexion que vous avez créée précédemment. Retourne `204 No Content` en cas de succès.

> [!WARNING]
>
> Problème connu : après le `204`, la connexion apparaît toujours avec le statut `ACTIVE` lorsque vous la récupérez. L'appel ne modifie pas le statut retourné par la récupération.

> [!WARNING]
>
> Une connexion encore référencée par une règle de routage active ne peut pas être supprimée : la requête échoue avec `409 CONNECTION_IN_USE`. Détachez-la d'abord de vos routes, puis réessayez.

### Paramètres de chemin

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

L'identifiant retourné par [Créer une connexion](https://docs.y.uno/fr/reference/organizations/connections/create-connection.md). Doit appartenir au compte auquel votre clé d'API est associée.

### En-têtes

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

UUID du compte auquel la connexion appartient.

### Réponse

Retourne `204 No Content` avec un corps vide.

```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": "..." }
}
```

### Erreurs

| HTTP | `code` |
| - | - |
| `401` | `NOT_AUTHENTICATED` Clé d'API manquante ou invalide. |
| `404` | `CONNECTION_NOT_FOUND` `connection_id` inconnu, ou l'identifiant appartient à un autre compte. |
| `409` | `CONNECTION_IN_USE` La connexion est toujours référencée par une règle de routage active. |


## OpenAPI

````yaml openapi/fr/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: Supprimer une connexion
      description: >-
        Supprime une connexion. Problème connu : l'appel renvoie 204, mais la
        récupération ultérieure de la connexion renvoie toujours 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: Aucun contenu
        '401':
          description: Non autorisé
          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: Introuvable
          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: Conflit
          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.