> 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/emails/integrations/disable.md).

# Disable or delete

Disable, enable again, or delete an email integration.

**Where:** Email → Integrations → an integration → **Actions → Disable** / **Delete** · `/projects/<project>/emails/integrations/<integrationId>/edit`

Disable keeps the integration and its settings but stops using it. Delete removes it.

## Before you start

* Permission `email:update` to disable and enable, `email:delete` to delete.
* Check what uses it: campaigns and trigger actions name their provider. A disabled or deleted provider makes them fail (see Result).

## Steps

1. Open the integration, for example `Mailgun (example)`, and open **Actions**.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-375d7ba3b393d46d8f11c24462797c79fbeeccc6%2Fintegrations-disable-1.png?alt=media" alt="Editing Mailgun integration with the Actions menu: Set as default, Disable, See MailGun documentation, See SDK documentation, See API documentation, Delete"><figcaption><p>The Actions menu of an enabled integration.</p></figcaption></figure>
2. Press **Disable**. The badge changes to **DISABLED**, and the menu item now reads **Enable**.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-58b0cd443795638c3ff4b8e85363673142b46177%2Fmailgun-2.png?alt=media" alt="Editing Mailgun integration with the badges DISABLED, NOT TESTED, NOT CONFIRMED"><figcaption><p>The integration is disabled.</p></figcaption></figure>
3. To remove an integration for good, open it and press **Actions → Delete**. The dialog **Delete Confirmation** asks "Are you sure you want to delete?"; press **Delete**.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-e82b53ca822255ecda043026a7361787290f138d%2Fintegrations-disable-4.png?alt=media" alt="Delete Confirmation dialog over the Twilio SendGrid integration"><figcaption><p>Deleting an integration.</p></figcaption></figure>

## Result

A disabled integration shows `False` in **Enabled** and is left out of the provider pickers. A deleted one is gone from the list.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-e53a9cbe2271db892a71fbcb795d6521e8f5fa1a%2Fintegrations-disable-3.png?alt=media" alt="Email Service Integrations list: Mailgun (example) with Enabled False"><figcaption><p>The list shows the disabled integration.</p></figcaption></figure>

* A new campaign or trigger that names a disabled integration is refused (`CM-ERRORS-INTEGRATIONS-005`); a campaign whose provider is disabled before it starts ends **Failed**, and nothing is sent.
* A trigger whose provider is disabled sends nothing and is marked **Needs attention** in its module's trigger list.
* If an action is refused, a red box **This action was not carried out** says why.

## Change or remove it later

* **Enable** — **Actions → Enable** turns it back on.
* A deleted integration cannot be restored; [connect the provider](/codemash/cloud/emails/integrations/providers.md) again (it gets a new id) and update the campaigns and triggers that named the old one.

## Do it from code

```ts
const id = 'int_EHCfsQqCmMCrhLzxdrX3u'; // Mailgun (example)
await norbix.hub.notifications.disableEmailIntegration({ id });
await norbix.hub.notifications.enableEmailIntegration({ id });
await norbix.hub.notifications.deleteEmailIntegration({ id: 'int_1gjW2fh83rZdG8MmQoqL9r' }); // another one, removed
```

```sh
norbix hub notifications email integration disable --id int_EHCfsQqCmMCrhLzxdrX3u --yes
```

API: [Disable](/codemash/api-reference/notifications/email/disable-email-integration.md) · [Enable](/codemash/api-reference/notifications/email/enable-email-integration.md) · [Delete](/codemash/api-reference/notifications/email/delete-email-integration.md)
