Skip to main content

Update Endpoint

This request updates an endpoint, targeted by secure ID.

patch /endpoints/{endpoint_sid}
put /endpoints/{endpoint_sid}

Sample

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

curl -X PATCH \
'https://api.carrierx.com/core/v2/endpoints/00bf8b25-1e20-4f80-8529-8448df32d71a' \
-H 'Content-Type: application/json' \
--data-binary '{"name":"my_third_party_ep"}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'

Response

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

{
"addresses": [
{
"direction": "any",
"dst_port": 5060,
"ip": "1.1.2.13",
"location_sid": null,
"port": 5060,
"priority": 0,
"sip_password": null,
"sip_username": null,
"srtp": false,
"transport": "udp"
}
],
"attributes": {},
"capacity": 0,
"cps_limit": null,
"endpoint_sid": "1a34c5e9-3a09-4de5-b553-5f6a9ef202ac",
"name": "my_third_party_ep",
"out_sip_password": null,
"out_sip_username": null,
"partner_sid": "ed437757-002d-4ecc-aa5a-efdf5e50dba0",
"properties": {},
"transformations": [],
"type": "third_party",
"voip_token": "2c95517b-a5e8-4415-b471-cdd81d5a6dcb"
}

An Endpoint 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 endpoint secure ID is passed in the query URL, and the values to be modified are passed in the request body.

    The Endpoint object also contains nested Addresses, Attributes, Properties, and Transformations objects. Refer to this section to learn how nested objects can be updated using the PATCH request.

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

note

Note, while all the fields must be present in a PUT request, not all the attribute values may be modified after the initial creation, because when created, some of them become read-only.

Required Scopes

To update an Endpoint object, the partner must have one of the following scopes enabled:

  • endpoints.manage
  • endpoints.update

Path Arguments

ParameterData TypeDescription
endpoint_sid requiredstringThe endpoint secure ID.

Query Arguments

ParameterData TypeDescription
nested_objectsstringDetermines if the nested objects fields and values should be replaced. Value accepted in this field is replace.

Body Arguments

JSON representation of the fields and values to be updated.

note

Note that for the Mediator, FlexML, and Conference endpoints, only the name and capacity fields can be updated.

tip

For the Voicemail endpoint, the properties.callback_method, properties.callback_url, properties.container_sid, and properties.greeting can also be updated. Refer to the Voicemail Endpoint quick start guide for more information on how to create and configure Voicemail endpoint.

Refer to this table to view all fields that appear in the Endpoint object.