Update

View as Markdown

Use this endpoint for the IncomingPhoneNumber method to modify the properties of an incoming phone number.

Path parameters

AccountSidstringRequiredformat: "uuid"
The unique identifier for the account that is associated with this phone number.
SidstringRequiredformat: "uuid"
The unique identifier of the phone number.

Request

AccountSidstringOptionalformat: "uuid"
The unique identifier for an account to which the number should be transferred. Must be within the same Space.
EmergencyAddressSidstringOptionalformat: "uuid"
The unique identifier of the address associated with E911 for this phone number. Not supported for toll-free numbers or certain providers.
FriendlyNamestringOptional1-255 characters
A friendly name for the phone number.
SmsApplicationSidstringOptionalformat: "uuid"
The unique identifier for the application associated with SMS handling on this phone number.
SmsFallbackMethodenumOptionalDefaults to POST
Whether the request to `SmsFallbackUrl` is a `GET` or a `POST`. Default is `POST`.
Allowed values:
SmsFallbackUrlstringOptionalformat: "uri"
The URL to request if errors occur when fetching SmsUrl.
SmsMethodenumOptionalDefaults to POST
Whether the request to SmsUrl is a `GET` or a `POST`. Default is `POST`.
Allowed values:
SmsUrlstringOptionalformat: "uri"
The URL to request when an incoming SMS is received.
StatusCallbackstringOptionalformat: "uri"
The URL to request to pass status updates to.
StatusCallbackMethodenumOptionalDefaults to POST
Whether the request to StatusCallback is a `GET` or a `POST`. Default is `POST`.
Allowed values:
VoiceApplicationSidstringOptionalformat: "uuid"
The unique identifier for the application associated with call handling on this phone number.
VoiceFallbackMethodenumOptionalDefaults to POST
Whether the request to VoiceFallbackUrl is a `GET` or a `POST`. Default is `POST`.
Allowed values:
VoiceFallbackUrlstringOptionalformat: "uri"
The URL to request if errors occur when fetching VoiceUrl.
VoiceMethodenumOptionalDefaults to POST
Whether the request to VoiceUrl is a `GET` or a `POST`. Default is `POST`.
Allowed values:
VoiceReceiveModeenumOptional
Whether this number can receive voice calls or faxes.
Allowed values:
VoiceUrlstringOptionalformat: "uri"
The URL to request when an incoming call is received.

Response

account_idstringRequiredformat: "uuid"
The unique identifier for the account that is associated with this phone number.
account_sidstringRequiredformat: "uuid"
The unique identifier for the account that is associated with this phone number.
address_requirementsenumRequired
Whether or not a registered address with SignalWire is required. Always 'none'.
Allowed values:
address_sidstring or nullRequired
The unique identifier for the address associated with this phone number. Always null.
api_versionstringRequired
The version of the SignalWire API.
betabooleanRequired
New numbers on SignalWire are marked as beta. Always false.
capabilitiesobjectRequired
Whether or not a number can receive calls and messages.
country_codestringRequired
The ISO 3166-1 alpha-2 country code for this phone number.
date_createdstringRequired
The date, in RFC 2822 format, this phone number was created.
date_updatedstringRequired
The date, in RFC 2822 format, this phone number was updated.
emergency_address_sidstring or nullRequired
The unique identifier of the address associated with E911 for this phone number, or null if not set.
emergency_statusstringRequired
Whether the phone route has an active E911 address associated. 'Active' or 'Inactive'.
friendly_namestringRequired
A formatted version of the number.
identity_sidstring or nullRequired
The unique identifier for the identity associated with this phone number. Always null.
originenumRequired
The origin of the phone number.
Allowed values:
phone_numberstringRequired
The incoming number in E.164 format.
sidstringRequired
The unique identifier for this phone number.
sms_application_sidstring or nullRequired
The unique identifier for the application associated with SMS handling on this phone number, or null if not set.
sms_fallback_methodstringRequired
Whether the request to `SmsFallbackUrl` is a `GET` or a `POST`.
sms_fallback_urlstring or nullRequired
The URL to request if errors occur when fetching SmsUrl, or null if not set.
sms_methodstringRequired
Whether the request to SmsUrl is a `GET` or a `POST`.
sms_urlstring or nullRequired
The URL to request when an incoming SMS is received, or null if not set.
status_callbackstring or nullRequired
The URL to request to pass status updates to, or null if not set.
status_callback_methodstringRequired
Whether the request to StatusCallback is a `GET` or a `POST`.
trunk_sidstring or nullRequired
The unique identifier for the Trunk associated with this phone number. Always null.
uristringRequired
The URI for this number.
voice_application_sidstring or nullRequired
The unique identifier for the application associated with call handling on this phone number, or null if not set.
voice_caller_id_lookupboolean or nullRequired
Whether or not to look up a caller's name in the database. Always null.
voice_fallback_methodstringRequired
Whether the request to VoiceFallbackUrl is a `GET` or a `POST`.
voice_fallback_urlstring or nullRequired
The URL to request if errors occur when fetching `Url`, or null if not set.
voice_methodstringRequired
Whether the request to Url is a `GET` or a `POST`.
voice_urlstring or nullRequired
The URL to request when an incoming call is received, or null if not set.
verification_statusstringOptional
The verification status for toll-free numbers. Only present for toll-free numbers.

Request examples

1const { RestClient } = require('@signalwire/compatibility-api')
2const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
3
4client.incomingPhoneNumbers('IncomingPhoneNumberSid')
5 .update()
6 .then(incoming_phone_number => console.log(incoming_phone_number.friendlyName))
7 .done();

Request: update an IncomingPhoneNumber’s VoiceUrl

In this example, we will update the URL that SignalWire will request when a call to your account is received.

1const { RestClient } = require('@signalwire/compatibility-api')
2const client = RestClient('YourProjectID', 'YourAuthToken', { signalwireSpaceUrl: 'example.signalwire.com' })
3
4client.incomingPhoneNumbers('IncomingPhoneNumberSid')
5 .update({
6 accountSid: 'b3877c40-da60-4998-90ad-b792e98472ac',
7 voiceUrl: 'http://your-application.com/docs/voice.xml'
8 })
9 .then(incoming_phone_number => console.log(incoming_phone_number.friendlyName))
10 .done();