Skip to main content

Update a Call

PUT 

/calls

To update an existing Call, you send a PUT request to the Call resource with a payload including an update command and additional nested params.

Request

Body

required

    command stringrequired

    Possible values: [update]

    params

    object

    required

    oneOf

    url stringrequired

    The URL to handle the call. This parameter allows you to specify a webhook or different route in your code containing SWML instructions for handling the call. Either url or swml must be included for a new call.

    id stringrequired

    The id of an existing call.

    fallback_url string

    The Fallback URL to handle the call. This parameter allows you to specify a backup webhook or different route in your code containing SWML instructions for handling the call.

    status string

    Possible values: [canceled, completed]

    Either canceled (to cancel a not yet connected call) or complete (to end a call that is in progress).

Responses

The request has succeeded.

Schema

    id stringrequired

    The unique identifier of the call on SignalWire. This can be used to update the call programmatically.

    from stringrequired

    The origin number or address.

    to stringrequired

    The destination number or address.

    direction stringrequired

    Possible values: [outbound-api]

    The direction of the call.

    status stringrequired

    Possible values: [answered, queued, initiated, ringing, ending, ended]

    The status of the call.

    duration integerrequired

    The duration of the call in seconds.

    duration_ms integerrequired

    The duration of the call in milliseconds.

    billable_duration integerrequired

    The billable duration of the call in seconds.

    source stringrequired

    Possible values: [realtime_api]

    Source of this call.

    type stringrequired

    Possible values: [relay_pstn_call, relay_sip_call, relay_webrtc_call]

    Type of this call.

    charge

    object[]

    required

    Details on charges associated with this call.

  • Array [

  • description stringrequired

    Description for this charge.

    amount integerrequired

    Charged amount.

  • ]

Loading...