Add Events to Your Skill
When you develop a skill with Alexa Skills Kit (ASK) Command Line Interface (CLI), you can modify the skill schema to include event subscriptions that allow you to receive event notifications when the subscribed event occurs for a customer. The pre-built and custom voice interaction models support skill events. For more details about events, see Skill Events.
To add events to an existing skill, follow these instructions.
A custom skill manifest can include skill events if updated in this manner.
Install the ASK CLI
Before you can update your skill definition, you need to install ASK CLI. For details, see Quick Start Alexa Skills Kit Command Line Interface for installation instructions.
Update your skill definition to include events
After you complete the ASK CLI installation and initialization, you can update your skill definition for any of your existing skills as follows.
-
Download your existing skill manifest by using the get-skill-manifest command.
ask smapi get-skill-manifest -s {skillId} -g {development|certified|live} > skill.json
-
Update the
skill.json
file to include theevents
object. For details, see Skill Manifest. -
If necessary for your skill, add the
permissions
object, using the appropriate scopes for your skill. For details, see Skill Manifest. -
Update your skill definition by using the update-skill-manifest command.
ask smapi update-skill-manifest -s {skillId} -g {development|certified|live} --manifest "$(cat skill.json)"
Note: You can't change the configuration of a live skill. Any changes to the skill configuration require recertification, so a new development version is automatically created in the developer console. This version has the same information as the original live version. For details, see Revise and update your skill after certification or publication.
Last updated: Jul 08, 2024