---
title: Actions
previous: /integration/events
previousTitle: Events
next: /misc/contributing
nextTitle: Misc
---

For all actions, you can specify a `target` property to specify the device to send the action or refer to.

```yaml
target:
  device_id: a1b2c3d4e5f6g7h8i9j0
```

## Arm Group(s)

<Property name="action" type="diagral.arm_groups" required>
Activate one or more groups

    ```yaml
    action: diagral.arm_groups
    target:
      device_id: a1b2c3d4e5f6g7h8i9j0
    data:
      group_ids: "3"
    ```

    ```yaml
    action: diagral.arm_groups
    target:
      device_id: a1b2c3d4e5f6g7h8i9j0
    data:
      group_ids: "[2,3]"
    ```

    The `data` object should contain the following properties:

  <Accordion title="data" defaultOpen>
    <Property name="group_ids" type="string" required>
      Group(s) to arm. One or many (as array)
    </Property>
  </Accordion>
</Property>

## Disarm Group(s)

<Property name="action" type="diagral.disarm_groups" required>
Disarm one or more groups

    ```yaml
    action: diagral.disarm_groups
    target:
      device_id: a1b2c3d4e5f6g7h8i9j0
    data:
      group_ids: "3"
    ```

    ```yaml
    action: diagral.disarm_groups
    target:
      device_id: a1b2c3d4e5f6g7h8i9j0
    data:
      group_ids: "[2,3]"
    ```

    The `data` object should contain the following properties:

  <Accordion title="data" defaultOpen>
    <Property name="group_ids" type="string" required>
      Group(s) to disarm. One or many (as array)
    </Property>
  </Accordion>
</Property>

## Register Webhook

<Property name="action" type="diagral.register_webhook" required>
Register webhook in Diagral Cloud - **Only one webhook can be registered for an installation**

    ```yaml
    action: diagral.register_webhook
    target:
      device_id: a1b2c3d4e5f6g7h8i9j0
    ```

</Property>

## Unregister Webhook

<Property name="action" type="diagral.unregister_webhook" required>
Unregister Webhook in Diagral Cloud

    ```yaml
    action: diagral.unregister_webhook
    target:
      device_id: a1b2c3d4e5f6g7h8i9j0
    ```

</Property>