Request Types Reference (LaunchRequest, CanFulfillIntentRequest, IntentRequest, SessionEndedRequest)
The Alexa service sends your service a request using one of the standard request types when users engage with your skill by voice. There are several request types:
- LaunchRequest: Sent when the user invokes your skill without providing a specific intent.
- IntentRequest: Sent when the user makes a request that corresponds to one of the intents defined in your intent schema.
- SessionEndedRequest: Sent when the current skill session ends for any reason other than your code closing the session.
- CanFulfillIntentRequest: Sent when the Alexa service is querying a skill to determine whether the skill can understand and fulfill the intent request with detected slots, before actually asking the skill to take action.
If you implement additional interfaces, such as AudioPlayer
or PlaybackController
, your skill receives additional requests beyond the standard request types. See the documentation for the interface for details on the requests that interface can send to your skill. For a list of custom skill interfaces, see Interfaces.
For the overall request format, see JSON Interface Reference for Custom Skills - Request Format.
- LaunchRequest
- CanFulfillIntentRequest
- IntentRequest
- SessionEndedRequest
- Request Examples
- Service Interface Reference (JSON)
LaunchRequest
A LaunchRequest
is an object that represents that a user made a request to an Alexa skill, but did not provide a specific intent.
{
"type": "LaunchRequest",
"requestId": "string",
"timestamp": "string",
"locale": "string"
}
LaunchRequest Parameters
Parameter | Description | Type |
---|---|---|
type |
Describes the request type with the value as: "LaunchRequest" | string |
timestamp |
Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. | string |
requestId |
Represents a unique identifier for the specific request. | string |
locale |
A string indicating the user's locale. For example: en-US . See supported locale codes. |
string |
Valid Response Types
Your service can respond to LaunchRequest
with any combination of:
- Standard response properties (
outputSpeech
,card
, andreprompt
). -
If you include both standard properties and an
AudioPlayer
directive, Alexa processes the standard properties first. For example, if you provideoutputSpeech
in the same response as anPlay
directive, Alexa speaks the provided text before beginning to stream the audio. -
Any Dialog directive. You must specify an intent in the
updatedIntent
parameter of the directive. This lets you immediately start a dialog with the user.You can include
OutputSpeech
in your response along with theDialog
directive. ForDialog.Delegate
, Alexa speaks theoutputSpeech
before the prompts defined in the dialog model. For the otherDialog
directives, the speech is used as the prompt to ask for slot values or confirmation.
CanFulfillIntentRequest
A CanFulfillIntentRequest
is an object that represents a request made to skill to query whether the skill can understand and fulfill the intent request with detected slots, before actually asking the skill to take action. For information about the request format, see Understand Name-free Interaction for Custom Skills.
Response to CanFulfillIntentRequest
Your service can respond to CanFulfillIntentRequest
with canFulfillIntent
. See Understand Name-free Interaction for Custom Skills.
See Response Body Syntax for the general response parameters. In addition, the following parameters are unique to canFulfillIntent
.
canFulfillIntent Parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
Represents an overall response to whether the skill can understand and fulfill the intent with detected slots. The following are possible values:
When making ranking decisions, Alexa tracks the skill's response to |
enum |
Yes |
|
A map that represents a detailed response to each detected slot within the intent and whether the skill can understand and fulfill the slot. The map supplements the overall |
object |
Yes |
IntentRequest
An IntentRequest
is an object that represents a request made to a skill based on what the user wants to do.
{
"type": "IntentRequest",
"requestId": "string",
"timestamp": "string",
"dialogState": "string",
"locale": "string",
"intent": {
"name": "string",
"confirmationStatus": "string",
"slots": {
"SlotName": {
"name": "string",
"value": "string",
"confirmationStatus": "string",
"slotValue": {},
"resolutions": {
"resolutionsPerAuthority": [
{
"authority": "string",
"status": {
"code": "string"
},
"values": [
{
"value": {
"name": "string",
"id": "string"
}
}
]
}
]
}
}
}
}
}
IntentRequest Parameters
Parameter | Description | Type |
---|---|---|
|
Describes the type of the request with the value as: "IntentRequest". |
|
|
Represents the unique identifier for the specific request. |
|
|
Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. |
|
|
Enumeration indicating the status of the multi-turn dialog. This property is included if the skill has a dialog model. Possible values:
If the dialog model defines intent confirmation rules, the |
|
|
An object that represents what the user wants. For the definition of the |
|
|
A |
|
Intent Object
Parameter | Description | Type |
---|---|---|
|
A string representing the name of the intent. |
|
|
An enumeration indicating whether the user has explicitly confirmed or denied the entire intent. Possible values:
|
|
|
A map of key-value pairs that further describes what the user meant based on a predefined intent schema. The map can be empty.
|
|
For more about how you define the intents your skill can handle, see:
Slot Object
Name | Description | Type |
---|---|---|
|
An enumeration that shows whether the user has explicitly confirmed or denied the value of this slot. Possible values: |
|
|
A string that represents the name of the slot. |
|
|
Included when the user provided a single value for the slot ( |
|
|
A |
|
|
Shows that the value came from the user. Always |
|
|
Included when the user provided a single value for the slot ( |
|
Resolutions Object
See Define Synonyms and IDs for Slot Type Values (Entity Resolution) for details about defining custom slot types with synonyms and ID values for entity resolution.
Name | Description | Type |
---|---|---|
|
An array of objects that represent each possible authority for entity resolution. An authority represents the source for the data provided for the slot. For a custom slot type, the authority is the slot type you defined. |
|
|
The name of the authority for the slot values. For custom slot types, this authority label incorporates your skill ID and the slot type name. |
|
|
An object that represents the status of entity resolution for the slot. |
|
|
A code that indicates the results of attempting to resolve the user utterance against the defined slot types. For details, see Entity resolution status codes. |
|
|
An array of resolved values for the slot. The values in the array are ordered from the most likely to least likely matches. Therefore, the first value in the array is considered the best match. |
|
|
An object that represents the resolved value for the slot, based on the user's utterance and the slot type definition. |
|
|
The unique ID defined for the resolved slot value. This ID is based on the IDs defined in the slot type definition. For details about how to define slot values and IDs, see Entity Resolution for Custom Slot Types. |
|
|
The string for the resolved slot value. |
|
SlotValue object
A SlotValue
object contains either value
or values
, but never both. When the user provides a single value for the slot, the value is in the value
property. When the user provides multiple values for the slot, the array of values is in the values
property.
For details about configuring a slot to collect multiple values, see Collect Multiple Values in a Slot.
Name | Description | Type |
---|---|---|
|
Included when the |
|
|
The type of value the slot captured from the user. |
|
|
Included when type is |
|
|
Included when the |
Array of |
Entity resolution status codes
ER_SUCCESS_MATCH
– The spoken value successfully resolved to a known entity.- For a custom slot type, this means the value matched at least one value or synonym explicitly defined in the slot type
- For a built-in slot type that you extended, the value matched at least one value or synonym in the set of extended values you added.
- For a built-in slot type that supports entity resolution, the value resolved to at least one entity in the Alexa knowledge graph.
ER_SUCCESS_NO_MATCH
– The spoken value didn't resolve to a known entity.ER_ERROR_TIMEOUT
– An error occurred due to a timeout.ER_ERROR_EXCEPTION
– An error occurred due to an exception during processing.
Valid Response Types
Your service can respond to IntentRequest
with any combination of:
- Standard response properties (
outputSpeech
,card
, andreprompt
). -
If you include both standard properties and an
AudioPlayer
directive, Alexa processes the standard properties first. For example, if you provideoutputSpeech
in the same response as anPlay
directive, Alexa speaks the provided text before beginning to stream the audio. -
Any Dialog directive.
For
Dialog.Delegate
: WhendialogState
isCOMPLETED
, you must also setupdatedIntent
to a different intent. IfupdatedIntent
is not present or is set to the original intent, returningDialog.Delegate
for aCOMPLETED
dialog causes an error. WhendialogState
is eitherSTARTED
ORIN_PROGRESS
,updatedIntent
can be set to either the original intent or a new intent.
SessionEndedRequest
A SessionEndedRequest
is an object that represents a request made to an Alexa skill to notify that a session was ended. Your service receives a SessionEndedRequest
when a currently open session is closed for one of the following reasons:
- The user says "exit" or "quit".
- The user does not respond or says something that does not match an intent defined in your voice interface while the device is listening for the user's response.
- An error occurs.
shouldEndSession
flag to true
in your response also ends the session. In this case, your service does not receive a SessionEndedRequest
.{
"type": "SessionEndedRequest",
"requestId": "string",
"timestamp": "string",
"reason": "string",
"locale": "string",
"error": {
"type": "string",
"message": "string"
}
}
SessionEndedRequest Parameters
Parameter | Description | Type |
---|---|---|
|
Describes the type of the request with the value as: " |
|
|
Represents the unique identifier for the specific request. |
|
|
Provides the date and time when Alexa sent the request as an ISO 8601 formatted string. Used to verify the request when hosting your skill as a web service. |
|
|
Describes why the session ended. Possible values:
|
|
|
A |
|
|
An error object providing more information about the error that occurred. This object includes the properties:
|
|
Valid Response Types
Your skill cannot return a response to SessionEndedRequest
.
Request Examples
LaunchRequest Example
{
"version": "1.0",
"session": {
"new": true,
"sessionId": "amzn1.echo-api.session.0000000-0000-0000-0000-00000000000",
"application": {
"applicationId": "amzn1.echo-sdk-ams.app.000000-d0ed-0000-ad00-000000d00ebe"
},
"attributes": {},
"user": {
"userId": "amzn1.account.AM3B00000000000000000000000"
}
},
"context": {
"System": {
"application": {
"applicationId": "amzn1.echo-sdk-ams.app.000000-d0ed-0000-ad00-000000d00ebe"
},
"user": {
"userId": "amzn1.account.AM3B00000000000000000000000"
},
"device": {
"deviceId": "string",
"supportedInterfaces": {
"AudioPlayer": {}
}
}
},
"AudioPlayer": {
"offsetInMilliseconds": 0,
"playerActivity": "IDLE"
}
},
"request": {
"type": "LaunchRequest",
"requestId": "amzn1.echo-api.request.0000000-0000-0000-0000-00000000000",
"timestamp": "2015-05-13T12:34:56Z",
"locale": "string"
}
}
IntentRequest Example
{
"version": "1.0",
"session": {
"new": false,
"sessionId": "amzn1.echo-api.session.0000000-0000-0000-0000-00000000000",
"application": {
"applicationId": "amzn1.echo-sdk-ams.app.000000-d0ed-0000-ad00-000000d00ebe"
},
"attributes": {
"supportedHoroscopePeriods": {
"daily": true,
"weekly": false,
"monthly": false
}
},
"user": {
"userId": "amzn1.account.AM3B00000000000000000000000"
}
},
"context": {
"System": {
"application": {
"applicationId": "amzn1.echo-sdk-ams.app.000000-d0ed-0000-ad00-000000d00ebe"
},
"user": {
"userId": "amzn1.account.AM3B00000000000000000000000"
},
"device": {
"supportedInterfaces": {
"AudioPlayer": {}
}
}
},
"AudioPlayer": {
"offsetInMilliseconds": 0,
"playerActivity": "IDLE"
}
},
"request": {
"type": "IntentRequest",
"requestId": " amzn1.echo-api.request.0000000-0000-0000-0000-00000000000",
"timestamp": "2015-05-13T12:34:56Z",
"dialogState": "COMPLETED",
"locale": "string",
"intent": {
"name": "GetZodiacHoroscopeIntent",
"confirmationStatus": "NONE",
"slots": {
"ZodiacSign": {
"name": "ZodiacSign",
"value": "virgo",
"confirmationStatus": "NONE"
}
}
}
}
}
SessionEndedRequest Example
{
"version": "1.0",
"session": {
"new": false,
"sessionId": "amzn1.echo-api.session.0000000-0000-0000-0000-00000000000",
"application": {
"applicationId": "amzn1.echo-sdk-ams.app.000000-d0ed-0000-ad00-000000d00ebe"
},
"attributes": {
"supportedHoroscopePeriods": {
"daily": true,
"weekly": false,
"monthly": false
}
},
"user": {
"userId": "amzn1.account.AM3B00000000000000000000000"
}
},
"context": {
"System": {
"application": {
"applicationId": "amzn1.echo-sdk-ams.app.000000-d0ed-0000-ad00-000000d00ebe"
},
"user": {
"userId": "amzn1.account.AM3B00000000000000000000000"
},
"device": {
"supportedInterfaces": {
"AudioPlayer": {}
}
}
},
"AudioPlayer": {
"offsetInMilliseconds": 0,
"playerActivity": "IDLE"
}
},
"request": {
"type": "SessionEndedRequest",
"requestId": "amzn1.echo-api.request.0000000-0000-0000-0000-00000000000",
"timestamp": "2015-05-13T12:34:56Z",
"reason": "USER_INITIATED",
"locale": "string"
}
}
Service Interface Reference (JSON)
Request Format and Standard Request Types:
- Request and Response JSON Reference
- Request Types Reference (LaunchRequest, IntentRequest, SessionEndedRequest) (this document)
- Alexa.Presentation.APL Interface
- Alexa.Presentation.APLT Interface
- Alexa.Presentation.HTML Interface
- AudioPlayer Interface
- Connections Interface
- Dialog Interface
- Messaging Interface
- PlaybackController Interface
- VideoApp Interface
Last updated: Nov 28, 2023