Skip to main content

Update Trunk Group

This request updates the Trunk Group object, targeted by secure ID.

patch /trunk_groups/{trunk_group_sid}
put /trunk_groups/{trunk_group_sid}

Sample

A sample PATCH request to update request to update the trunk group targeted by secure ID:

curl -X PATCH \
'https://api.carrierx.com/core/v2/trunk_groups/c7eae0b4-5eda-4964-8998-d514903b4af0' \
-H 'Content-Type: application/json' \
--data-binary '{"name": "TrunkGroup4"}' \
-H 'Authorization: Bearer 5ebc03d6-8b2b-44ad-bf65-72d4f1491dda'

Response

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

{
"acls": [],
"hard_failure_codes": "408;",
"hard_failure_cooldown": 120,
"hard_failure_interval": 60,
"hard_failure_last_resort": "first",
"hard_failure_threshold": 3,
"name": "TrunkGroup4",
"partner_sid": "ed437757-002d-4ecc-aa5a-efdf5e50dba0",
"routing_data": null,
"routing_type": "failover",
"sip_options_locations": [],
"sip_options_threshold": 3,
"soft_failure_codes": "408;",
"transformations": [],
"trunk_group_sid": "c7eae0b4-5eda-4964-8998-d514903b4af0"
}

A Trunk Group 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 trunk group 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 Trunk Group object. The trunk group secure ID is passed in the query URL, and the entire Trunk Group 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 a Trunk Group object, the partner must have one of the following scopes enabled:

  • trunk_groups.manage
  • trunk_groups.update

Path Arguments

ParameterData TypeDescription
trunk_group_sid requiredstringThe trunk group secure ID.

Body Arguments

JSON representation of the fields and values to be updated.

Fields that can be modified are:

  • acls
  • hard_failure_codes
  • hard_failure_cooldown
  • hard_failure_interval
  • hard_failure_last_resort
  • hard_failure_threshold
  • name
  • routing_data
  • routing_type
  • sip_options_locations
  • sip_options_threshold
  • soft_failure_codes
  • transformations

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