PhoneNumbersClient (stable:2025-02-11)

2025/02/10 • 14 new methods

PhoneNumbers_ListAreaCodes (new)
Description Gets the list of available area codes.
Reference Link ¶

⚼ Request

GET:  /availablePhoneNumbers/countries/{countryCode}/areaCodes
{
countryCode: string ,
phoneNumberType: string ,
skip: integer ,
maxPageSize: integer ,
assignmentType: string ,
locality: string ,
administrativeDivision: string ,
api-version: string ,
accept-language: string ,
}

⚐ Response (200)

{
areaCodes:
[
{
areaCode: string ,
}
,
]
,
nextLink: string ,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
innererror: string ,
}
,
}
PhoneNumbers_ListAvailableCountries (new)
Description Gets the list of supported countries.
Reference Link ¶

⚼ Request

GET:  /availablePhoneNumbers/countries
{
skip: integer ,
maxPageSize: integer ,
api-version: string ,
accept-language: string ,
}

⚐ Response (200)

{
countries:
[
{
localizedName: string ,
countryCode: string ,
}
,
]
,
nextLink: string ,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
innererror: string ,
}
,
}
PhoneNumbers_ListAvailableLocalities (new)
Description Gets the list of cities or towns with available phone numbers.
Reference Link ¶

⚼ Request

GET:  /availablePhoneNumbers/countries/{countryCode}/localities
{
countryCode: string ,
skip: integer ,
maxPageSize: integer ,
administrativeDivision: string ,
api-version: string ,
accept-language: string ,
}

⚐ Response (200)

{
phoneNumberLocalities:
[
{
localizedName: string ,
administrativeDivision:
{
localizedName: string ,
abbreviatedName: string ,
}
,
}
,
]
,
nextLink: string ,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
innererror: string ,
}
,
}
PhoneNumbers_ListOfferings (new)
Description List available offerings of capabilities with rates for the given country.
Reference Link ¶

⚼ Request

GET:  /availablePhoneNumbers/countries/{countryCode}/offerings
{
countryCode: string ,
skip: integer ,
maxPageSize: integer ,
phoneNumberType: string ,
assignmentType: string ,
api-version: string ,
accept-language: string ,
}

⚐ Response (200)

{
phoneNumberOfferings:
[
{
phoneNumberType: enum ,
assignmentType: enum ,
availableCapabilities:
{
calling: enum ,
sms: enum ,
}
,
cost:
{
amount: number ,
currencyCode: string ,
billingFrequency: enum ,
}
,
}
,
]
,
nextLink: string ,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
innererror: string ,
}
,
}
PhoneNumbers_SearchAvailablePhoneNumbers (new)
Description Search for available phone numbers to purchase.
Reference Link ¶

⚼ Request

POST:  /availablePhoneNumbers/countries/{countryCode}/:search
{
countryCode: string ,
api-version: string ,
body:
{
phoneNumberType: enum ,
assignmentType: enum ,
capabilities:
{
calling: enum ,
sms: enum ,
}
,
areaCode: string ,
quantity: integer ,
}
,
}

⚐ Response (202)

{
$headers:
{
location: string ,
operation-location: string ,
operation-id: string ,
search-id: string ,
}
,
$schema:
{
searchId: string ,
phoneNumbers:
[
string ,
]
,
phoneNumberType: enum ,
assignmentType: enum ,
capabilities:
{
calling: enum ,
sms: enum ,
}
,
cost:
{
amount: number ,
currencyCode: string ,
billingFrequency: enum ,
}
,
searchExpiresBy: string ,
errorCode: integer ,
error: enum ,
}
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
innererror: string ,
}
,
}
PhoneNumbers_GetSearchResult (new)
Description Gets a phone number search result by search id.
Reference Link ¶

⚼ Request

GET:  /availablePhoneNumbers/searchResults/{searchId}
{
searchId: string ,
api-version: string ,
}

⚐ Response (200)

{
searchId: string ,
phoneNumbers:
[
string ,
]
,
phoneNumberType: enum ,
assignmentType: enum ,
capabilities:
{
calling: enum ,
sms: enum ,
}
,
cost:
{
amount: number ,
currencyCode: string ,
billingFrequency: enum ,
}
,
searchExpiresBy: string ,
errorCode: integer ,
error: enum ,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
innererror: string ,
}
,
}
PhoneNumbers_PurchasePhoneNumbers (new)
Description Purchases phone numbers.
Reference Link ¶

⚼ Request

POST:  /availablePhoneNumbers/:purchase
{
api-version: string ,
body:
{
searchId: string ,
}
,
}

⚐ Response (202)

{
operation-location: string ,
operation-id: string ,
purchase-id: string ,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
innererror: string ,
}
,
}
PhoneNumbers_GetOperation (new)
Description Gets an operation by its id.
Reference Link ¶

⚼ Request

GET:  /phoneNumbers/operations/{operationId}
{
operationId: string ,
api-version: string ,
}

⚐ Response (200)

{
$headers:
{
location: string ,
}
,
$schema:
{
operationType: enum ,
status: enum ,
resourceLocation: string ,
createdDateTime: string ,
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
innererror: string ,
}
,
id: string ,
lastActionDateTime: string ,
}
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
innererror: string ,
}
,
}
PhoneNumbers_CancelOperation (new)
Description Cancels an operation by its id.
Reference Link ¶

⚼ Request

DELETE:  /phoneNumbers/operations/{operationId}
{
operationId: string ,
api-version: string ,
}

⚐ Response (204)

{}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
innererror: string ,
}
,
}
PhoneNumbers_UpdateCapabilities (new)
Description Updates the capabilities of a phone number.
Reference Link ¶

⚼ Request

PATCH:  /phoneNumbers/{phoneNumber}/capabilities
{
phoneNumber: string ,
api-version: string ,
body:
{
calling: enum ,
sms: enum ,
}
,
}

⚐ Response (202)

{
$headers:
{
location: string ,
operation-location: string ,
operation-id: string ,
capabilities-id: string ,
}
,
$schema:
{
id: string ,
phoneNumber: string ,
countryCode: string ,
phoneNumberType: enum ,
capabilities:
{
calling: enum ,
sms: enum ,
}
,
assignmentType: enum ,
purchaseDate: string ,
cost:
{
amount: number ,
currencyCode: string ,
billingFrequency: enum ,
}
,
}
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
innererror: string ,
}
,
}
PhoneNumbers_GetByNumber (new)
Description Gets the details of the given purchased phone number.
Reference Link ¶

⚼ Request

GET:  /phoneNumbers/{phoneNumber}
{
phoneNumber: string ,
api-version: string ,
}

⚐ Response (200)

{
id: string ,
phoneNumber: string ,
countryCode: string ,
phoneNumberType: enum ,
capabilities:
{
calling: enum ,
sms: enum ,
}
,
assignmentType: enum ,
purchaseDate: string ,
cost:
{
amount: number ,
currencyCode: string ,
billingFrequency: enum ,
}
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
innererror: string ,
}
,
}
PhoneNumbers_ReleasePhoneNumber (new)
Description Releases a purchased phone number.
Reference Link ¶

⚼ Request

DELETE:  /phoneNumbers/{phoneNumber}
{
phoneNumber: string ,
api-version: string ,
}

⚐ Response (202)

{
operation-location: string ,
operation-id: string ,
release-id: string ,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
innererror: string ,
}
,
}
PhoneNumbers_ListPhoneNumbers (new)
Description Gets the list of all purchased phone numbers.
Reference Link ¶

⚼ Request

GET:  /phoneNumbers
{
skip: integer ,
top: integer ,
api-version: string ,
}

⚐ Response (200)

{
phoneNumbers:
[
{
id: string ,
phoneNumber: string ,
countryCode: string ,
phoneNumberType: enum ,
capabilities:
{
calling: enum ,
sms: enum ,
}
,
assignmentType: enum ,
purchaseDate: string ,
cost:
{
amount: number ,
currencyCode: string ,
billingFrequency: enum ,
}
,
}
,
]
,
nextLink: string ,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
innererror: string ,
}
,
}
PhoneNumbers_OperatorInformationSearch (new)
Description Searches for number format and operator information for a given list of phone numbers.
Reference Link ¶

⚼ Request

POST:  /operatorInformation/:search
{
api-version: string ,
body:
{
phoneNumbers:
[
string ,
]
,
options:
{
includeAdditionalOperatorDetails: boolean ,
}
,
}
,
}

⚐ Response (200)

{
values:
[
{
phoneNumber: string ,
nationalFormat: string ,
internationalFormat: string ,
isoCountryCode: string ,
numberType: enum ,
operatorDetails:
{
name: string ,
mobileNetworkCode: string ,
mobileCountryCode: string ,
}
,
}
,
]
,
}

⚐ Response (default)

{
error:
{
code: string ,
message: string ,
target: string ,
details:
[
string ,
]
,
innererror: string ,
}
,
}