Skill Publishing REST API Reference
Use the Skill Publishing REST API to manage the publication of your skill. Optionally, you can certify and publish your skill in a single request. For more details, see Submit for certification.
API endpoint
The endpoint of the Skill Publishing 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 Get an Access Token for SMAPI.
Operations
The Skill Publishing API includes the following operations.
Operation | HTTP method and URI |
---|---|
| |
| |
|
Get publication status
Get the publication status of the specified skill.
Request
To get the publication status, you make a GET request to the publications
resource.
Request path and header example
GET /v1/skills/{skillId}/publications/~latest
Host: api.amazonalexa.com
Content-Type: application/json
Authorization: Bearer {access token}
Accept-Language: {language}
Request path and header parameters
Parameter | Located in | Description | Type | Required |
---|---|---|---|---|
|
Path |
Identifies the skill. |
String |
Yes |
|
Header |
String |
Yes | |
|
Header |
To receive a localized response, set the language. |
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 publication status.
On error, the response returns the appropriate HTTP status code and includes a response body with an error code and human readable message.
Response body example
{
"publishesAt": "2019-11-01T02:03:07.023Z",
"status": "IN_PROGRESS"
}
Response body properties
Property | Description | Type |
---|---|---|
|
Requested date for publication. |
String |
|
Publication status. |
String |
HTTP status codes
Status | Description |
---|---|
|
Response body contains the publication status. |
|
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 number of requests per unit of time, exceeded. Retry the request by using exponential back-off. |
|
Error occurred on the server. Retry the request by using exponential back-off. |
|
Server is down for maintenance, overloaded, or otherwise unavailable to handle the incoming request. |
Submit for publication
Submit the certified skill for publication. You can specify a publication date, or request to publish now. You can submit a skill for publishing or rollback, but not both at the same time.
Request
To submit a request for publication, you make a POST
request to the publications
resource.
Request path and header example
POST /v1/skills/{skillId}/publications
Host: api.amazonalexa.com
Content-Type: application/json
Authorization: Bearer {access token}
Request path and header parameters
Parameter | Located in | Description | Type | Required |
---|---|---|---|---|
|
Path |
Identifies the skill. |
String |
Yes |
|
Header |
String |
Yes |
Request body example
{
"publishesAt": "2019-11-01T00:38:29.708Z"
}
Request body properties
Property | Description | Type | Required |
---|---|---|---|
|
Requested date for publication. Can be up to six months from the current date. If not included, the requested publication date is the current date. |
String |
No |
Response
A successful response returns HTTP 202 Accepted
.
On error, the response returns the appropriate HTTP status code and includes a response body with an error code and human readable message.
Response body example
The response has no body.
Response body properties
The response has no body.
HTTP status codes
Status | Description |
---|---|
|
Request to submit skill for publication 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 number of requests per unit of time, exceeded. Retry the request by using exponential back-off. |
|
Error occurred on the server. Retry the request by using exponential back-off. |
|
Server is down for maintenance, overloaded, or otherwise unavailable to handle the incoming request. |
Unpublish skill
Unpublish the specified skill so that users can't enable it. You can choose to allow the skill to remain active for current users or disable the skill for all users.
Request
To unpublish a skill, you make a POST
request to the unpublish
resource.
Request path and header example
POST /v1/skills/{skillId}/unpublish
Host: api.amazonalexa.com
Content-Type: application/json
Authorization: Bearer {access token}
Accept-Language: {language}
Request path and header parameters
Parameter | Located in | Description | Type | Required |
---|---|---|---|---|
|
Path |
Identifies the skill. |
String |
Yes |
|
Header |
String |
Yes | |
|
Header |
To receive a localized response, set the language. |
Request body example
{
"type": "HIDE",
"reason": "Published by mistake"
}
Request body properties
Property | Description | Type | Required |
---|---|---|---|
|
Specifies whether to disable the skill for all users, or for new users only. |
String |
Yes |
|
Reason that you want to unpublish the skill.
|
String |
Yes |
Response
A successful response returns HTTP 202 Accepted
.
On error, the response returns the appropriate HTTP status code and includes a response body with an error code and human readable message.
Response body example
The response has no body.
Response body properties
The response has no body.
HTTP status codes
Status | Description |
---|---|
|
Request to unpublish skill 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 number of requests per unit of time, exceeded. Retry the request by using exponential back-off. |
|
Error occurred on the server. Retry the request by using exponential back-off. |
|
Server is down for maintenance, overloaded, or otherwise unavailable to handle the incoming request. |
Related topics
- Skill Certification REST API Reference
- Skill Manifest REST API Reference
- Skill Rollback REST API Reference
Last updated: Aug 01, 2024