These docs are for v0.0.1. Click to read the latest docs for v1.0.62.

Phone Number Admin

Overview

A phone numbers is the entry point for contact center voice engagements.

Before you begin

Refer to How to Authenticate with Avaya Experience Platform™ APIs required to invoke Voice APIs.

Voice APIs require the Account Administrator role for access.

Add Phone Number

To add new Phone Number you should invoke Add Number. You should provide basic details such as a phoneNumber, displayName, countryCode and isCallingPartyNumber. It is recommended to have porposeful displayName. For example, Toll Free number etc.

POST /phone-numbers

/v1beta/accounts/{accountId}/phone-numbers

Request Body:

{
  "phoneNumber": "+16479308804",
  "displayName": "private Number",
  "countryCode": "US",
  "isCallingPartyNumber": true
}

After the phone number request has been accepted an async process will be triggered to configure the number, the status of which should be monitored via /phone-numbers/{phoneNumberId}.

Once been created you will receive a phoneNumberId in the response that you should use in all subsequent requests related to that Number.

HTTP 202 Accepted

{
  "phoneNumberId": "c8c2909d-75e9-484a-94c0-b7e8d29771fe",
  "phoneNumber": "+16479308804",
  "displayName": "private Number",
  "isCallingPartyNumber": true,
  "countryCode": "US",
  "type": "UNKNOWN",
  "accountId": "ABCDEF",
  "status": "INPROGRESS"
}

Updating a Phone Number

To update a Phone Number you should invoke Update Number.
You should include all the details of the number. Fields that are omitted from the update that were previously present will be removed.

The same basic principle applies to any updates made to the Number. It is treated as a complete replacement.

PUT /phone-numbers/{phoneNumberId}

/v1beta/accounts/{accountId}/phone-numbers/c8c2909d-75e9-484a-94c0-b7e8d29771fe

Request Body:

{
  "displayName": "private Number",
  "isCallingPartyNumber": true
}

HTTP 202 Accepted

{
  "phoneNumberId": "c8c2909d-75e9-484a-94c0-b7e8d29771fe",
  "phoneNumber": "+16479308804",
  "displayName": "private Number",
  "countryCode": "US",
  "type": "LOCAL",
  "isCallingPartyNumber": true,
  "accountId": "ABCDEF",
  "status": "INACTIVE",
  "statusMessage": "Verification needed. Please send the necessary documents to [email protected] to activate it."
}

Releasing a Phone Number

To release a Phone Number you should invoke Delete Number.
No response body is returned from this request.

DELETE /phone-numbers/{phoneNumberId}

/v1beta/accounts/{accountId}/phone-numbers/c8c2909d-75e9-484a-94c0-b7e8d29771fe

HTTP 204 No Content

After a number has been deleted Get Number.
will return HTTP 404 Not Found.

Available Phone Numbers

To get Available numbers you should invoke [Available Phone Numbers]After a number has been deleted Get Number.
The available phone numbers that can be added to the contact center will be listed.

GET /available-phone-numbers

/v1beta/accounts/{accountId}/available-phone-numbers?countryCode=US&type=TOLLFREE&areaCode=330&phoneNumber=%2B16479308804&pageNumber=1&pageSize=5

HTTP 200 OK

{
  "pagination": {
    "pageNumber": 2,
    "pageSize": 10,
    "total": 45
  },
  "phoneNumbers": [
    {
      "phoneNumber": "+16479308804",
      "countryCode": "US",
      "type": "LOCAL",
      "documentationRequired": true
    }
  ],
  "links": {
    "prev": "/api/admin/voice/v1beta/accounts/ABCDEF/available-phone-numbers?pageNumber=1&pageSize=10",
    "next": "/api/admin/voice/v1beta/accounts/ABCDEF/available-phone-numbers?pageNumber=3&pageSize=10"
  }
}

as you will notice from response, There is a field documentationRequired which indicates if the activation of this number will be required. you should send necessary documents to [email protected] to activate it.