Skip to main content

Update Call

This request updates a call, targeted by its secure ID.

patch/calls/{call_sid}
put/calls/{call_sid}

A Call object can be updated using either a PATCH or PUT request.

  • A PATCH request can be used to update one or more attribute values. When using a PATCH request, only the attributes specified in the request payload will be updated, all other attributes and values will remain the same. The call secure ID is passed in the query URL, and the values to be modified are passed in the request body.

  • A PUT request can be used to update an entire Call object. The call secure ID is passed in the query URL, and the entire Call object is passed in the request body.

info

Note, while all fields must be present in a PUT request, not all attributes values may be modified after initial creation.

Sample

A sample PATCH request to update the Call object, targeted by its secure ID, with the values in the request body:

curl -X PATCH \
'https://api.carrierx.com/flexml/v1/calls/9dc690bb-a627-4af6-95be-0e259250d8df' \
-H 'Content-Type: application/json' \
--data-binary '{"delay": 1000}' \
-u 'flexml_user_123:qwerty123'

Response

200 status code with a serialized copy of the updated Call object:

{
"account_sid": "1d4adc32-45d1-4789-9780-928049e2bce1",
"attributes": {},
"call_sid": "9dc690bb-a627-4af6-95be-0e259250d8df",
"called_did": "15162065317",
"calling_did": "15162065319",
"date_created": "2018-10-16T21:56:49.000Z",
"delay": 1000,
"method": "POST",
"status_callback_method": "POST",
"status_callback_url": null,
"url": null
}

Path Arguments

ParameterData TypeDescription
call_sid
read only
string

The call secure ID.

Body Arguments

JSON representation of the fields and values to be updated.

Fields that can be modified are:

  • attributes
  • called_did
  • calling_did
  • delay
  • method
  • status_callback_method
  • status_callback_url
  • url

For a complete list of Call object attributes, refer to this table.