Phone Numbers - Purchase Reservation
Starts the purchase of all phone numbers in the reservation.
Starts a long running operation to purchase all of the phone numbers in the reservation. Purchase can only be started for active reservations that at least one phone number. If any of the phone numbers in the reservation is from a country where reselling is not permitted, do not resell agreement is required. The response will include an 'Operation-Location' header that can be used to query the status of the operation.
POST {endpoint}/availablePhoneNumbers/reservations/{reservationId}/:purchase?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 |
|
reservation
|
path | True |
string (uuid) |
The id of the reservation. |
|
api-version
|
query | True |
string |
Version of API to invoke |
Request Body
| Name | Type | Description |
|---|---|---|
| agreeToNotResell |
boolean |
The agreement to not resell the phone numbers. Defaults to false if not provided. |
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' header. Client side should further query the operation status using the URL specified in 'Operation-Location' header. Headers
|
|
| Other Status Codes |
Failure |
Examples
Start reservation purchase
Sample request
POST https://resourcename.communication.azure.com/availablePhoneNumbers/reservations/65c18c7f-8074-4efb-a572-e0df127a9964/:purchase?api-version=2025-06-01
Sample response
Operation-Location: https://resourcename.communication.azure.comoperations/reservationPurchase_65c18c7f-8074-4efb-a572-e0df127a9964?api-version=2023-11-01-preview
operation-id: reservationPurchase_65c18c7f-8074-4efb-a572-e0df127a9964
reservation-purchase_id: 65c18c7f-8074-4efb-a572-e0df127a9964
Definitions
| Name | Description |
|---|---|
|
Communication |
The Communication Services error. |
|
Communication |
The Communication Services error. |
|
Phone |
The phone number search purchase request. |
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. |
PhoneNumbersReservationPurchaseRequest
The phone number search purchase request.
| Name | Type | Description |
|---|---|---|
| agreeToNotResell |
boolean |
The agreement to not resell the phone numbers. Defaults to false if not provided. |