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.

  1. 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

  2. Update the skill.json file to include the events object. For details, see Skill Manifest.

  3. If necessary for your skill, add the permissions object, using the appropriate scopes for your skill. For details, see Skill Manifest.

  4. 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)"

Was this page helpful?

Last updated: Jul 08, 2024