Skip to content

Deactivates a virtual number

Method disable.virtual_numbers
Description Deactivates a virtual number
Who has access Agents and clients

Request parameters

Name Type Required Description
access_token string yes Session key used to authenticate the request
virtual_phone_number string no Virtual phone number to deactivate. Either virtual_phone_number or number_capacity_ids must be provided.
number_capacity_ids array no Array of number-capacity IDs to deactivate. Either virtual_phone_number or number_capacity_ids must be provided.
user_id number no Unique ID of the client user on whose behalf the request is made. Required when an agent makes the request. To retrieve a list of client users, call "get.customer_users".

Virtual numbers assigned to advertising campaigns cannot be deactivated. When a number of type uis is deactivated, all associated settings are deleted.

JSON request structure

{
  "jsonrpc": "2.0",
  "id": "number",
  "method": "disable.virtual_numbers",
  "params": {
    "access_token": "string",
    "user_id": "number",
    "virtual_phone_number": "string"
  }
}

JSON response structure

{
  "jsonrpc": "2.0",
  "id": "number",
  "result": {
    "success": true
  }
}

List of returned errors

Error text Code Mnemonic
The virtual number is used by another entity. -32602 dependency_error
Virtual phone number {virtual_phone_number} was not found. -32007 virtual_phone_number_not_found

For errors common to all methods, see the Data API — General documentation.