Event Schemas for Alexa Smart Properties
Alexa Smart Properties enables you to receive notifications about Alexa events. Events are published to Amazon Simple Notification Service (SNS).
For details about how to set up events, see Receive Events for Alexa Smart Properties Core.
Event types
The following table contains the Alexa Smart Properties events to which you can subscribe to receive notifications.
Event Name | Description | Schema |
---|---|---|
|
An automation sequence execution is complete. Either all actions are invoked and completed successfully, or there were failures. | |
|
The skill times out or the skill returns an invalid response. | |
|
An enterprise subscription is activated for a unit. | |
|
A role has been assigned to a principal | |
|
A role has been revoked from a principal | |
|
A device has completed retail setup and is ready to be fleet managed |
Automation execution completion event
The following is an example of an automation execution completion event.
{
"header":{
"version":"2.0",
"eventId":{
"id":"12345-6789-1011-abcd-example"
},
"eventType":{
"namespace":"Alexa.Automation.Execution",
"name":"Completion"
},
"eventTime":{
"timestamp":"2017-09-20T12:04:03Z"
},
"entities": {
"unit":{
"type":"Unit",
"id":"amzn1.alexa.unit.did.12345"
}
}
},
"payload":{
"automation":{
"id":"amzn1.alexa.automation.12345"
},
"result": {
"status": "FAILURE",
"errors":[
{
"type":"ENDPOINT_NOT_FOUND",
"message":"Endpoint used in the automation was not found",
"id":"amzn1.alexa.endpoint.12345"
}
]
}
}
}
Header parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
Schema version, which is |
String |
Yes |
|
Object that contains the event ID. |
Object |
Yes |
|
Unique identifier that represents an event. |
String |
Yes |
|
Object that contains the event name and namespace. |
Object |
Yes |
|
Represents the category an event belongs to. All automation-related events share the same namespace. Example: |
String |
Yes |
|
An event name within the namespace. Example: |
String |
Yes |
|
Object that contains the event time. |
Object |
Yes |
|
Event creation time in "YYYY-MM-DDThh:mm:ssZ" format (RFC 3339 profile of ISO 8601). |
DateTime |
Yes |
|
List of entities. For details, see Unit entity. |
Array |
Yes |
Payload parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
Details for the automation from which the event was generated. |
Object |
types |
|
Unique identifier of the automation instance from which the event was generated. |
String |
Yes |
|
Details about the result of the automation. |
Object |
Yes |
|
Status of automation execution initiation or completion. Allowed values:
|
String enum |
Yes |
|
Errors that occurred for automation initiation or completion. |
Array |
No |
|
Error type. Allowed values:
|
String |
No |
|
Message that describes the error. |
String |
No |
|
Endpoint ID. Example: |
String |
No |
Skill interaction failure event
The following is an example of a skill interaction event that reports a skill fault event due to an invalid response from the skill or a skill endpoint timeout.
{
"header":{
"version":"2.0",
"eventId":{
"id":"12345-6789-1011-abcd-example"
},
"eventType":{
"namespace":"Alexa.Skill.Interaction",
"name":"Failure"
},
"eventTime":{
"timestamp":"2017-09-20T12:04:03Z"
},
"entities": {
"unit":{
"type":"Unit",
"id":"amzn1.alexa.unit.did.12345"
},
"skill":{
"type":"Skill",
"id":"amzn1.ask.skill.12345"
}
}
},
"payload":{
"interaction":{
"type":"IntentRequest",
"locale":"en-US",
"intent":{
"name":"intentName"
},
},
"skill":{
"id":"amzn1.ask.skill.12345",
"stage":"live"
},
"unit":{
"id":"amzn1.alexa.unit.did.12345"
},
"session":{
"id":"amzn1.echo-api.session.12345"
},
"requestId":"amzn1.echo-api.request.12345",
"error":{
"type":"INVALID_RESPONSE",
"message":"Details about the error"
}
}
}
Header parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
Schema version, which is |
String |
Yes |
|
Object that contains the event ID. |
Object |
Yes |
|
Unique identifier that represents an event. |
String |
Yes |
|
Object that contains the event name and namespace. |
Object |
Yes |
|
Represents the category an event belongs to. All skill interaction-related events share the same namespace. Example: |
String |
Yes |
|
An event name within the namespace. Example: |
String |
Yes |
|
Object that contains the event time. |
Object |
Yes |
|
Event creation time in "YYYY-MM-DDThh:mm:ssZ" format (RFC 3339 profile of ISO 8601). |
DateTime |
Yes |
|
List of entities. For details, see Unit entity and Skill entity. |
Array |
Yes |
Payload parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
Object that describes the type of skill interaction where failures were observed. |
Object |
Yes |
|
Type of skill interaction where failures were observed. Allowed values: |
String enum |
Yes |
|
User's locale. Example: |
String |
Yes |
|
Object that indicates the action that fulfills a user's spoken request. |
Object |
No |
|
Name of the intent that corresponds to the action the user requested. Example: |
String |
No |
|
Object that represents the skill to which the event pertains. |
Object |
Yes |
|
Unique identifier of a skill. Example: |
String |
Yes |
|
Stage of the skill. Allowed values: |
String |
Yes |
|
Object that contains the unit ID. |
Object |
Yes |
|
Unit ID that uniquely identifies a unit. |
String |
Yes |
|
Object that contains an ID that uniquely identifies a skill session. |
Object |
Yes |
|
ID that uniquely identifies a skill session. Example: |
String |
Yes |
|
ID that uniquely identifies an Alexa user request and the response to it. Example: |
String |
Yes |
|
Object that contains additional details about the result of the user's request to the skill. |
Object |
Yes |
|
Type of error. Allowed values:
|
String enum |
Yes |
|
Description of the error. You should rely on the type of error and not the message of the error. The message is only used for logging purposes. |
String |
Yes |
Enterprise subscription activation event
The following is an example of an enterprise subscription activation event.
{
"header":{
"version":"2.0",
"eventId":{
"id":"12345-6789-1011-abcd-example"
},
"eventType":{
"namespace":"Alexa.Enterprise.Subscription",
"name":"Activation"
},
"eventTime":{
"timestamp":"2017-09-20T12:04:03Z"
},
"entities": {
"unit":{
"type":"Unit",
"id":"amzn1.alexa.unit.did.12345",
"parent": {
"type":"Unit",
"id":"amzn1.alexa.unit.did.12345"
}
}
}
},
"payload":{
"subscription": {
"id": "amzn1.ask.skill.12345"
},
"result": {
"status": "SUCCEEDED",
"error": {
"type": "INTERNAL_SERVER_ERROR",
"message": "Details about the error"
}
}
}
}
Header parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
Schema version, which is |
String |
Yes |
|
Object that contains the event ID. |
Object |
Yes |
|
Unique identifier that represents an event. |
String |
Yes |
|
Object that contains the event name and namespace. |
Object |
Yes |
|
Represents the category an event belongs to. All enterprise subscription-related events share the same namespace. Example: |
String |
Yes |
|
An event name within the namespace. Example: |
String |
Yes |
|
Object that contains the event time. |
Object |
Yes |
|
Event creation time in "YYYY-MM-DDThh:mm:ssZ" format (RFC 3339 profile of ISO 8601). |
DateTime |
Yes |
|
List of entities. For details, see Unit entity. |
Array |
Yes |
Payload parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
Details of the subscription for which the event was generated. |
Object |
Yes |
|
ID of the subscription. |
String enum |
Yes |
|
Result of the subscription activation. |
Object |
Yes |
|
Status of the subscription activation. |
String enum |
Yes |
|
Error that occurred for subscription activation. If activation succeeds, this object won't be present. |
Object |
No |
|
Type of error. Allowed values:
|
String enum |
Yes |
|
Description of the error. You should rely on the type of error and not the message of the error. The message is only used for logging purposes. |
String |
Yes |
Role management event
The following is an example of an a role management assignment event.
{
"header": {
"version": "2.0",
"eventId": {
"id": "12345-6789-1011-abcd-example"
},
"eventType": {
"namespace": "Alexa.Role.Management",
"name": "Assignment"
},
"eventTime": {
"timestamp": "2017-09-20T12:04:03Z"
},
"entities": {
"resource": {
"type": "Resource",
"resourceType": "Unit",
"resourceId": "amzn1.alexa.unit.did.12345"
}
}
},
"payload": {
"operator": {
"id": "12345",
"type": "User"
},
"role": {
"id": "amzn1.alexa.role.12345"
},
"targetEntity": {
"id": "amzn1.alexa.unit.12345",
"type": "Unit"
},
"principal": {
"id": "12345",
"type": "User"
},
"propagationInfo": {
"timestamp": "2022-08-17T12:19:20.026Z",
"fromRole": "amzn1.alexa.role.12345"
}
}
}
The following is an example of an a role management revocation event.
{
"header": {
"version": "2.0",
"eventId": {
"id": "12345-6789-1011-abcd-example"
},
"eventType": {
"namespace": "Alexa.Role.Management",
"name": "Revocation"
},
"eventTime": {
"timestamp": "2017-09-20T12:04:03Z"
},
"entities": {
"resource": {
"type": "Resource",
"resourceType": "Unit",
"resourceId": "amzn1.alexa.unit.did.12345"
}
}
},
"payload": {
"operator": {
"id": "12345",
"type": "User"
},
"role": {
"id": "amzn1.alexa.role.12345"
},
"targetEntity": {
"id": "amzn1.alexa.unit.12345",
"type": "Unit"
},
"principal": {
"id": "12345",
"type": "User"
},
"propagationInfo": {
"timestamp": "2022-08-17T12:19:20.026Z",
"fromRole": "amzn1.alexa.role.12345"
}
}
}
Header parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
Schema version, which is |
String |
Yes |
|
Object that contains the event ID. |
Object |
Yes |
|
Unique identifier that represents an event. |
String |
Yes |
|
Object that contains the event name and namespace. |
Object |
Yes |
|
Represents the category an event belongs to. All role-related events share the same namespace. Example: |
String |
Yes |
|
An event name within the namespace. Example: |
String |
Yes |
|
Object that contains the event time. |
Object |
Yes |
|
Event creation time in "YYYY-MM-DDThh:mm:ssZ" format (RFC 3339 profile of ISO 8601). |
DateTime |
Yes |
|
List of entities. For details, see Unit entity. |
Array |
Yes |
Payload parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
Details for the role that is being assigned/revoked which generates the event. |
Object |
types |
|
Unique identifier of the role. |
String |
Yes |
|
Details about the operator which initiated role assignment/ revocation. |
Object |
Yes |
|
The unique identifier for the operator. |
String |
Yes |
|
The type of the operator. Always "User". |
String |
Yes |
|
Details about the target entity associated with the roleId for which the respective role assignment/ revocation is made. |
Object |
Yes |
|
The unique identifier for the target entity. |
String |
Yes |
|
The type of the targetEntity. Always "Unit". |
String |
Yes |
|
Details about the principal identifier for which the role assignment/ revocation is made. |
Object |
Yes |
|
The unique identifier for the principal. |
String |
Yes |
|
The type of the principal. Always "User". |
String |
Yes |
|
PropagationInfo is included if the role assignment / revocation request includes the propagation flag. It contains information related to the propagation of the role assignment / revocation. |
Object |
No |
|
The time at which the propagation was initiated in "YYYY-MM-DDThh:mm:ssZ" format (RFC 3339 profile of ISO 8601). |
DateTime |
No |
|
The roleId from which the propagation is initiated |
String |
No |
Setup completion event
The following is an example of an a setup completion event.
{
"header": {
"version": "2.0",
"eventId": {
"id": "12345-6789-1011-abcd-example"
},
"eventType": {
"namespace": "Alexa.Endpoint.LifeCycle",
"name": "SetupCompletion"
},
"eventTime": {
"timestamp": "2023-01-20T08:02:03Z"
},
"entities": {
"registeredCustomer": {
"type": "Customer",
"id": "amzn1.account.12345"
}
}
},
"payload": {
"endpoint": {
"id": "amzn1.alexa.endpoint.12345"
}
}
}
Header parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
Schema version, which is |
String |
Yes |
|
Object that contains the event ID. |
Object |
Yes |
|
Unique identifier that represents an event. |
String |
Yes |
|
Object that contains the event name and namespace. |
Object |
Yes |
|
Represents the category an event belongs to. All role-related events share the same namespace. Example: |
String |
Yes |
|
An event name within the namespace. Example: |
String |
Yes |
|
Object that contains the event time. |
Object |
Yes |
|
Event creation time in "YYYY-MM-DDThh:mm:ssZ" format (RFC 3339 profile of ISO 8601). |
DateTime |
Yes |
|
List of entities. For details, see Unit entity. |
Array |
Yes |
Payload parameters
Parameter | Description | Type | Required |
---|---|---|---|
|
Details for the endpoint (the device) that triggered the event |
Object |
Yes |
|
Unique identifier of the endpoint that can be used directly when making an |
String |
Yes |
Entities
The header of the event can have the following entities.
Unit entity
Parameter | Description | Type | Required |
---|---|---|---|
|
Object that represents the details of a unit. |
Object |
Yes |
|
Unit entity type. Valid values: |
String enum |
Yes |
|
Unit identifier. |
String |
Yes |
|
Parent unit, which contains the parent ID. |
Object |
Yes |
|
Parent entity type. Valid values: |
String enum |
Yes |
|
Parent identifier. |
String |
Yes |
Skill entity
Parameter | Description | Type | Required |
---|---|---|---|
|
Object that represents the details of a skill. |
Object |
Yes |
|
Skill entity type. Valid values: |
String enum |
Yes |
|
Skill identifier. |
String |
Yes |
Resource entity
Parameter | Description | Type | Required |
---|---|---|---|
|
Object that represents the details of the resource. |
Object |
Yes |
|
Resource entity type. Valid values: "Resource" |
String |
Yes |
|
The type of the resource. Valid value: "Unit" |
String |
Yes |
|
The unique identifier for the resource |
String |
Yes |
Related topics
- Receive Events for Alexa Smart Properties
- Event Messenger API Reference
- Get Started with Alexa Smart Properties
Last updated: Dec 13, 2023