Legs

Get a single leg

get/legs/{id}

Response

Leg details

instance_idstring

Instance identifier

idstring required

Unique leg identifier (UUID)

type'sip_inbound' | 'sip_outbound' | 'webrtc' | 'whatsapp_in' | 'whatsapp_out' | 'websocket_in' | 'websocket_out' | 'moq_in' | 'livekit_publish' | 'livekit_participant' required

Leg type

state'ringing' | 'early_media' | 'connected' | 'held' | 'hung_up' required

Leg state

room_idstring

Room ID if the leg is in a room, empty otherwise

mutedboolean required

Whether the leg is muted (cannot be heard by others)

deafboolean required

Whether the leg is deaf (cannot hear others)

accept_dtmfboolean required

Whether the leg receives DTMF digits broadcast from other legs in the same room. Defaults to true.

heldboolean required

Whether the call is on hold (SIP legs only)

rolestring

Routing role used by the room's audio routing matrix (e.g. "customer", "agent", "supervisor"). Empty string means unroled (full mesh).

app_idstring

Application identifier for event stream filtering.

sip_headersobject

Deprecated: X-* headers from the inbound INVITE. Only present on sip_inbound legs. Use headers for new code; it carries the same map plus surfaces handshake headers for websocket legs.

headersobject

Custom protocol headers exposed by the leg's transport — X-/P- headers from a SIP INVITE, the WebSocket upgrade request, or supplied at outbound dial time.

{"stackTrail":"components:schemas:Leg:properties:custom_data","oasType":"schema","type":"unknown","description":"Opaque application JSON attached to the leg. Any JSON value is accepted (object, array, string, number, boolean). It is echoed on the leg view and carried at the top level of every event published for this leg, so external state can be correlated without keeping a leg_id lookup table. Capped by CUSTOM_DATA_MAX_BYTES (default 1024 bytes, 0 = unlimited)."}

Changes

Changed in 10 of the 67 revisions of this API.61017

    • added the optional property custom_data to the response with the 200 status

      response-optional-property-added

    • added the new livekit_participant enum value to the type response property for the response status 200

      response-property-enum-value-added

    • added the new livekit_publish enum value to the type response property for the response status 200

      response-property-enum-value-added

    • added the new moq_in enum value to the type response property for the response status 200

      response-property-enum-value-added

    • added the optional property role to the response with the 200 status

      response-optional-property-added

  • 97117ab6a5c421See the full diff
    • added the new websocket_in enum value to the type response property for the response status 200

      response-property-enum-value-added

    • added the new websocket_out enum value to the type response property for the response status 200

      response-property-enum-value-added

    • added the optional property headers to the response with the 200 status

      response-optional-property-added

    • added the new whatsapp_in enum value to the type response property for the response status 200

      response-property-enum-value-added

    • added the new whatsapp_out enum value to the type response property for the response status 200

      response-property-enum-value-added

    • added the optional property app_id to the response with the 200 status

      response-optional-property-added

    • added the required property accept_dtmf to the response with the 200 status

      response-required-property-added

  • 6ad38ff56ac112See the full diff
    • removed the required property leg_id from the response with the 200 status

      response-required-property-removed

    • added the required property deaf to the response with the 200 status

      response-required-property-added

    • added the required property id to the response with the 200 status

      response-required-property-added

  • d09c97c6ca8c538See the full diff
    • the response property held became optional for the status 200

      response-property-became-optional

    • the response property muted became optional for the status 200

      response-property-became-optional

    • removed the required property accept_dtmf from the response with the 200 status

      response-required-property-removed

    • removed the required property deaf from the response with the 200 status

      response-required-property-removed

    • removed the required property id from the response with the 200 status

      response-required-property-removed

    • removed the optional property app_id from the response with the 200 status

      response-optional-property-removed

    • removed the optional property headers from the response with the 200 status

      response-optional-property-removed

    • removed the optional property role from the response with the 200 status

      response-optional-property-removed

    • removed the livekit_participant enum value from the type response property for the response status 200

      response-property-enum-value-removed

    • removed the livekit_publish enum value from the type response property for the response status 200

      response-property-enum-value-removed

    • removed the moq_in enum value from the type response property for the response status 200

      response-property-enum-value-removed

    • removed the websocket_in enum value from the type response property for the response status 200

      response-property-enum-value-removed

    • removed the websocket_out enum value from the type response property for the response status 200

      response-property-enum-value-removed

    • removed the whatsapp_in enum value from the type response property for the response status 200

      response-property-enum-value-removed

    • removed the whatsapp_out enum value from the type response property for the response status 200

      response-property-enum-value-removed

    • added the required property leg_id to the response with the 200 status

      response-required-property-added

    This revision also has 40 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • the response property held became required for the status 200

      response-property-became-required

    • the response property muted became required for the status 200

      response-property-became-required

    This revision also has 6 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog