Add a Blocked Number Rule
Add and configure a call blocklist rule.
Request URL
POST {base_url}/{api_path}/block_numbers/create?access_token={access_token}
Request parameters
| Parameter | Required | Type | Description |
|---|---|---|---|
| name | Yes | String | The name of the call blocklist rule. |
| limit_type | Yes | String | The communication type that will be applied to the call
blocklist rule. Valid value:
|
| number_list | Yes | String | The numbers that will be blocked by the system. Note: Use & to separate
multiple numbers. |
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.
|
| id | Integer | The unique ID of the call blocklist rule. |
Examples
Request example
POST /openapi/v1.0/block_numbers/create?access_token=OPmgiTyngN4XJrvYAYepnmVJdggXbOjF HTTP/1.1 Host: yeastardocs.example.yeastarcloud.com Content-Type: application/json { "name":"Product Promotion", "limit_type":"inbound", "number_list":"1386011111&010879378" }
Response example
HTTP/1.1 200 OK { "errcode": 0, "errmsg": "SUCCESS", "id": 5 }