Self-Service Onboarding REST API Reference
Use the Self-Service Onboarding REST API to onboard and manage a communication provider for Alexa Smart Properties (ASP) Web Real-Time Communication (WebRTC) calling.
To use this API, you must enable the WebRTC add-on subscription. For more details, see WebRTC Calling in Alexa Smart Properties.
API endpoint
The endpoint of the Self-Service Onboarding API is https://api.amazonalexa.com
.
Authentication
Each API request must have an authorization header whose value is the access token retrieved from Login with Amazon (LWA). For details, see Access the Alexa Smart Properties REST APIs.
Access to WebRTC calling is based on the permission scopes enabled for your skill and granted by the customer. Include the following additional permission scope when you request an access token.
Permission scope | Description |
---|---|
|
Allows your skill to access WebRTC calling. |
Operations
The Self-Service Onboarding API supports the following operations:
Operation | HTTP method and URI |
---|---|
| |
| |
| |
|
Create service provider
Create a new service provider.
This operation is available in the following countries.
Healthcare | Hospitality | Senior Living | Core |
---|---|---|---|
US |
US, UK, FR, IT, DE, ES |
US, UK, FR, IT, DE, ES |
US |
Request
To create a service provider, you make a POST
request to the /v1/communications/serviceProviders
resource.
Request path and header example
POST /v1/communications/serviceProviders 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 |
Access token for the customer. |
String |
Yes |
Request body example
{
"serviceProviderLogicalId" : "service.provider.logical.id.1",
"displayName": [
{
"locale": "en-US",
"value": "Example Service Provider"
}
]
}
Request body properties
Property | Description | Type | Required |
---|---|---|---|
|
Externally unique ID for the new service provider. |
String |
Yes |
|
Customer-facing name for the service provider. |
Array of objects |
No |
|
Locale of the name. |
String |
No |
|
Service provider name in the locale. |
String |
No |
Response
A successful response returns HTTP 201 Created
, along with the created service provider ID.
On error, the response returns the appropriate HTTP status code and includes a response body with an Error object.
Response body example
{
"serviceProviderId": "amzn1.comms.csp.id.1",
"serviceProviderLogicalId" : "service.provider.logical.id.1",
"displayName": [
{
"locale": "en-US",
"value": "Example Service Provider"
}
]
}
Response body properties
Property | Description | Type |
---|---|---|
|
Internally generated unique identifier for the new service provider. |
String |
|
Externally unique identifier of the service provider. |
String |
|
Customer-facing name for the service provider. |
Array of objects |
|
Locale of the name. |
String |
|
Service provider name in the locale. |
String |
HTTP status codes
Status | Description |
---|---|
|
Service provider created successfully. |
|
Indicates that one or more properties in the request body aren't valid. |
|
Request didn't include the authorization token, or the included token expired or isn't valid. Or, you don't have access to the resource. |
|
Indicates that the authorization token is valid, but the requested operation isn't allowed. |
|
Requested resource not found. |
|
Requested |
|
Permitted rate limit, specified as the number of requests per unit of time, exceeded. You can retry the request by using exponential back-off. |
|
Error occurred on the server. You can retry the request by using exponential back-off. |
|
Server is down for maintenance, overloaded, or otherwise unavailable to handle the incoming request. |
Delete service provider
Delete a service provider.
This operation is available in the following countries.
Healthcare | Hospitality | Senior Living | Core |
---|---|---|---|
US |
US, UK, FR, IT, DE, ES |
US, UK, FR, IT, DE, ES |
US |
Request
To delete a service provider ID, you make a DELETE
request to the /v1/communications/serviceProviders/{serviceProviderId}
resource.
Request path and header example
DELETE /v1/communications/serviceProviders/{serviceProviderId} 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 |
Internal ID of the service provider. |
String |
Yes |
|
Header |
Access token for the customer. |
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 object.
Response body example
The response has no body.
Response body properties
The response has no body.
HTTP status codes
Status | Description |
---|---|
|
Service provider deleted successfully. |
|
Indicates that one or more properties in the request body aren't valid. |
|
Request didn't include the authorization token, or the included token expired or isn't valid. Or, you don't have access to the resource. |
|
Indicates that the authorization token is valid, but the requested operation isn't allowed. |
|
Requested resource not found. |
|
Permitted rate limit, specified as the number of requests per unit of time, exceeded. You can retry the request by using exponential back-off. |
|
Error occurred on the server. You can retry the request by using exponential back-off. |
|
Server is down for maintenance, overloaded, or otherwise unavailable to handle the incoming request. |
Get service provider information
Get detailed information about the specified service provider.
This operation is available in the following countries.
Healthcare | Hospitality | Senior Living | Core |
---|---|---|---|
US |
US, UK, FR, IT, DE, ES |
US, UK, FR, IT, DE, ES |
US |
Request
To get service provider details, you make a GET
request to the /v1/communications/serviceProviders/{serviceProviderId}
resource.
Request path and header example
GET /v1/communications/serviceProviders/{serviceProviderId} 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 |
Internal ID of the service provider. |
String |
Yes |
|
Header |
Access token for the customer. |
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 details about the service provider.
On error, the response returns the appropriate HTTP status code and includes a response body with an Error object.
Response body example
{
"serviceProviderId": "amzn1.comms.csp.id.2",
"serviceProviderLogicalId" : "service.provider.logical.id.1",
"displayName": [
{
"locale": "en-US",
"value": "Example Service Provider"
}
]
}
Response body properties
Property | Description | Type |
---|---|---|
|
Internally generated unique identifier for the service provider. |
String |
|
Externally unique identifier of the service provider. |
String |
|
Customer-facing name for the service provider. |
Array of objects |
|
Locale of the name. |
String |
|
Service provider name in the locale. |
String |
HTTP status codes
Status | Description |
---|---|
|
Response body contains the service provider information. |
|
Indicates that one or more properties in the request body aren't valid. |
|
Request didn't include the authorization token, or the included token expired or isn't valid. Or, you don't have access to the resource. |
|
Indicates that the authorization token is valid, but the requested operation isn't allowed. |
|
Requested resource not found. |
|
Permitted rate limit, specified as the number of requests per unit of time, exceeded. You can retry the request by using exponential back-off. |
|
Error occurred on the server. You can retry the request by using exponential back-off. |
|
Server is down for maintenance, overloaded, or otherwise unavailable to handle the incoming request. |
Update service provider
Modify properties for an existing service provider, such as the display name. You can't modify the serviceProviderLogicalId
.
This operation is available in the following countries.
Healthcare | Hospitality | Senior Living | Core |
---|---|---|---|
US |
US, UK, FR, IT, DE, ES |
US, UK, FR, IT, DE, ES |
US |
Request
To update a service provider, you make a PUT
request to the /v1/communications/serviceProviders/{serviceProviderId}
resource.
Request path and header example
PUT /v1/communications/serviceProviders/{serviceProviderId} 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 |
Internal ID of the service provider. |
String |
Yes |
|
Header |
Access token for the customer. |
String |
Yes |
Request body example
{
"serviceProviderLogicalId" : "service.provider.logical.id.1",
"displayName": [
{
"locale": "en-US",
"value": "New service provider name"
}
]
}
Request body properties
Property | Description | Type | Required |
---|---|---|---|
|
Unique ID for each service provider. You can't modify this ID after its creation. This property is optional when updating a service provider but it is required when creating a service provider. |
String |
No |
|
Customer facing name. |
Array of objects |
No |
|
Locale of the name. This release supports |
String |
No |
|
Customer facing name. |
String |
No |
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 object.
Response body example
{
"serviceProviderId": "amzn1.comms.csp.id.2",
"serviceProviderLogicalId" : "service.provider.logical.id.1",
"displayName": [
{
"locale": "en-US",
"value": "New Service Provider Name"
}
]
}
Response body properties
Property | Description | Type |
---|---|---|
|
Internally generated ID as a unique identifier for the created service provider. |
String |
|
Externally unique identifier of the created service provider. |
String |
|
Customer-facing name for the service provider. |
Array of objects |
|
Locale of the name. |
String |
|
Service provider name in the locale. |
String |
HTTP status codes
Status | Description |
---|---|
|
The request succeeded. |
|
Indicates that one or more properties in the request body aren't valid. |
|
Request didn't include the authorization token, or the included token expired or isn't valid. Or, you don't have access to the resource. |
|
Indicates that the authorization token is valid, but the requested operation isn't allowed. |
|
Requested resource not found. |
|
Permitted rate limit, specified as the number of requests per unit of time, exceeded. You can retry the request by using exponential back-off. |
|
Error occurred on the server. You can retry the request by using exponential back-off. |
|
Server is down for maintenance, overloaded, or otherwise unavailable to handle the incoming request. |
Object definitions
The Self-Service Onboarding API defines the following object definitions.
Error object
The Error
object defines the error type and message included in the response when an error occurs.
The following example shows the response body.
{
"type": "BAD_REQUEST",
"message": "The request is malformed or is missing any required parameters."
}
Property | Description | Type |
---|---|---|
|
Type of error that occurred. |
String |
|
Human-readable error message. The error message appears only for debugging and logging purposes. You must not share it with the customer. No business logic should depend on the content of the error message. |
String |
Related topics
- WebRTC Calling in Alexa Smart Properties
- Account Linking for Custom Skills
- Service Provider Network Mapping API Reference for Alexa Smart Properties
- Create and Manage Skills in the Developer Console
Last updated: Dec 04, 2024