# Manage Lockdowns via API

## Scenarios

In the API, lockdowns are represented as scenarios. Each scenario includes a `type` field that defines its purpose. You can programmatically manage Verkada scenarios, such as listing available lockdowns, activating one, or releasing an active one, using third-party platforms and automation tools.

***

## Command configuration

#### Organization level

{% stepper %}
{% step %}
**In Verkada Command, go to All Products > Access.**
{% endstep %}

{% step %}
**On the left navigation, click Access Settings.**
{% endstep %}

{% step %}
**Toggle on Enable Lockdown and Scenario Control via API.**
{% endstep %}
{% endstepper %}

#### Generate API key

{% stepper %}
{% step %}
**In Verkada Command, go to All Products > Admin.**
{% endstep %}

{% step %}
**Under Org Settings, click API & Integrations.**
{% endstep %}

{% step %}
**From the API & Integration settings, select API Keys > Add.**

a. Select **New Key** and click **Next.**\
b. Enter a unique name.\
c. Under **Endpoints**, select **Access Control.**\
d. Set the permissions to **Read/Write**.\
e. Set the expiration date.\
f. Click **Generate API.**
{% endstep %}
{% endstepper %}

***

## Available API actions

Once you configure Command to allow API control of scenarios, you can perform the following actions:

* [List Scenarios](https://apidocs.verkada.com/reference/getaccessscenariolistviewv1): Retrieve all configured scenarios across your organization.
* [Activate a Scenario](https://apidocs.verkada.com/reference/postaccessscenarioactivateviewv1): Trigger a scenario programmatically in response to an event or condition.
* [Release a Scenario](https://apidocs.verkada.com/reference/postaccessscenarioreleaseviewv1): End or deactivate an active scenario.

{% hint style="warning" %}
See [Verkada API Docs](https://apidocs.verkada.com/reference/access-scenarios) for more details on specific Access Control API endpoints.
{% endhint %}

***

## Activate and release a scenario via API

When a scenario such as a lockdown is activated or released through the API, it behaves the same as if it were triggered manually in Command.

Using the API to activate or release a scenario will:

* Execute all configured scenario actions, such as locking doors, triggering alerts, or activating AUX outputs.
* Update the scenario’s status in both the Command interface and the Verkada Pass app.
* Generate event logs for each action, visible in the Events report and the Command audit log.
