Delete numbers of SIP Trunk
Delete SIP trunk numbers
Delete phone numbers from a specific SIP trunk.
Note: A maximum of 500 phone numbers can be deleted in a single request. Phone numbers currently in use (in inbound projects, outbound projects, or assigned to operators) cannot be deleted and will result in an error.
| Request | |
|---|---|
| Method | DELETE |
| Resource | https://[customer].asp.virtual-call-center.eu/v2/sip_trunks/[trunkid]/numbers |
| Options | N/A |
| Body | JSON object containing an array of phone numbers to delete. |
| Response | |
| Body | Object containing status per phone number and any errors encountered, encoded in JSON. |
Request
Resource parameters
| Name | Type | Mandatory | Comment |
|---|---|---|---|
| customer | string | yes | Your account name. |
| trunkid | string | yes | Unique SIP trunk identifier (routing ID). |
Body parameters
| Name | Type | Mandatory | Comment |
|---|---|---|---|
| numbers | array of strings | yes | List of phone numbers to delete (maximum 500 numbers). |
Response
Response object
| Name | Type | Comment |
|---|---|---|
| [number] | boolean | Indicates whether the phone number was successfully removed (true). |
Errors object
| Name | Type | Comment |
|---|---|---|
| errorcode | integer | Error code identifying the error type (e.g. 600). |
| errormessage | string | Error message describing why the number could not be deleted (e.g. error.phone_number_used_in_outbound). |
| property | string | Property associated with the error (e.g. numbers). |
| index | integer | 0-based index of the failed number in the request array. |
Example
URL: https://mycc.asp.virtual-call-center.eu/v2/sip_trunks/mycc_carrier_customer_routing/numbers
Request Body:
{
"numbers": [
"3619999001",
"3619999002"
]
}
Response:
{
"response": {
"3619999001": true
},
"errors": [
{
"errorcode": 600,
"errormessage": "error.phone_number_used_in_outbound",
"property": "numbers",
"index": 1
}
]
}
Comments
Can’t find what you need? Use the comment section below to connect with others, get answers from our experts, or share your ideas with us.
There are no comments yet.