Edit an Emergency Number
Edit an emergency number.
Request URL
POST {base_url}/{api_path}/emergency_number/update?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| id | Yes | Integer | The unique ID of an emergency number. Note: You can query
emergency number's ID using the Query Emergency Number List
interface. |
| name | No | String | The new name of the emergency number. Maximum length: 63 characters. |
| number | No | String | The new emergency number. Only letters, numbers, and ( ) . - + * # are allowed. Maximum length: 31 characters. The number must be unique globally. |
| trunks | No | Array<Emergency_Trunk> | The new trunk configurations of the emergency number, with at least one entry. The entire trunk list is replaced with the submitted content, and trunk_id must not be duplicated in the list. |
| member_select | No | String | The new extension scope of the emergency number. Valid value:
|
| outb_cid_option | No | String | The new priority of the outbound caller ID. Valid value:
|
- Emergency_Trunk
-
Parameter Type Description trunk_id Integer The unique ID of a trunk. Note: You can query trunk's ID using the Query Trunk List interface.outb_cid String The caller ID displayed for calls routed through this trunk. Maximum length: 31 characters. prepend String The digits prepended to the dialed number. strip Integer The number of digits to strip from the dialed number. The value 0 means no stripping. Valid values: 0 to 16. exts Array<Emergency_Ext> The scope entries where this trunk takes effect. Note: This field is required when member_select is sel_specific.
- Emergency_Ext
-
Parameter Type Description type String The type of the scope entry. extension: The entry applies to an extension (value is the extension number).ext_group: The entry applies to an extension group (value is the extension group ID).all: The entry applies to all extensions (value is ignored).
value String The identifier of the scope entry: the extension number when type is extension, the extension group ID when type is ext_group, and ignored when type is all.
Response parameters
| Parameter | Type | Description |
|---|---|---|
| errcode | Integer | Returned error code.
Note: You can check the error code and
error message in Error Code and Error Message.
|
| errmsg | String | Returned message.
|
Example
Request example
POST /openapi/v1.0/emergency_number/update?access_token=lweYFZuwsgSrhFOKC3Z0XmDRXfbPohi6 HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Content-Type: application/json
{
"id": 2,
"name": "API Test Emergency Edited"
}
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS"
}