> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/files/triggers/enable.md).

# Enable or disable a trigger

Turn a files trigger off without deleting it, and on again.

**Where:** Files → Triggers → click a trigger → **Actions** → **Disable** / **Enable** · `/projects/<project>/files/triggers/<triggerId>/edit`

## Before you start

* The trigger exists — see [Create a trigger](/codemash/cloud/files/triggers/new.md). A new trigger starts **enabled**.

## Steps

1. Open the trigger and press **Actions**. On an enabled trigger the menu has **Disable**, **Delete trigger...** and **See documentation**.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-8ccbca19f4acbeb65d4bc91e0f30f1f05dd017cc%2Ftriggers-enable-1.png?alt=media" alt="Edit Trigger trg_7ThVAcuyPV2TNuI0iwl7Qf with the Actions menu open: Disable, Delete trigger..., See documentation"><figcaption><p>The <strong>Actions</strong> menu of an enabled trigger.</p></figcaption></figure>
2. Press **Disable**. Then the list shows the trigger with **Enabled: No**.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-5fc0c90b5ce821704663caac9980a1a97e5e6d0b%2Ftriggers-enable-2.png?alt=media" alt="File Triggers list: Tell support about deleted files with Enabled No"><figcaption><p>The trigger is off.</p></figcaption></figure>
3. To turn it on again, open the trigger. The banner *Trigger is disabled, but you can still edit it.* is on top, and **Actions** has **Enable**. Press **Enable**.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-c173f5434066e352de656c0efa49066599f1e1d7%2Ftriggers-enable-3.png?alt=media" alt="Edit Trigger with the banner Trigger is disabled, but you can still edit it. and the Actions menu: Enable, Delete trigger..., See documentation"><figcaption><p>A disabled trigger, with <strong>Enable</strong>.</p></figcaption></figure>

## Result

A disabled trigger keeps all its settings but does not run: uploads and deletes pass it by. You can still edit it. After **Enable** it runs again from the next file.

## Change or remove it later

* **Edit** — [Edit a trigger](/codemash/cloud/files/triggers/edit.md).
* **Delete** — [Delete a trigger](/codemash/cloud/files/triggers/delete.md).

## Do it from code

```ts
await norbix.hub.files.disableFilesTrigger({ triggerId, triggerType: 'Files' });
await norbix.hub.files.enableFilesTrigger({ triggerId, triggerType: 'Files' });
```

```sh
norbix hub files trigger disable --triggerId trg_7ThVAcuyPV2TNuI0iwl7Qf --triggerType Files --yes
```

Pass the id as `--triggerId` (and `--triggerType Files`). The client setup is on the [Files page](/codemash/cloud/files.md#use-it-from-code). API: [Disable Files Trigger](/codemash/api-reference/files/triggers/disable-files-trigger.md) · [Enable Files Trigger](/codemash/api-reference/files/triggers/enable-files-trigger.md)
