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

# Disable, enable or delete an integration

Turn an SMS integration off and on again, or delete it.

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

## Before you start

* The integration is not the default while other integrations exist in the environment — the default cannot be disabled or deleted then (`CM-ERRORS-INTEGRATIONS-021`). [Set another one as default](/codemash/cloud/sms/integrations/set-default.md) first.
* No trigger uses it: an integration a trigger sends through cannot be deleted (`CM-ERRORS-INTEGRATIONS-019`).
* You need `sms:update` to disable or enable, `sms:delete` to delete.

## Steps

1. Open the integration, here `Twilio (Acme support line)`, and open **Actions**. It offers **Disable** while the integration is enabled (**Enable** while it is off).

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-26c6c38dbe92e53985963f23819dda0a216b4c02%2Fdisable-1.png?alt=media" alt="The Actions menu of the Twilio integration with Disable"><figcaption><p>Disable in the Actions menu.</p></figcaption></figure>
2. Press **Disable**. The badge turns **DISABLED**; the settings are kept.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-ae014522659ac0fb0ecac89c7ec1b09822de9489%2Fdisable-2.png?alt=media" alt="Editing Twilio integration with the badges DISABLED, TEST FAILED, NOT CONFIRMED"><figcaption><p>The integration is disabled.</p></figcaption></figure>
3. To delete an integration, here `Twilio (old marketing number)`, choose **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-c48a36dffce0dd8b84be34b838a001c665dda7df%2Fdisable-3.png?alt=media" alt="Delete Confirmation dialog over the Twilio (old marketing number) integration: Are you sure you want to delete? with Cancel and Delete"><figcaption><p>The delete confirmation.</p></figcaption></figure>

## Result

A disabled integration stays in the list with **Enabled** = **No**. It is not offered on campaigns, trigger actions or template tests, and a campaign or trigger that still names it is refused (`CM-ERRORS-INTEGRATIONS-005`). After a delete, Cloud returns to the list without it. A refused action shows a red box, *This action was not carried out*, with the reason.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-e4b7290924cae6f210b827fe2308d6ad0354feae%2Fdisable-4.png?alt=media" alt="SMS Service Integrations list with Test Me (DEFAULT) and Twilio (Acme support line); the deleted integration is gone"><figcaption><p>The list after the delete.</p></figcaption></figure>

## Change or remove it later

* **Enable** — **Actions → Enable** on a disabled integration.
* A deleted integration cannot be restored; save it again from [Providers](/codemash/cloud/sms/integrations/providers.md), with its secrets. The last integration of an environment can be deleted even when it is the default.

## Do it from code

The SDK sends the integration id only in the address, but the gateway also reads it from the body for disable and enable; pass it a second time as `Id` until this is fixed.

```ts
await norbix.hub.notifications.disableSmsIntegration({ id, Id: id } as any);
await norbix.hub.notifications.enableSmsIntegration({ id, Id: id } as any);
await norbix.hub.notifications.deleteSmsIntegration({ id });
```

```sh
norbix hub notifications sms integration delete --id int_T89nUHyW3SEaLhyR2bisz --yes
```

Disable and enable from the CLI: `norbix raw -X PUT /v2/notifications/sms/integrations/<id>/disable -b '{"id":"<id>"}'` (`…/enable` to undo). The client setup is on the [SMS page](/codemash/cloud/sms.md#use-it-from-code). API: [Disable Sms Integration](/codemash/api-reference/notifications/sms/disable-sms-integration.md) · [Enable Sms Integration](/codemash/api-reference/notifications/sms/enable-sms-integration.md) · [Delete Sms Integration](/codemash/api-reference/notifications/sms/delete-sms-integration.md)
