Alexa Skills REST API Reference

The Alexa Skills REST API reference describes the APIs for Alexa features that you can add to your Alexa skill and for Alexa skill management tasks that you can do programmatically.

Pagination of results

For API requests that return lists, you can control the number of results returned by including the maxResults parameter in the request. In the response, Alexa returns up to the specified number of list items. If there are more results to return, Alexa divides the content into pages and includes a nextToken property in the response. To get the next page of results, include the nextToken in the next API request. Some REST API definitions allow additional filter parameters.

The following example from the Natural Language Understanding Annotation (NLU) Annotation Set REST API shows the HTTP header that includes the maxResults and nextToken values. On receipt of this request, Alexa sends the next set of results up to the 10. If there are more than 10 results, Alexa includes another token in the response to enable you to get the next set of results.

GET /v1/skills/amzn1.ask.skill.1/nluAnnotationSets/annotation.set.1/annotations?maxResults=10&nextToken=someToken1
Content-Type: application/json
Authorization: Bearer {access token}
Accept: {accept-type}

When there are more results, the response body contains paginationContext property. The nextToken identifies the next set of results to return. The token expires in 24 hours. When Alexa returns the last page of results, the response doesn't include the nextToken.

The following response shows that there are more results. Use the same API request with the next token to get the next page of results.

 "paginationContext": {
        "nextToken": "someToken.2"

In this section

Last updated: May 25, 2023