> This page is for APIs.

> Fetch clean Markdown by appending `.md` to any page URL under https://signalwire.com/docs or requesting it with the HTTP header `Accept: text/markdown`. The root index at https://signalwire.com/docs/llms.txt lists the available documentation indexes.

# signalwire.disconnect

GET /

Service is about to disconnect the client

Reference: https://signalwire.com/docs/apis/relay/client/signalwire/signalwire-disconnect

## AsyncAPI Specification

```yaml
asyncapi: 2.6.0
info:
  title: signalwire.disconnect
  version: subpackage_signalwireDisconnect.signalwire.disconnect
  description: Service is about to disconnect the client
channels:
  /:
    description: Service is about to disconnect the client
    publish:
      operationId: subpackage_signalwireDisconnect.signalwire.disconnect-publish
      summary: signalwire.disconnect
      message:
        name: onSignalwireDisconnectDisconnectEvent
        title: signalwire.disconnect
        payload:
          $ref: '#/components/schemas/signalwire.disconnect_disconnectEvent'
servers:
  production:
    url: wss://relay.signalwire.com/
    protocol: wss
    x-default: true
components:
  schemas:
    ChannelsSignalwireDisconnectMessagesDisconnectEventJsonrpc:
      type: string
      enum:
        - '2.0'
      description: JSON-RPC version. Always `2.0`.
      title: ChannelsSignalwireDisconnectMessagesDisconnectEventJsonrpc
    ChannelsSignalwireDisconnectMessagesDisconnectEventMethod:
      type: string
      enum:
        - signalwire.disconnect
      description: The name of the JSON-RPC method being invoked.
      title: ChannelsSignalwireDisconnectMessagesDisconnectEventMethod
    Signalwire.DisconnectParams:
      type: object
      properties:
        restart:
          type: boolean
          description: >-
            Whether you should open a fresh connection after disconnecting.
            Always present.
      required:
        - restart
      description: >-
        The parameters delivered with the `signalwire.disconnect` request the
        service sends you.
      title: Signalwire.DisconnectParams
    signalwire.disconnect_disconnectEvent:
      type: object
      properties:
        jsonrpc:
          $ref: >-
            #/components/schemas/ChannelsSignalwireDisconnectMessagesDisconnectEventJsonrpc
          description: JSON-RPC version. Always `2.0`.
        id:
          type: string
          description: Request id, echoed on the correlated response.
        method:
          $ref: >-
            #/components/schemas/ChannelsSignalwireDisconnectMessagesDisconnectEventMethod
          description: The name of the JSON-RPC method being invoked.
        params:
          $ref: '#/components/schemas/Signalwire.DisconnectParams'
          description: The method's input parameters.
      required:
        - jsonrpc
        - id
        - method
        - params
      description: >-
        A `signalwire.disconnect` request the service pushes to you when it is
        about to

        close your connection — for example during a deployment. Stop sending
        new

        requests on this connection. A few seconds later the service closes the
        socket;

        it does not wait for a reply, so the close comes on schedule whether or
        not you

        answer. You may reply with an empty result `{}`.


        `restart` tells you how to reconnect. When it is `false`, reconnect and
        restore

        your session by passing your saved `protocol` and `authorization_state`
        to

        `signalwire.connect`. When it is `true`, reconnect as a fresh
        connection, without

        them.


        You receive this message; you do not send it (that is why this channel
        has no

        send operation).
      title: signalwire.disconnect_disconnectEvent

```