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

# calling.queue.leave

GET /

Remove the call from a queue

Reference: https://signalwire.com/docs/apis/relay/server/calling/calling-queue-leave

## AsyncAPI Specification

```yaml
asyncapi: 2.6.0
info:
  title: calling.queue.leave
  version: subpackage_callingQueueLeave.calling.queue.leave
  description: Remove the call from a queue
channels:
  /:
    description: Remove the call from a queue
    publish:
      operationId: subpackage_callingQueueLeave.calling.queue.leave-publish
      summary: Server messages
      message:
        oneOf:
          - $ref: >-
              #/components/messages/subpackage_callingQueueLeave.calling.queue.leave-server-0-onCallingQueueLeaveCallQueueEvent
          - $ref: >-
              #/components/messages/subpackage_callingQueueLeave.calling.queue.leave-server-1-onCallingQueueLeaveResponse
    subscribe:
      operationId: subpackage_callingQueueLeave.calling.queue.leave-subscribe
      summary: calling.queue.leave
      message:
        name: callingQueueLeave
        title: calling.queue.leave
        payload:
          $ref: '#/components/schemas/calling.queue.leave_callingQueueLeaveRequest'
servers:
  production:
    url: wss://relay.signalwire.com/
    protocol: wss
    x-default: true
components:
  messages:
    subpackage_callingQueueLeave.calling.queue.leave-server-0-onCallingQueueLeaveCallQueueEvent:
      name: onCallingQueueLeaveCallQueueEvent
      title: calling.call.queue
      payload:
        $ref: '#/components/schemas/calling.queue.leave_callQueueEvent'
    subpackage_callingQueueLeave.calling.queue.leave-server-1-onCallingQueueLeaveResponse:
      name: onCallingQueueLeaveResponse
      title: calling.queue.leave response
      payload:
        $ref: '#/components/schemas/calling.queue.leave_callingQueueLeaveResponse'
  schemas:
    ChannelsCallingQueueLeaveMessagesCallQueueEventJsonrpc:
      type: string
      enum:
        - '2.0'
      description: JSON-RPC version. Always `2.0`.
      title: ChannelsCallingQueueLeaveMessagesCallQueueEventJsonrpc
    ChannelsCallingQueueLeaveMessagesCallQueueEventMethod:
      type: string
      enum:
        - signalwire.event
      description: Always `signalwire.event`.
      title: ChannelsCallingQueueLeaveMessagesCallQueueEventMethod
    ChannelsCallingQueueLeaveMessagesCallQueueEventParamsEventType:
      type: string
      enum:
        - calling.call.queue
      description: The event type — identifies which event this is.
      title: ChannelsCallingQueueLeaveMessagesCallQueueEventParamsEventType
    CallingCallQueueStatus0:
      type: string
      enum:
        - enqueue
      title: CallingCallQueueStatus0
    CallingCallQueueStatus1:
      type: string
      enum:
        - dequeue
      title: CallingCallQueueStatus1
    CallingCallQueueStatus2:
      type: string
      enum:
        - leave
      title: CallingCallQueueStatus2
    CallingCallQueueStatus3:
      type: string
      enum:
        - stats
      title: CallingCallQueueStatus3
    Calling.CallQueueStatus:
      oneOf:
        - $ref: '#/components/schemas/CallingCallQueueStatus0'
        - $ref: '#/components/schemas/CallingCallQueueStatus1'
        - $ref: '#/components/schemas/CallingCallQueueStatus2'
        - $ref: '#/components/schemas/CallingCallQueueStatus3'
        - type: string
      title: Calling.CallQueueStatus
    Calling.CallQueueParams:
      type: object
      properties:
        node_id:
          type: string
          description: >-
            Opaque identifier that, paired with `call_id`, addresses this call.
            Echo back the value you received; treat it as opaque.
        call_id:
          type: string
          description: Unique identifier of the call.
        control_id:
          type: string
          description: >-
            The `control_id` of the queue session this event refers to, returned
            when the call entered with `calling.queue.enter`.
        status:
          $ref: '#/components/schemas/Calling.CallQueueStatus'
          description: The call's current standing in the queue.
        id:
          type: string
          description: The queue's unique id.
        name:
          type: string
          description: The queue's name.
        position:
          type: integer
          description: Where this call currently sits in line, counting from the front.
        size:
          type: integer
          description: How many calls are currently waiting in the queue.
        avg_time:
          type: integer
          description: >-
            The average time, in seconds, calls have been spending in this
            queue.
        enqueue_ts:
          type: integer
          format: int64
          description: >-
            The time, as a Unix timestamp in microseconds since the epoch, when
            the call entered the queue. `0` until the call is enqueued.
        dequeue_ts:
          type: integer
          format: int64
          description: >-
            The time, as a Unix timestamp in microseconds since the epoch, when
            the call was pulled from the queue. `0` until the call is dequeued.
        leave_ts:
          type: integer
          format: int64
          description: >-
            The time, as a Unix timestamp in microseconds since the epoch, when
            the call left the queue. `0` until the call leaves.
        status_url:
          type: string
          description: >-
            The status callback URL, echoed back from `calling.queue.enter`.
            Empty when none was set.
      required:
        - node_id
        - call_id
        - control_id
        - status
        - id
        - name
        - position
        - size
        - avg_time
        - enqueue_ts
        - dequeue_ts
        - leave_ts
        - status_url
      title: Calling.CallQueueParams
    ChannelsCallingQueueLeaveMessagesCallQueueEventParams:
      type: object
      properties:
        event_type:
          $ref: >-
            #/components/schemas/ChannelsCallingQueueLeaveMessagesCallQueueEventParamsEventType
          description: The event type — identifies which event this is.
        event_channel:
          type: string
          description: >-
            The channel the event was delivered on — for Calling events, the
            `protocol`

            string your connection received from `signalwire.connect`.
        timestamp:
          type: number
          format: double
          description: >-
            When the event was emitted, as a Unix timestamp in seconds. Always
            present.
        project_id:
          type: string
          description: >-
            Your project ID. Present on Calling events and most Call Fabric
            events; absent on `call.joined`, `call.left`, `member.joined`, and
            `member.left`.
        space_id:
          type: string
          description: >-
            Your space ID. Present on Calling events and most Call Fabric
            events; absent on `call.joined`, `call.left`, `member.joined`, and
            `member.left`.
        params:
          $ref: '#/components/schemas/Calling.CallQueueParams'
          description: The event-specific payload.
      required:
        - event_type
        - event_channel
        - timestamp
        - params
      description: The event envelope.
      title: ChannelsCallingQueueLeaveMessagesCallQueueEventParams
    calling.queue.leave_callQueueEvent:
      type: object
      properties:
        jsonrpc:
          $ref: >-
            #/components/schemas/ChannelsCallingQueueLeaveMessagesCallQueueEventJsonrpc
          description: JSON-RPC version. Always `2.0`.
        id:
          type: string
          description: >-
            Event id — a unique UUID generated for each event. Events are
            notifications: you do not reply to them.
        method:
          $ref: >-
            #/components/schemas/ChannelsCallingQueueLeaveMessagesCallQueueEventMethod
          description: Always `signalwire.event`.
        params:
          $ref: >-
            #/components/schemas/ChannelsCallingQueueLeaveMessagesCallQueueEventParams
          description: The event envelope.
      required:
        - jsonrpc
        - id
        - method
        - params
      description: >-
        Fires as a call moves through a queue — when it joins (`enqueue`), when
        it is pulled from the queue to be connected (`dequeue`), and when it
        leaves without connecting (`leave`) — and periodically reports its
        position and live queue stats (`stats`).
      title: calling.queue.leave_callQueueEvent
    ChannelsCallingQueueLeaveMessagesCallingQueueLeaveResponseJsonrpc:
      type: string
      enum:
        - '2.0'
      description: JSON-RPC version. Always `2.0`.
      title: ChannelsCallingQueueLeaveMessagesCallingQueueLeaveResponseJsonrpc
    Calling.QueueLeaveResult:
      type: object
      properties:
        code:
          type: string
          description: >-
            Result code as a string. `"200"` means success. Failures use an
            HTTP-style code

            such as `"400"` (bad request), `"403"`, `"404"` (call not found),
            `"405"`, `"409"`

            (conflict, for example another operation is still running), `"410"`
            (call gone),

            or `"500"`. If the call could not be reached in time, `code` is a
            lowercase error

            identifier instead, such as `response_timeout`, `not_available`, or

            `internal_error`.
        message:
          type: string
          description: >-
            Human-readable description of the result. On failure, it explains
            what went wrong. Always check `code`; `message` may be omitted when
            there is nothing extra to report.
        control_id:
          type: string
          description: >-
            Your control identifier for the queue placement, echoed from your
            request.
      required:
        - code
      title: Calling.QueueLeaveResult
    JsonRpcErrorCode0:
      type: string
      enum:
        - '-32000'
      title: JsonRpcErrorCode0
    JsonRpcErrorCode1:
      type: string
      enum:
        - '-32001'
      title: JsonRpcErrorCode1
    JsonRpcErrorCode2:
      type: string
      enum:
        - '-32002'
      title: JsonRpcErrorCode2
    JsonRpcErrorCode3:
      type: string
      enum:
        - '-32003'
      title: JsonRpcErrorCode3
    JsonRpcErrorCode4:
      type: string
      enum:
        - '-32004'
      title: JsonRpcErrorCode4
    JsonRpcErrorCode5:
      type: string
      enum:
        - '-32005'
      title: JsonRpcErrorCode5
    JsonRpcErrorCode6:
      type: string
      enum:
        - '-32600'
      title: JsonRpcErrorCode6
    JsonRpcErrorCode7:
      type: string
      enum:
        - '-32601'
      title: JsonRpcErrorCode7
    JsonRpcErrorCode8:
      type: string
      enum:
        - '-32602'
      title: JsonRpcErrorCode8
    JsonRpcErrorCode9:
      type: string
      enum:
        - '-32603'
      title: JsonRpcErrorCode9
    JsonRpcErrorCode10:
      type: string
      enum:
        - '-32700'
      title: JsonRpcErrorCode10
    JsonRpcErrorCode:
      oneOf:
        - $ref: '#/components/schemas/JsonRpcErrorCode0'
        - $ref: '#/components/schemas/JsonRpcErrorCode1'
        - $ref: '#/components/schemas/JsonRpcErrorCode2'
        - $ref: '#/components/schemas/JsonRpcErrorCode3'
        - $ref: '#/components/schemas/JsonRpcErrorCode4'
        - $ref: '#/components/schemas/JsonRpcErrorCode5'
        - $ref: '#/components/schemas/JsonRpcErrorCode6'
        - $ref: '#/components/schemas/JsonRpcErrorCode7'
        - $ref: '#/components/schemas/JsonRpcErrorCode8'
        - $ref: '#/components/schemas/JsonRpcErrorCode9'
        - $ref: '#/components/schemas/JsonRpcErrorCode10'
      title: JsonRpcErrorCode
    JsonRpcError:
      type: object
      properties:
        code:
          $ref: '#/components/schemas/JsonRpcErrorCode'
          description: >-
            The error code — a negative integer identifying the failure. See
            `JsonRpcErrorCode` for the full list of values and meanings.
        message:
          type: string
          description: A human-readable description of what went wrong.
        original_request:
          type: object
          additionalProperties:
            description: Any type
          description: >-
            An echo of the request that failed — the full JSON-RPC frame you
            sent

            (`jsonrpc`, `id`, `method`, `params`). Always present.
        requester_nodeid:
          type: string
          description: >-
            The node that sent the failed request. Present only on some routing
            errors.
        requester_identity:
          type: string
          description: >-
            The identity of the requester. Present only on some routing errors;
            same value as `requester_nodeid`.
        responder_nodeid:
          type: string
          description: >-
            The node that was handling the request. Present only on some routing
            errors.
        responder_identity:
          type: string
          description: >-
            The identity of the responder. Present only on some routing errors;
            same value as `responder_nodeid`.
        last_hop_timeout:
          type: boolean
          description: >-
            `true` when the request timed out on its final hop inside
            SignalWire. Present only on some timeout errors.
      required:
        - code
        - message
        - original_request
      description: >-
        A JSON-RPC 2.0 error object, delivered on the `error` field of a
        `JsonRpcResponse` when

        a request fails at the protocol level (bad version, authentication,
        scope, params, or

        your project's connection limit). It replaces `result` — a frame carries
        one or the other, never both.
      title: JsonRpcError
    calling.queue.leave_callingQueueLeaveResponse:
      type: object
      properties:
        jsonrpc:
          $ref: >-
            #/components/schemas/ChannelsCallingQueueLeaveMessagesCallingQueueLeaveResponseJsonrpc
          description: JSON-RPC version. Always `2.0`.
        id:
          type: string
          description: The id of the request this responds to.
        result:
          $ref: '#/components/schemas/Calling.QueueLeaveResult'
          description: The method result. Present when the request succeeded.
        error:
          $ref: '#/components/schemas/JsonRpcError'
          description: >-
            Present instead of `result` when the request failed at the protocol
            level.
      required:
        - jsonrpc
        - id
      description: >-
        A JSON-RPC response frame correlated to a request by `id`. On success
        the frame carries

        `result` (the method result). If the request fails at the protocol level
        — an

        incompatible version, failed authentication, insufficient scope, invalid
        params, or your

        project's connection limit — the frame carries `error` instead of
        `result`. Many

        method-level failures (for example most Calling failures) are reported
        the other way: a

        normal `result` whose own `code` is not `"200"`. Each method documents
        which form its

        failures take.


        An `error` returned for `signalwire.connect` is followed by the service
        closing the

        WebSocket; open a new connection to try again. The same happens when

        `signalwire.reauthenticate` sends credentials that are rejected, except
        for a

        Subscriber Access Token. Errors on any other request leave the
        connection open.
      title: calling.queue.leave_callingQueueLeaveResponse
    ChannelsCallingQueueLeaveMessagesCallingQueueLeaveRequestJsonrpc:
      type: string
      enum:
        - '2.0'
      description: JSON-RPC version. Always `2.0`.
      title: ChannelsCallingQueueLeaveMessagesCallingQueueLeaveRequestJsonrpc
    ChannelsCallingQueueLeaveMessagesCallingQueueLeaveRequestMethod:
      type: string
      enum:
        - calling.queue.leave
      description: The name of the JSON-RPC method being invoked.
      title: ChannelsCallingQueueLeaveMessagesCallingQueueLeaveRequestMethod
    Calling.QueueLeaveParams:
      type: object
      properties:
        node_id:
          type: string
          description: >-
            Opaque identifier that, paired with `call_id`, addresses this call.
            Echo back the value you received; treat it as opaque.
        call_id:
          type: string
          description: Unique identifier of the call.
        control_id:
          type: string
          description: The `control_id` you used when the call entered the queue.
        queue_name:
          type: string
          description: Name of the queue to remove the call from.
        queue_id:
          type: string
          description: >-
            The id of the queue to remove the call from. The queue id is
            reported on queue events.
        status_url:
          type: string
          format: uri
          description: HTTP or HTTPS URL where SignalWire POSTs queue status updates.
      required:
        - node_id
        - call_id
        - control_id
        - queue_name
      title: Calling.QueueLeaveParams
    calling.queue.leave_callingQueueLeaveRequest:
      type: object
      properties:
        jsonrpc:
          $ref: >-
            #/components/schemas/ChannelsCallingQueueLeaveMessagesCallingQueueLeaveRequestJsonrpc
          description: JSON-RPC version. Always `2.0`.
        id:
          type: string
          description: Request id, echoed on the correlated response.
        method:
          $ref: >-
            #/components/schemas/ChannelsCallingQueueLeaveMessagesCallingQueueLeaveRequestMethod
          description: The name of the JSON-RPC method being invoked.
        params:
          $ref: '#/components/schemas/Calling.QueueLeaveParams'
          description: The method's input parameters.
      required:
        - jsonrpc
        - id
        - method
        - params
      description: >-
        A JSON-RPC request frame. `Method` is the method name; `Params` is the
        method's input.
      title: calling.queue.leave_callingQueueLeaveRequest

```