Interaction Model Management REST API Reference v1
Use the Interaction Model Management REST API to manage the custom voice interaction model for your skill. For details about the custom voice interaction model, About Voice Interaction Models. For requirements, see Interaction model limits.
To create the interaction model in the developer console, see Create the Interaction Model for Your Skill. For details about the schema, see Interaction Model Schema.
API endpoint
The endpoint of the Interaction Model Management 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 Interaction Model Management API includes the following operations.
Operation | HTTP method and URI |
---|---|
| |
|
Get interaction model
Get the interaction model for the specified skill.
Request
To get the interaction model, you make a GET
request to the interactionModel
resource.
Request path and header example
GET /v1/skills/{skillId}/stages/{stage}/interactionModel/locales/{locale}
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 |
|
Path |
Indicates stage of the skill. |
String |
Yes |
|
Path |
Locale of the skill. |
String |
Yes |
|
Header |
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 interaction model.
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
{
"version": "2",
"description": "Created version 2 of interaction model.",
"interactionModel": {
"languageModel": {
"invocationName": "my space facts",
"modelConfiguration": {
"fallbackIntentSensitivity": {
"level": "LOW"
}
},
"intents": [{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
"name": "AMAZON.HelpIntent",
"samples": []
},
{
"name": "AMAZON.StopIntent",
"samples": []
},
{
"name": "AMAZON.FallbackIntent",
"samples": []
},
{
"name": "AMAZON.StartOverIntent",
"samples": []
},
{
"name": "GetNewFactIntent",
"slots": [],
"samples": [
"Give me a fact",
"tell me a fact"
]
}
],
"types": [{
"name": "Planet_facts",
"values": [{
"name": {
"value": "Mercury"
}
},
{
"name": {
"value": "Venus"
}
},
{
"name": {
"value": "Earth"
}
},
{
"name": {
"value": "Mars"
}
}
]
}]
},
"dialog": {
"intents": [{
"name": "GetNewFactIntent",
"confirmationRequired": false,
"prompts": {},
"slots": [{
"name": "Answer",
"type": "Planet",
"confirmationRequired": false,
"elicitationRequired": true,
"prompts": {
"elicitation": "Elicit.Intent-GetNewFactIntent.IntentSlot-Answer"
}
}]
}],
"delegationStrategy": "ALWAYS"
},
"prompts": [{
"id": "Elicit.Intent-GetNewFactIntent.IntentSlot-Answer",
"variations": [{
"type": "PlainText",
"value": "What planet?"
}]
}]
}
}
Response body properties
Property | Description | Type |
---|---|---|
|
Identifies the version of the interaction model. |
String |
|
Describes this version of the interaction model. |
String |
|
Defines the properties of the interaction model, such as invocation name, intents, and slots. |
Interaction Model object |
HTTP status codes
Status | Description |
---|---|
|
Response body contains the interaction model for the specified skill, stage, and locale. |
|
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. |
Update interaction model
Create or update the interaction model for the specified skill. On success, a build starts on the interaction model. To get the build status, use Get skill status.
Request
To create an interaction model, you make a PUT
request to the interactionModel
resource.
Request path and header example
PUT /v1/skills/{skillId}/stages/{stage}/interactionModel/locales/{locale}
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 |
|
Path |
Indicates stage of the skill. |
String |
Yes |
|
Path |
Locale of the skill. |
String |
Yes |
|
Header |
String |
Yes |
Request body example
{
"description": "Created version 1 of interaction model.",
"interactionModel": {
"languageModel": {
"invocationName": "my space facts",
"modelConfiguration": {
"fallbackIntentSensitivity": {
"level": "LOW"
}
},
"intents": [{
"name": "AMAZON.CancelIntent",
"samples": []
},
{
"name": "AMAZON.HelpIntent",
"samples": []
},
{
"name": "AMAZON.StopIntent",
"samples": []
},
{
"name": "AMAZON.FallbackIntent",
"samples": []
},
{
"name": "AMAZON.StartOverIntent",
"samples": []
},
{
"name": "GetNewFactIntent",
"slots": [],
"samples": [
"Give me a fact",
"tell me a fact"
]
}
],
"types": [{
"name": "Planet_facts",
"values": [{
"name": {
"value": "Mercury"
}
},
{
"name": {
"value": "Venus"
}
},
{
"name": {
"value": "Earth"
}
},
{
"name": {
"value": "Mars"
}
}
]
}]
},
"dialog": {
"intents": [{
"name": "GetNewFactIntent",
"confirmationRequired": false,
"prompts": {},
"slots": [{
"name": "Answer",
"type": "Planet",
"confirmationRequired": false,
"elicitationRequired": true,
"prompts": {
"elicitation": "Elicit.Intent-GetNewFactIntent.IntentSlot-Answer"
}
}]
}],
"delegationStrategy": "ALWAYS"
},
"prompts": [{
"id": "Elicit.Intent-GetNewFactIntent.IntentSlot-Answer",
"variations": [{
"type": "PlainText",
"value": "What's your answer?"
}]
}]
}
}
Request body properties
Property | Description | Type | Required |
---|---|---|---|
|
Describes this version of the interaction model. |
String |
Yes |
|
Defines the interaction model, such as invocation name, intents, and slots. |
Interaction Model object |
Yes |
Response
A successful response returns HTTP 202 Accepted
, that indicates that the interaction model version was created. The response header contains a Location
parameter with a URL to the build 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
The response has no body.
Response body properties
The response has no body.
HTTP status codes
Status | Description |
---|---|
|
Successful creation of the interaction model version and a build is in progress. The response header contains a |
|
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. |
Object definitions
The Interaction Model Management API defines the following objects.
Locale values
The following table shows valid values for the locale
property.
Locale code | Language |
---|---|
|
Arabic (SA) |
|
German (DE) |
|
English (AU) |
|
English (CA) |
|
English (UK) |
|
English (IN) |
|
English (US) |
|
Spanish (ES) |
|
Spanish (MX) |
|
Spanish (US) |
|
French (CA) |
|
French (FR) |
|
Hindi (IN) |
|
Italian (IT) |
|
Japanese (JP) |
|
Dutch (NL) |
|
Portuguese (BR) |
Related topics
- Interaction Model Catalog REST API Reference
- Utterance Profiler REST API Reference
- Deprecated features
Last updated: Aug 08, 2024