Skip to main content

Update Binding

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

patch /bindings/{binding_sid}
put /bindings/{binding_sid}

Sample

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

curl -X PATCH \
'https://api.carrierx.com/mediator/v1/bindings/bedd33b1-2961-458e-b35a-bf80260cdba4' \
-H 'Content-Type: application/json' \
--data-binary '{"maximum_ttl":-1}' \
-u 'mediator_user_123:qwerty123'

Response

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

{
"body": {
"account_sid": "13e156f7-0d21-4ba6-9e32-c56dc2c6098f",
"attributes": {},
"binding_sid": "bedd33b1-2961-458e-b35a-bf80260cdba4",
"date_created": "2025-04-05T23:13:03.000Z",
"destination_did": "15162065338",
"dtmf": null,
"maximum_ttl": -1,
"name": "N/A",
"origination_did": null,
"redirect_did": "15162065337",
"redirect_did_info": {
"country_code": "USA",
"e164_format": "+15162065337",
"in_country_format": "(516) 206-5337",
"international_format": "+1 516-206-5337",
"phonenumber": "15162065337"
},
"wait_origination_did_ttl": -1
},
"status": 200
}

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

  • PATCH: Updates one or more attribute values. Only the attributes specified in the request payload will be updated; all other attributes and values will remain unchanged. The binding secure ID is passed in the query URL, and the values to be modified are passed in the request body.

  • PUT: Updates the entire Binding object. The binding secure ID is passed in the query URL, and the complete Binding object is passed in the request body.

note

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

Path Arguments

ParameterData TypeDescription
binding_sid requiredstringThe binding secure ID.

Body Arguments

JSON representation of the fields and values to be updated.

Fields that can be modified are:

  • attributes
  • destination_did
  • dtmf
  • maximum_ttl
  • name
  • origination_did
  • redirect_did
  • wait_origination_did_ttl

For a complete list of Binding object attributes, refer to this section.