Query Allowed Numbers List
Query the call allowlists.
Request URL
GET {base_url}/{api_path}/allow_numbers/list?access_token={access_token}
Request parameters
Parameter | Required | Type | Description |
---|---|---|---|
page | No | Integer | Define which page is displayed. |
page_size | No | Integer | Define how many records per page. |
sort_by | No | String | Define the sorting field. Valid value:
|
order_by | No | String | Define the display order. Valid value:
|
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.
|
total_number | Integer | The total number of allowlist rules. |
data | Array <Allowlist_Info> | The list of the allowed numbers' information. |
- Allowlist_Info
-
Table 3. Parameter Type Description id Integer The unique ID of the allowlist rule. name String The name of the allowlist rule. limit_type String The communication type that applies to the allowlist rule. number_list String The numbers that will be allowed by the system.
Examples
Request example
GET /openapi/v1.0/allow_numbers/list?access_token=DfwoCmAqPuexIOQH1NY7j8l8U391niHD HTTP/1.1
Host: yeastardocs.example.yeastarcloud.com
Response example
HTTP/1.1 200 OK
{
"errcode": 0,
"errmsg": "SUCCESS",
"total_number": 2,
"data": [
{
"id": 2,
"name": "Test List",
"limit_type": "both",
"number_list": "9011."
},
{
"id": 1,
"name": "Dependable Calls",
"limit_type": "both",
"number_list": "12355"
}
]
}