Update DID
This request updates a DID, targeted by secure ID.
| patch | /dids/{did_sid} |
| put | /dids/{did_sid} |
A DID object can be updated using either a PATCH or PUT request.
-
A
PATCHrequest can be used to update one or more attribute values. When using aPATCHrequest, only the attributes specified in the request payload will be updated, all other attributes and values will remain the same. The DID secure ID is passed in the query URL, and the values to be modified are passed in the request body. -
A
PUTrequest can be used to update an entire DID object. The DID secure ID is passed in the query URL, and the entire DID object is passed in the request body.
Note, while all fields must be present in a PUT request, not all attributes values may be modified after initial creation.
Example Request
An example PATCH request to update the DID object, targeted by secure ID, with the values in the request body:
curl -X PATCH \
'https://api.carrierx.com/flexml/v1/dids/d72c0ec3-c21d-4db1-8877-690cb9644fbc' \
-H 'Content-Type: application/json' \
--data-binary '{"method":"GET"}' \
-u 'flexml_user_123:qwerty123'
Example Response
200 status code with a serialized copy of the updated DID object:
{
"account_sid": "1d4adc32-45d1-4789-9780-928049e2bce1",
"country_code": "USA",
"did_sid": "d72c0ec3-c21d-4db1-8877-690cb9644fbc",
"in_country_format": "(516) 206-5319",
"international_format": "+1 516-206-5319",
"method": "GET",
"phonenumber": "15162065319",
"status_callback_method": "POST",
"status_callback_url": null,
"url": null
}
Path Arguments
| Parameter | Data Type | Description |
|---|---|---|
| did_sid read only | string | The DID secure ID. |
Body Arguments
JSON representation of the fields and values to be updated.
Fields that can be modified are:
methodstatus_callback_methodstatus_callback_urlurl
For a complete list of DID object attributes, refer to this table.