Private Branch Exchange API Reference for Alexa Smart Properties
Use the Private Branch Exchange (PBX) API to integrate your Session Initiation Protocol (SIP)-based PBX system with Alexa. You can use the PBX API to manage SIP trunk connectivity between your Alexa Smart Properties units, such as rooms, and extensions on your PBX.
For steps to configure your PBX system to work with Alexa-enabled devices in rooms on a property that has an Alexa Smart Properties subscription, see Configure a Private Branch Exchange for Alexa Smart Properties. For details about PBX systems, see Private branch exchange.
API endpoint
The endpoint of the PBX API is https://api.amazonalexa.com/v1/communications/network/siptrunk
.
Authentication
Each API request must have an authorization header whose value is the access token retrieved from Login with Amazon (LWA).
Operations
The PBX API supports the following types of operations:
SIP trunk management
Operation | HTTP method and URI |
---|---|
| |
| |
| |
| |
|
Extension management
Operation | HTTP method and URI |
---|---|
| |
| |
| |
| |
|
Create a SIP trunk
Create trunk connectivity between Alexa and your PBX. You can specify Internet Protocol (IP)-based peers or Fully Qualified Domain Name (FQDN)-based peers.
If you use IP-based peers, the request URI for calls that initiate from Alexa-enabled devices use IPs as the SIP domain. If you use FQDN peers, the request URI for calls that initiate from Alexa-enabled devices use FQDNs as the SIP domain. You can use either IP-based peers or FQDN-based peers, but not both at the same time.
This operation is available in the following countries.
Healthcare | Hospitality | Senior Living | Core |
---|---|---|---|
US |
US |
US |
US |
Request
To create a SIP trunk, make a POST
request to /v1/communications/network/siptrunk
.
Request path and header example
POST /v1/communications/network/siptrunk HTTP/1.1
Host: api.amazonalexa.com
Content-type: application/json
Authorization: Bearer {access token}
Request path and header parameters
Parameter | Located in | Description | Type | Required |
---|---|---|---|---|
|
Header |
Login with Amazon (LWA) token. For details, see Get an Access Token for SMAPI. |
String |
Yes |
Request body example
Request body properties
Property | Description | Type | Required |
---|---|---|---|
|
Information about your Transport Layer Security (TLS) configuration. |
Object |
Yes if your system uses TLS for transport. |
|
List of Privacy Enhanced Mail (PEM)-encoded certificate chains. The certificate chains should contain the standard PEM header and footer. Each item might contain multiple certificates, and therefore form a chain for the certificate. You can define multiple certificates to support certificate rotation. |
Array of strings |
Yes if your system uses TLS for transport. |
|
Common Name (CN) or Subject Alternative Name (SAN) of the certificate. You don't need to align this name with the |
String |
Yes if your system uses TLS for transport. |
|
IP-based peer configuration. Use |
Array of objects |
Either |
|
IP address of the peer. You can define multiple addresses for high availability. Either |
String |
Yes for IP-based configurations |
|
Port number to use to connect to the peer. |
Number |
Yes for IP-based configurations |
|
FQDN-based peer configuration. Use |
Object |
Either |
|
Domain Name System (DNS) record for the peer. If defined, the system attempts routing by using Service Locator (SRV) records. Either |
String |
Yes for FQDN-based configurations |
|
Port number to use to connect to the peer. |
Number |
Yes for FQDN-based configurations |
Response
A successful response returns HTTP 201 Created
, along with the status of the target. On error, the response returns the appropriate HTTP status code and includes a response body with an error code and human readable message. For details, see HTTP status codes.
Response body example
Response body properties
Property | Description | Type |
---|---|---|
|
Unique identifier of the created SIP trunk. |
String |
|
Request status. Possible value: |
Enum |
|
DNS name or IP address of the endpoint that should be entered to the user's PBX system. Depending on the underlying signaling implementation, this value might not be present during |
String |
|
Unique identifier that you use to reference the operation status. |
String |
PROVISIONING
, reach out to your Alexa Smart Properties solution architect with your trunk details.HTTP status codes
Status | Description |
---|---|
|
The request succeeded. |
|
A required parameter isn't present or is incorrectly formatted. |
|
The access token is missing or expired. |
|
You don't have permission to perform the operation or the authentication token is invalid. |
|
You made more API calls than the allowed limit. |
|
An internal service error caused the request failure. |
|
The server is temporarily unavailable. |
Get a SIP trunk
To verify whether your trunk creation is successful, make a GET
SIP trunk request. The successful response should have the status as ACTIVE
. After you start a Create a SIP trunk operation, it takes five to ten minutes for a SIP trunk to be active.
This operation is available in the following countries.
Healthcare | Hospitality | Senior Living | Core |
---|---|---|---|
US |
US |
US |
US |
US |
Request
To get the status of a specific SIP trunk, make a GET
request to /v1/communications/network/siptrunk/{trunkId}
.
Request path and header example
GET /v1/communications/network/siptrunk/amzn1.alexa.network.siptrunk.1234abc HTTP/1.1
Host: api.amazonalexa.com
Content-type: application/json
Authorization: Bearer {access token}
Request path and header parameters
Parameter | Located in | Description | Type | Required |
---|---|---|---|---|
|
Path |
SIP trunk ID. |
String |
Yes |
|
Header |
Login with Amazon (LWA) token. For details, see Get an Access Token for SMAPI. |
String |
Yes |
Request body example
The request has no body.
Request body properties
The request has no body.
Response
A successful response returns HTTP 200 OK
, along with the status of the target. On error, the response returns the appropriate HTTP status code and includes a response body with an error code and human readable message. For details, see HTTP status codes.
Response body example
Response body properties
Property | Description | Type |
---|---|---|
|
Unique identifier of the created SIP trunk. |
String |
|
Description of the request status. Possible values:
|
Enum |
|
DNS name or IP address of the endpoint that should be entered to the user's PBX system. Depending on the underlying signaling implementation, this value might not be present during |
String |
|
Information about the SIP trunk parameters. |
Object |
|
Information about the TLS configuration. |
Object |
|
List of Privacy Enhanced Mail (PEM)-encoded certificate chains. |
Array of objects |
|
CN or SAN of the certificate. |
String |
|
Information about the peer connection. |
Object |
|
IPs of the peer connection. |
Array of strings |
|
Port number that is used to connect to the peer. |
Number |
PROVISIONING
after ten minutes, contact your Alexa Smart Properties solution architect with your SIP trunk details.HTTP status codes
Status | Description |
---|---|
|
The request succeeded. |
|
A required parameter isn't present or is incorrectly formatted. |
|
The access token is missing or expired. |
|
You don't have permission to perform the operation or the authentication token is invalid. |
|
The specified |
|
You made more API calls than the allowed limit. |
|
An internal service error caused the request failure. |
List all SIP trunks
List all SIP trunks that are associated with this account.
This operation is available in the following countries.
Healthcare | Hospitality | Senior Living | Core |
---|---|---|---|
US |
US |
US |
US |
Request
To get a full list of all the SIP trunks and their statuses, make a GET
request to /v1/communications/network/siptrunk
.
Request path and header example
GET /v1/communications/network/siptrunk?nextToken=0&maxResults=10 HTTP/1.1
Host: api.amazonalexa.com
Content-type: application/json
Authorization: Bearer {access token}
Request path and header parameters
Parameter | Located in | Description | Type | Required |
---|---|---|---|---|
|
Query |
Token to provide when you request the next page for the previous result. When you don't provide this token, the operation assumes that this is the first request. |
String |
No |
|
Query |
Maximum number of items to return. When you don't provide this value, the default is 30. |
Number |
No |
|
Header |
Login with Amazon (LWA) token. For details, see Get an Access Token for SMAPI. |
String |
Yes |
Request body example
The request has no body.
Request body properties
The request has no body.
Response
A successful response returns HTTP 200 OK
, along with the status of the target. On error, the response returns the appropriate HTTP status code and includes a response body with an error code and human readable message. For details, see HTTP status codes.
Response body example
Response body properties
Property | Description | Type |
---|---|---|
|
Information about pagination. |
Object |
|
Total number of trunks associated with the account. |
Number |
|
Starting pointer of the current query. |
String |
|
Details about the trunks. |
Array of objects |
|
Trunk ID for the given item. |
String |
|
Endpoint DNS name that the user should connect to. |
String |
|
Status of the trunk. Possible values:
|
Enum |
HTTP status codes
Status | Description |
---|---|
|
The request succeeded. |
|
A required parameter isn't present or is incorrectly formatted. |
|
The access token is missing or expired. |
|
You don't have permission to perform the operation or the authentication token is invalid. |
|
You made more API calls than the allowed limit. |
|
An internal service error caused the request failure. |
Update a SIP trunk
Update an active SIP trunk information.
ACTIVE
state.This operation is available in the following countries.
Healthcare | Hospitality | Senior Living | Core |
---|---|---|---|
US |
US |
US |
US |
Request
To update a SIP trunk, make a PUT
request to /v1/communications/network/siptrunk/{trunkId}
.
Request path and header example
PUT /v1/communications/network/siptrunk/amzn1.alexa.network.siptrunk.59216beb HTTP/1.1
Host: api.amazonalexa.com
Content-type: application/json
Authorization: Bearer {access token}
Request path and header parameters
Parameter | Located in | Description | Type | Required |
---|---|---|---|---|
|
Path |
Unique identifier of the trunk. Format: |
String |
Yes |
|
Header |
Login with Amazon (LWA) token. For details, see Get an Access Token for SMAPI. |
String |
Yes |
Request body example
Request body properties
Property | Description | Type | Required |
---|---|---|---|
|
Information about your TLS configuration. |
Object |
Yes if your system uses TLS for transport. |
|
List of Privacy Enhanced Mail (PEM)-encoded certificate chains. The certificate chains should contain the standard PEM header and footer. Each item might contain multiple certificates, and therefore form a chain for the certificate. You can define multiple certificates to support certificate rotation. |
Array of strings |
Yes if your system uses TLS for transport. |
|
CN or SAN name of the certificate. |
String |
Yes if your system uses TLS for transport. |
|
IP-based peer configuration. Use |
Array of objects |
Either |
|
IP address of the peer. You can define multiple addresses for high availability. Either |
String |
Yes for IP-based configurations |
|
Port number to use to connect to the peer. |
Number |
Yes for IP-based configurations |
|
FQDN-based peer configuration. Use |
Object |
Either |
|
DNS record for the peer. If defined, Service Locator (SRV) record-based routing is attempted. Either |
String |
Yes for FQDN-based configurations |
|
Port number to use to connect to the peer. |
Number |
Yes for FQDN-based configurations |
Response
A successful response returns HTTP 200 OK
, along with the status of the target. On error, the response returns the appropriate HTTP status code and includes a response body with an error code and human readable message. For details, see HTTP status codes.
Response body example
Response body properties
Property | Description | Type |
---|---|---|
|
Unique identifier of the created SIP trunk. |
String |
|
Status of the trunk after receiving the updated parameters. Possible values: |
Enum |
|
Unique identifier that you use to reference the operation status. |
String |
HTTP status codes
Status | Description |
---|---|
|
The request succeeded. |
|
A required parameter isn't present or is incorrectly formatted. |
|
The access token is missing or expired. |
|
You don't have permission to perform the operation or the authentication token is invalid. |
|
The specified |
|
There's a conflict with the existing |
|
You made more API calls than the allowed limit. |
|
An internal service error caused the request failure. |
|
The server is temporarily unavailable. |
Delete a SIP trunk
Delete a SIP trunk.
This operation is available in the following countries.
Healthcare | Hospitality | Senior Living | Core |
---|---|---|---|
US |
US |
US |
US |
Request
To delete a SIP trunk, make a DELETE
request to /v1/communications/network/siptrunk/{trunkId}
.
Request path and header example
DELETE /v1/communications/network/siptrunk/amzn1.alexa.network.siptrunk.59216beb HTTP/1.1
Host: api.amazonalexa.com
Content-type: application/json
Authorization: Bearer {access token}
Request path and header parameters
Parameter | Located in | Description | Type | Required |
---|---|---|---|---|
|
Path |
Unique identifier of the trunk for deletion. Format: |
String |
Yes |
|
Header |
Login with Amazon (LWA) token. For details, see Get an Access Token for SMAPI. |
String |
Yes |
Request body example
The request has no body.
Request body properties
The request has no body.
Response
A successful response returns HTTP 200 OK
, along with the status of the target. On error, the response returns the appropriate HTTP status code and includes a response body with an error code and human readable message. For details, see HTTP status codes.
Response body example
Response body properties
Property | Description | Type |
---|---|---|
|
Unique identifier of the created SIP trunk. |
String |
|
Status of the trunk after receiving the delete operation. Possible value: |
Enum |
|
Unique identifier that you use to reference the operation status. |
String |
HTTP status codes
Status | Description |
---|---|
|
The request succeeded. |
|
A required parameter isn't present or is incorrectly formatted. |
|
The access token is missing or expired. |
|
You don't have permission to perform the operation or the authentication token is invalid. |
|
The specified |
|
There's a conflict with the existing |
|
You made more API calls than the allowed limit. |
|
An internal service error caused the request failure. |
|
The server is temporarily unavailable. |
Map an extension
Map an Alexa device in a room in your property to an extension on your PBX. If the mapping already exists, this operation updates the mapping.
This operation is available in the following countries.
Healthcare | Hospitality | Senior Living | Core |
---|---|---|---|
US |
US |
US |
US |
Request
To map an extension with a unit, such as a room, make a POST
request to /v1/communications/network/siptrunk/{trunkId}/extension/{extension}
.
Request path and header example
POST /v1/communications/network/siptrunk/amzn1.comms.network.siptrunk.59216beb/extension/7201 HTTP/1.1
Host: api.amazonalexa.com
Accept: application/json
Authorization: Bearer {access token}
Request path and header parameters
Parameter | Located in | Description | Type | Required |
---|---|---|---|---|
|
Path |
Trunk ID for the extension mapping. |
String |
Yes |
|
Path |
Internal extension number for the unit. Typically this string is a few digits of number, but might include alphanumeric characters. |
String |
Yes |
|
Header |
Login with Amazon (LWA) token. For details, see Get an Access Token for SMAPI. |
String |
Yes |
Request body example
Request body properties
Property | Description | Type | Required |
---|---|---|---|
|
Routing type. Possible value: |
Enum |
Yes |
|
Profile ID to attach the mapping. For Alexa Smart Properties, the format is |
String |
Yes |
Response
A successful creation response returns HTTP 200 OK
. On error, the response returns the appropriate HTTP status code and includes a response body with an error code and human readable message. For details, see HTTP status codes.
Response body example
The successful response has no body.
Response body properties
The successful response has no body.
HTTP status codes
Status | Description |
---|---|
|
The request succeeded. |
|
A required parameter isn't present or is incorrectly formatted. |
|
The access token is missing or expired. |
|
You don't have permission to perform the operation or the authentication token is invalid. |
|
The specified |
|
You made more API calls than the allowed limit. |
|
An internal service error caused the request failure. |
Get an extension mapping
Retrieve the mapping between the Alexa device in a room in your property and an extension on your PBX.
This operation is available in the following countries.
Healthcare | Hospitality | Senior Living | Core |
---|---|---|---|
US |
US |
US |
US |
Request
To retrieve the extension mapping between a unit and an extension on your PBX, make a GET
request to /v1/communications/network/siptrunk/{trunkId}/extension/{extension}
.
Request path and header example
GET /v1/communications/network/siptrunk/amzn1.comms.network.siptrunk.59216beb/extension/7201 HTTP/1.1
Host: api.amazonalexa.com
Accept: application/json
Authorization: Bearer {access token}
Request path and header parameters
Parameter | Located in | Description | Type | Required |
---|---|---|---|---|
|
Path |
Trunk ID for the extension mapping. |
String |
Yes |
|
Path |
Internal extension number for the unit. Typically, this string is a few digits of a number, but might include alphanumeric characters. |
String |
Yes |
|
Header |
Login with Amazon (LWA) token. For details, see Get an Access Token for SMAPI. |
String |
Yes |
Request body example
The request has no body.
Request body properties
The request has no body.
Response
A successful creation response returns HTTP 200 OK
. On error, the response returns the appropriate HTTP status code and includes a response body with an error code and human readable message. For details, see HTTP status codes.
Response body example
Response body properties
Property | Description | Type |
---|---|---|
|
Routing type. Possible value: |
Enum |
|
Profile ID to attach the mapping. For Alexa Smart Properties, the format is |
String |
HTTP status codes
Status | Description |
---|---|
|
The request succeeded. |
|
A required parameter isn't present or is incorrectly formatted. |
|
The access token is missing or expired. |
|
You don't have permission to perform the operation or the authentication token is invalid. |
|
The specified |
|
You made more API calls than the allowed limit. |
|
An internal service error caused the request failure. |
Update an extension mapping
You can update an Alexa device mapping in a room in your property with a new profile on your PBX.
This operation is available in the following countries.
Healthcare | Hospitality | Senior Living | Core |
---|---|---|---|
US |
US |
US |
US |
Request
To update an extension with a different profile, make a PUT
request to /v1/communications/network/siptrunk/{trunkId}/extension/{extension}
.
Request path and header example
PUT /v1/communications/network/siptrunk/amzn1.comms.network.siptrunk.59216beb/extension/7201 HTTP/1.1
Host: api.amazonalexa.com
Accept: application/json
Authorization: Bearer {access token}
Request path and header parameters
Parameter | Located in | Description | Type | Required |
---|---|---|---|---|
|
Path |
A trunk ID for the extension mapping. |
String |
Yes |
|
Path |
Internal extension number for the unit. Typically, this string is a few digits of a number, but might include alphanumeric characters. |
String |
Yes |
|
Header |
Login with Amazon (LWA) token. For details, see Get an Access Token for SMAPI. |
String |
Yes |
Request body example
Request body properties
Property | Description | Type | Required |
---|---|---|---|
|
Routing type. Possible value: |
Enum |
Yes |
|
Profile ID to attach the mapping. For Alexa Smart Properties, the format is |
String |
Yes |
Response
A successful response returns HTTP 200 OK
. On error, the response returns the appropriate HTTP status code and includes a response body with an error code and human readable message. For details, see HTTP status codes.
Response body example
The successful response has no body.
Response body properties
The successful response has no body.
HTTP status codes
Status | Description |
---|---|
|
The request succeeded. |
|
A required parameter isn't present or is incorrectly formatted. |
|
The access token is missing or expired. |
|
You don't have permission to perform the operation or the authentication token is invalid. |
|
The specified |
|
You made more API calls than the allowed limit. |
|
An internal service error caused the request failure. |
Delete an extension mapping
Delete an extension mapping between your property unit and an extension on your PBX.
This operation is available in the following countries.
Healthcare | Hospitality | Senior Living | Core |
---|---|---|---|
US |
US |
US |
US |
Request
To delete an extension mapping, make a DELETE
request to /v1/communications/network/siptrunk/{trunkId}/extension/{extension}
.
Request path and header example
DELETE /v1/communications/network/siptrunk/amzn1.comms.network.siptrunk.59216beb/extension/7201 HTTP/1.1
Host: api.amazonalexa.com
Accept: application/json
Authorization: Bearer {access token}
Request path and header parameters
Parameter | Located in | Description | Type | Required |
---|---|---|---|---|
|
Path |
A trunk ID for the extension mapping. |
String |
Yes |
|
Path |
Internal extension number for the unit. Typically, this string is a few digits of a number, but it might include alphanumeric characters. |
String |
Yes |
|
Header |
Login with Amazon (LWA) token. For details, see Get an Access Token for SMAPI. |
String |
Yes |
Request body example
The request has no body.
Request body properties
The request has no body.
Response
A successful response returns HTTP 200 OK
. On error, the response returns the appropriate HTTP status code and includes a response body with an error code and human readable message. For details, see HTTP status codes.
Response body example
The successful response has no body.
Response body properties
The successful response has no body.
HTTP status codes
Status | Description |
---|---|
|
The request succeeded. |
|
A required parameter isn't present or is incorrectly formatted. |
|
The access token is missing or expired. |
|
You don't have permission to perform the operation or the authentication token is invalid. |
|
The specified |
|
You made more API calls than the allowed limit. |
|
An internal service error caused the request failure. |
List extensions in batch
Retrieve the mappings between the Alexa-enabled devices in rooms in your property and extensions on your PBX.
This operation is available in the following countries.
Healthcare | Hospitality | Senior Living | Core |
---|---|---|---|
US |
US |
US |
US |
Request
To retrieve the extension mapping between a unit and extension on your PBX, make a GET
request to /v1/communications/network/siptrunk/{trunkId}/extensions
.
Request path and header example
GET /v1/communications/network/siptrunk/amzn1.comms.network.siptrunk.59216beb/extensions HTTP/1.1
Host: api.amazonalexa.com
Accept: application/json
Authorization: Bearer {access token}
Request path and header parameters
Parameter | Located in | Description | Type | Required |
---|---|---|---|---|
|
Path |
Trunk ID for the extension mapping. |
String |
Yes |
|
Header |
Login with Amazon (LWA) token. For details, see Get an Access Token for SMAPI. |
String |
Yes |
Request body example
The request has no body.
Request body properties
The request has no body.
Response
A successful creation response returns HTTP 200 OK
. On error, the response returns the appropriate HTTP status code and includes a response body with an error code and human readable message. For details, see HTTP status codes.
Response body example
Response body properties
Property | Description | Type |
---|---|---|
|
Information about pagination. |
Object |
|
Total number of trunks associated with the account. |
Number |
|
Starting pointer of the current query. |
String |
|
Information about the extension mappings. |
Array of objects |
|
Internal extension for the unit. Typically, the extension is a few digits of a number, but might include alphanumeric characters. |
String |
|
Routing type. Possible value: |
Enum |
|
Profile ID to attach the mapping. For Alexa Smart Properties, the format is |
String |
HTTP status codes
Status | Description |
---|---|
|
The request succeeded. |
|
A required parameter isn't present or is incorrectly formatted. |
|
The access token is missing or expired. |
|
You don't have permission to perform the operation or the authentication token is invalid. |
|
The specified |
|
You made more API calls than the allowed limit. |
|
An internal service error caused the request failure. |
Related topics
- Configure a Private Branch Exchange for Alexa Smart Properties
- Private Branch Exchange
- About Alexa Smart Properties
Last updated: Nov 28, 2023