Phone Numbers - Update Capabilities
Updates the capabilities of a phone number.
PATCH {endpoint}/phoneNumbers/{phoneNumber}/capabilities?api-version=2021-03-07
URI Parameters
Name | In | Required | Type | Description |
---|---|---|---|---|
endpoint
|
path | True |
string |
The communication resource, for example https://resourcename.communication.azure.com. |
phone
|
path | True |
string |
The phone number id in E.164 format. The leading plus can be either + or encoded as %2B, e.g. +11234567890. |
api-version
|
query | True |
string |
Version of API to invoke. |
Request Body
Media Types: "application/merge-patch+json"
Name | Type | Description |
---|---|---|
calling |
Capability value for calling. |
|
sms |
Capability value for SMS. |
Responses
Name | Type | Description |
---|---|---|
202 Accepted |
The service has accepted the request and will start processing later. It will return 'Accepted' immediately and include an 'Operation-Location' and 'Location' headers. Client side should further query the operation status using the URL specified in 'Operation-Location' header. When operation completes successfully query final result using URL specified in 'Location' header. Headers
|
|
Other Status Codes |
Failure |
Examples
Update phoneNumber capabilities
Sample request
PATCH https://resourcename.communication.azure.com//phoneNumbers/+14792000102/capabilities?api-version=2021-03-07
{
"calling": "inbound+outbound",
"sms": "none"
}
Sample response
Operation-Location: /phoneNumbers/operations/capabilities_378ddf60-81be-452a-ba4f-613198ea6c28
Location: /phoneNumbers/%2b14792000102
operation-id: capabilities_378ddf60-81be-452a-ba4f-613198ea6c28
capabilities-id: 378ddf60-81be-452a-ba4f-613198ea6c28
{
"id": "14792000102",
"phoneNumber": "+14792000102",
"countryCode": "US",
"assignmentType": "person",
"phoneNumberType": "geographic",
"capabilities": {
"calling": "inbound+outbound",
"sms": "none"
},
"purchaseDate": "2020-11-19T16:31:49.048Z",
"cost": {
"amount": 0.8,
"currencyCode": "USD",
"billingFrequency": "monthly"
}
}
Definitions
Name | Description |
---|---|
Billing |
The frequency with which the cost gets billed. |
Communication |
The Communication Services error. |
Communication |
The Communication Services error. |
Phone |
The assignment type of the phone numbers to search for. A phone number can be assigned to a person, or to an application. |
Phone |
Capabilities of a phone number. |
Phone |
Capabilities of a phone number. |
Phone |
Capability value for calling. |
Phone |
The incurred cost for a single phone number. |
Phone |
The type of phone numbers to search for, e.g. geographic, or tollFree. |
Purchased |
Represents a purchased phone number. |
BillingFrequency
The frequency with which the cost gets billed.
Name | Type | Description |
---|---|---|
monthly |
string |
CommunicationError
The Communication Services error.
Name | Type | Description |
---|---|---|
code |
string |
The error code. |
details |
Further details about specific errors that led to this error. |
|
innererror |
The inner error if any. |
|
message |
string |
The error message. |
target |
string |
The error target. |
CommunicationErrorResponse
The Communication Services error.
Name | Type | Description |
---|---|---|
error |
The Communication Services error. |
PhoneNumberAssignmentType
The assignment type of the phone numbers to search for. A phone number can be assigned to a person, or to an application.
Name | Type | Description |
---|---|---|
application |
string |
|
person |
string |
PhoneNumberCapabilities
Capabilities of a phone number.
Name | Type | Description |
---|---|---|
calling |
Capability value for calling. |
|
sms |
Capability value for SMS. |
PhoneNumberCapabilitiesRequest
Capabilities of a phone number.
Name | Type | Description |
---|---|---|
calling |
Capability value for calling. |
|
sms |
Capability value for SMS. |
PhoneNumberCapabilityType
Capability value for calling.
Name | Type | Description |
---|---|---|
inbound |
string |
|
inbound+outbound |
string |
|
none |
string |
|
outbound |
string |
PhoneNumberCost
The incurred cost for a single phone number.
Name | Type | Description |
---|---|---|
amount |
number |
The cost amount. |
billingFrequency |
The frequency with which the cost gets billed. |
|
currencyCode |
string |
The ISO 4217 currency code for the cost amount, e.g. USD. |
PhoneNumberType
The type of phone numbers to search for, e.g. geographic, or tollFree.
Name | Type | Description |
---|---|---|
geographic |
string |
|
tollFree |
string |
PurchasedPhoneNumber
Represents a purchased phone number.
Name | Type | Description |
---|---|---|
assignmentType |
The assignment type of the phone number. A phone number can be assigned to a person, or to an application. |
|
capabilities |
Capabilities of a phone number. |
|
cost |
The incurred cost for a single phone number. |
|
countryCode |
string |
The ISO 3166-2 code of the phone number's country, e.g. US. |
id |
string |
The id of the phone number, e.g. 11234567890. |
phoneNumber |
string |
String of the E.164 format of the phone number, e.g. +11234567890. |
phoneNumberType |
The phone number's type, e.g. Geographic, TollFree. |
|
purchaseDate |
string |
The date and time that the phone number was purchased. |