Phone Numbers - Get Search Result
Gets a phone number search result by search id.
GET {endpoint}/availablePhoneNumbers/searchResults/{searchId}?api-version=2025-06-01
URI Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
|
endpoint
|
path | True |
string (url) |
The communication resource, for example https://resourcename.communication.azure.com |
|
search
|
path | True |
string |
The search Id. |
|
api-version
|
query | True |
string |
Version of API to invoke |
Responses
| Name | Type | Description |
|---|---|---|
| 200 OK |
Success |
|
| Other Status Codes |
Failure |
Examples
Get PhoneNumber Search Result
Sample request
GET https://resourcename.communication.azure.com//availablePhoneNumbers/searchResults/378ddf60-81be-452a-ba4f-613198ea6c28?api-version=2025-06-01
Sample response
{
"searchId": "378ddf60-81be-452a-ba4f-613198ea6c28",
"phoneNumbers": [
"+18001212121"
],
"phoneNumberType": "tollFree",
"assignmentType": "application",
"capabilities": {
"sms": "inbound+outbound",
"calling": "none"
},
"cost": {
"amount": 1.2,
"currencyCode": "USD",
"billingFrequency": "monthly"
},
"searchExpiresBy": "2020-11-19T16:31:49.048Z",
"isAgreementToNotResellRequired": false,
"errorCode": 1000,
"error": "OutOfStock"
}
Definitions
| Name | Description |
|---|---|
|
Billing |
The frequency with which the cost gets billed. |
|
Communication |
The Communication Services error. |
|
Communication |
The Communication Services error. |
| Error |
Mapping Error Messages to Codes |
|
Phone |
Represents the assignment type of the offering. |
|
Phone |
Capabilities of a phone number. |
|
Phone |
Capability value for calling. |
|
Phone |
The incurred cost for a single phone number. |
|
Phone |
The result of a phone number search operation. |
|
Phone |
Represents the number type of the offering. |
BillingFrequency
The frequency with which the cost gets billed.
| Value | Description |
|---|---|
| monthly |
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. |
Error
Mapping Error Messages to Codes
| Value | Description |
|---|---|
| NoError | |
| UnknownErrorCode | |
| OutOfStock | |
| AuthorizationDenied | |
| MissingAddress | |
| InvalidAddress | |
| InvalidOfferModel | |
| NotEnoughLicenses | |
| NoWallet | |
| NotEnoughCredit | |
| NumbersPartiallyAcquired | |
| AllNumbersNotAcquired | |
| ReservationExpired | |
| PurchaseFailed | |
| BillingUnavailable | |
| ProvisioningFailed | |
| UnknownSearchError |
PhoneNumberAssignmentType
Represents the assignment type of the offering.
| Value | Description |
|---|---|
| person | |
| application |
PhoneNumberCapabilities
Capabilities of a phone number.
| Name | Type | Description |
|---|---|---|
| calling |
Capability value for calling. |
|
| sms |
Capability value for SMS. |
PhoneNumberCapabilityType
Capability value for calling.
| Value | Description |
|---|---|
| none | |
| inbound | |
| outbound | |
| inbound+outbound |
PhoneNumberCost
The incurred cost for a single phone number.
| Name | Type | Description |
|---|---|---|
| amount |
number (double) |
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. |
PhoneNumberSearchResult
The result of a phone number search operation.
| Name | Type | Description |
|---|---|---|
| assignmentType |
Phone number's assignment type. |
|
| capabilities |
Capabilities of a phone number. |
|
| cost |
The incurred cost for a single phone number. |
|
| error |
Mapping Error Messages to Codes |
|
| errorCode |
integer (int32) |
The error code of the search. |
| isAgreementToNotResellRequired |
boolean |
Indicates if do not resell agreement is required. If true, the phone numbers cannot be acquired unless the customer provides explicit agreement to not resell them. |
| phoneNumberType |
The phone number's type, e.g. geographic, tollFree, mobile. |
|
| phoneNumbers |
string[] |
The phone numbers that are available. Can be fewer than the desired search quantity. |
| searchExpiresBy |
string (date-time) |
The date that this search result expires and phone numbers are no longer on hold. A search result expires in less than 15min, e.g. 2020-11-19T16:31:49.048Z. |
| searchId |
string |
The search id. |
PhoneNumberType
Represents the number type of the offering.
| Value | Description |
|---|---|
| geographic | |
| tollFree | |
| mobile |