Change number properties
Overview
Phone number properties are changed by making the PUT request to /accounts/{accountSID}/numbers/{numberSID}.
The request must contain new values for the parameters listed below.
Input parameters
Parameter | Default | Description | Default Value |
---|---|---|---|
call_app_sid | default_call_app_sid | Link to the existing application, which is used for Call operations. For more details please refer to Create application article. | existing application SID |
msg_app_sid | default_msg_app_sid | Link to the existing application, which is used for Message operations. For more details please refer to Create application article. Please note that only one of the parameters call_app_sid or msg_app_sid can be specified (the other must be null). | existing application SID |
sip_password | none | Password for making calls by using the SIP protocol. Important This parameter makes sense only for the voice enabled phone numbers (local and sip type) | String, minimum 8, maximum 32 symbols (combination of latin letters and numbers). |
endpoint_sid | null | Endpoint unique identifier For more details please refer to Link endpoint to number article | none |
mode | xml | Parameter which regulates the phone number mode. Modes can be as following: end_point - enables sip-trunking mode; | |
voice_recording | false | Enables or disables voice recording for this number. Important: This parameter is true only for the phone numbers with 'voice': 'true' and mode: xml | boolean: true or false |
call_outbound_mode | Default | Description | Description |
call_inbound_mode | Default | Description | Description |
Request example
The following cURL request demonstrates updating account status.
curl –X PUT https://api.apifonica.com/v2/accounts/{accountSID}/numbers/{numberSID} \
-H 'Content-Type: application/json' \
-d '{
"call_app_sid": "app3b033f1b-777b-3b53-8949-ca8f2c60bba1",
"mode": "sip_phone"
}' \
-u {accountSID}:{authToken}
Response example
{
"status_code": 200,
"status_message": "OK",
"uri": "/accounts/{accountSID}/numbers/{numberSID}"
}