Resource Schema REST API Reference


Use the Resource Schema REST API to get the schema or skill package required for the specified skill. Use this information to validate your schema or directory structure before errors occur.

The skill manifest is the JSON representation of your skill, and provides Alexa with all the metadata required for your skill. The skill package is the directory structure an Alexa skill. You use the skill package when you implement your skill in a local development environment, such as Alexa Skills Toolkit for Visual Studio Code.

API endpoint

The endpoint of the Resource Schema 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 Resource Schema API includes the following operations.

Operation HTTP method and URI

Get resource schema

GET /v1/skills/resourceSchema/{resource}?vendorId={vendorId}&operation={operationName}

Get resource schema

Get the schema or skill package for the specified skill.

Request

To get the schema, you make a GET request to the resourceSchema resource.

Request path and header example

Copied to clipboard.

GET /v1/skills/resourceSchema/{resource}?vendorId={vendorId}&operation={operationName}
Host: api.amazonalexa.com
Content-Type: application/json
Authorization: Bearer {access token}
Accept: application/json

Request path and header parameters

Parameter Located in Description Type Required

skillId

Path

Identifies the skill.
Valid values: 1–255 characters.

String

Yes

resource

Path

Name of the resource that you want to retrieve.
Valid values: manifest, skillPackageStructure.

String

Yes

vendorId

Query

Identifies the vendor to which the skill belongs.
The response includes information for beta features that your skill uses.

String

Yes

operation

Query

Operation for which you want the skill manifest schema.
The schema differs based on the operation. For example, the submit for certification schema has more validations than the create skill schema.
Required when resource = manifest. Valid values: CREATE_SKILL, UPDATE_SKILL, ENABLE_SKILL, SUBMIT_SKILL.

String

No

access token

Header

LWA token.

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 a URL to the requested schema or skill package. 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

{
    "expiryTime": "2020-10-29T06:38:35.549Z",
    "schemaLocationUrl": "https://example.com/schema"
}

Response body properties

Property Description Type

expiryTime

Time when the URL expires.
Defined in ISO 8601 format, YYYY-MM-DDThh:mm:ssZ.

String

schemaLocationUrl

Presigned URL to the schema or skill package.

String

HTTP status codes

Status Description

200 OK

Response body contains the required schema or skill package structure.

400 Bad Request

Indicates that one or more properties in the request body aren't valid.
The following example shows the response body with the error and message.

{
     "message": "The property is outside the allowed range.",
     "code": "INVALID_STRING_LENGTH"
}

401 Unauthorized

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.

403 Forbidden

Indicates that the authorization token is valid, but the requested operation isn't allowed.

404 Not Found

Requested resource not found.

429 Too Many Requests

Skill has exceeded the permitted rate limit (specified number of requests per unit of time). The skill can retry the request by using exponential back-off.

500 Server Error

Error occurred on the server. The skill can retry the request by using exponential back-off.

503 Service Unavailable

Server is down for maintenance, overloaded, or otherwise unavailable to handle the incoming request.


Was this page helpful?

Last updated: Sep 08, 2023