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

# Disconnect a connection

> Removes the connection, leaving every other connection in place. Refused, in this order, with 409 connection_runs_agent while your agent runs on it (move it to another on the Your agent page first), 409 connection_runs_profiles while agent profiles run on it (the message names them: pin another connection, or nobody, on each first), 409 connection_is_default while it is a harness's default and you hold another connection that harness's tasks could run on (the message names them: make one the default first), and 404 connection_not_found for a connection you do not hold. Claude Code and Codex tasks that run on the connection move to the harness's default, so their next turn runs there; disconnecting the last connection moves them to Aether inference. OpenCode tasks that run on the connection are disconnected until a connection is chosen for each, and the last OpenCode connection leaves no default.



## OpenAPI

````yaml api-reference/openapi.json DELETE /connections/{connectionID}
openapi: 3.1.0
info:
  title: Aether API
  version: 0.1.0
servers:
  - url: https://api.runaether.dev
security:
  - bearerAuth: []
paths:
  /connections/{connectionID}:
    delete:
      tags:
        - connections
      summary: Disconnect a connection
      description: >-
        Removes the connection, leaving every other connection in place.
        Refused, in this order, with 409 connection_runs_agent while your agent
        runs on it (move it to another on the Your agent page first), 409
        connection_runs_profiles while agent profiles run on it (the message
        names them: pin another connection, or nobody, on each first), 409
        connection_is_default while it is a harness's default and you hold
        another connection that harness's tasks could run on (the message names
        them: make one the default first), and 404 connection_not_found for a
        connection you do not hold. Claude Code and Codex tasks that run on the
        connection move to the harness's default, so their next turn runs there;
        disconnecting the last connection moves them to Aether inference.
        OpenCode tasks that run on the connection are disconnected until a
        connection is chosen for each, and the last OpenCode connection leaves
        no default.
      operationId: deleteConnection
      parameters:
        - description: The connection's id.
          in: path
          name: connectionID
          required: true
          schema:
            description: The connection's id.
            format: uuid
            type: string
      responses:
        '204':
          description: No Content
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionsErrorResponse'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrgAuthorizationErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionsErrorResponse'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionsErrorResponse'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionsErrorResponse'
          description: Unprocessable Entity
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConnectionsErrorResponse'
          description: Internal Server Error
components:
  schemas:
    ConnectionsErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - aether_inference_unavailable
            - aether_inference_unserved
            - agent_credential_unreadable
            - agent_host_account_deleting
            - agent_host_command_not_found
            - agent_host_creation_disabled
            - agent_host_exists
            - agent_host_illegal_transition
            - agent_host_not_allowlisted
            - agent_host_not_found
            - agent_host_other_provider_app
            - agent_host_project_not_eligible
            - agent_host_provisioning_failed
            - agent_host_state_changed
            - agent_host_wake_failed
            - agent_line_unavailable
            - bad_gateway
            - bad_request
            - conflict
            - connection_account_held
            - connection_agent_only
            - connection_harness_mismatch
            - connection_is_default
            - connection_name_taken
            - connection_not_found
            - connection_option_mismatch
            - connection_runs_agent
            - connection_runs_profiles
            - forbidden
            - gateway_timeout
            - gone
            - internal_error
            - line_exists
            - line_not_found
            - line_not_imessage
            - method_not_allowed
            - no_default_connection
            - not_acceptable
            - not_found
            - not_implemented
            - payment_required
            - precondition_failed
            - rate_limited
            - request_canceled
            - request_timeout
            - request_too_large
            - service_unavailable
            - unauthenticated
            - unsupported_media_type
            - validation_failed
            - whatsapp_not_enabled
          minLength: 1
          type: string
        error:
          minLength: 1
          type: string
        errors:
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type: array
      required:
        - error
        - code
      type: object
    OrgAuthorizationErrorResponse:
      additionalProperties: false
      properties:
        code:
          enum:
            - org_membership_required
            - org_role_insufficient
            - org_suspended
            - account_deleting
            - agent_host_route_not_allowed
            - credential_kind_not_admitted
          type: string
        error:
          minLength: 1
          type: string
      required:
        - error
        - code
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT
      scheme: bearer
      type: http

````

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