JSON API » numbers » numbers/system/update
Updates the system fields of an existing number.
Input parameters
Requires authentication and the system role privilege.
| Name | Type | Description | Required | Default value |
|---|---|---|---|---|
| auth_username | String | Authentication username. | Yes | |
| auth_password | String | Authentication password. | Yes | |
| number | String | Number to update. | Yes | |
| alias | String | Alias. | No | Current value. |
| class | Integer | ID of number class. | No | Current value. |
| customer | Integer | ID of customer owning the number. | No | Current value. |
| region | Integer | ID of region. 0 for none. | No | Current value. |
| shortcut | Integer | 1 to route calls to the number internally, 0 not to. | No | Current value. |
| validation | Integer | 1 to validate input then return, 0 for full action. | No | 0 |
If the customer is changed, no billing is done. If billing is required, use numbers/purchase or numbers/delete instead.
Responses
| Code | Description |
|---|---|
| 201 | Input passed validation. Only returned if validation=1. |
| 204 | Success. |
| 400 | Invalid input parameters specified. Check the key and message fields for more details. |
| 401 | The authentication details provided are invalid. |
| 402 | Your role does not allow this. |
| 404 | The number does not exist, or you do not have permission to update it. |
Data returned
No data is returned.
Example: Changing the number class
http://enswitch.example.com/api/json/numbers/system/update/?auth_username=user;auth_password=password;number=2125551234;class=123{ "responses":[ { "code":"204", "key":"", "message":"OK" } ] }
Change history
| Version | Changes |
|---|---|
| 3.13 | Function added. |
