Edit an Outbound Route

Edit the configuration of an outbound route.

Request URL

POST {base_url}/{api_path}/outbound_route/update?access_token={access_token}

Request parameters

Table 1.
Parameter Required Type Description
id Yes Integer The unique ID of the outbound route.
Note: To obtain the outbound route's ID, see Search Specific Outbound Routes.
name No String Outbound route name.
outbound_cid No String Outbound caller ID.
dial_pattern_list No Array<Dial_Pattern_List> The dial pattern of the outbound route.
trunk_list No Array<Trunk_List> The selected trunk in the outbound route.
ext_list No Array<Ext_List> The selected extensions in the outbound route.
pin_protect No String Outbound route password.
Valid value:
  • disable
  • single_pin
  • pin_list
pin No String Single PIN code.
Note: This parameter is required when the value of pin_protect is set to single_pin.
pin_list No Integer The unique ID of the selected PIN list.
Note:
  • This parameter is required when the value of pin_protect is set to pin_list.
  • You can query the PIN list ID using Get Menu Options.
Dial_Pattern_List
Table 2.
Parameter Required Type Description
pattern No String The dial pattern matching rules.
strip No Integer The number of digits that will be stripped from the beginning of a dialed number before the call is placed.
prepend No String The digits that will be prepended to the phone number before the call is placed.
Trunk_List
Table 3.
Parameter Required Type Description
id Yes Integer The unique ID of the selected trunk.
name No String Trunk name.
type No String Trunk type.
Ext_List
Table 4.
Parameter Required Type Description
id Yes Integer The unique ID of the selected extension/extension group/organization.
Note: You can query the desired ID using Get Menu Options.
ext_number No String Extension number.
ext_name No String The name of the extension/extension group/organization.
type Yes String The selected type.

Valid value:

  • extension
  • ext_group
  • organization

Response parameters

Table 5.
Parameter Type Description
errcode Integer Returned error code.
  • 0: Succeed.
  • Non-zero value: Failed.
Note: You can check the error code and error message in Error Code and Error Message.
errmsg String Returned message.
  • SUCCESS: Succeed.
  • FAILURE: Failed.

Examples

Request example

POST /openapi/v1.0/outbound_route/update?access_token=EepE7JpKkhEWCjiOVqi9u3TJnYF1vLg1 HTTP/1.1

Host: yeastardocs.example.yeastarcloud.com
Content-Type: application/json
{
    "id": 19,
    "pin_protect":"single_pin",
    "pin":"1234"
}

Response example

HTTP 200 OK
{
    "errcode": 0,
    "errmsg": "SUCCESS"
}