> 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/templates/delete.md).

# Delete a template

Delete an SMS template for good.

**Where:** SMS → Templates → a template → **Actions** → **Delete** · `/projects/<project>/sms/templates/<id>/edit`

## Before you start

* No trigger uses the template: **Delete** is refused while a trigger sends it (`CM-ERRORS-TEMPLATES-010`).
* Deleting is permanent. To keep the text but stop using it, [archive](/codemash/cloud/sms/templates/publish.md) it instead.
* You need `sms:delete` on SMS templates.

## Steps

1. Open the template, for example `Old promo`, and choose **Actions → Delete**.
2. The dialog **Delete Confirmation** asks *Are you sure you want to delete?* Press **Delete** (or **Cancel**).

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-dfbd3b1b6c3241ddf3e2bd2964e933dd35f64f0f%2Ftemplates-delete-1.png?alt=media" alt="Delete Confirmation dialog: Are you sure you want to delete? with Cancel and Delete"><figcaption><p>The confirmation dialog.</p></figcaption></figure>

## Result

Cloud returns to the [templates list](/codemash/cloud/sms/templates.md) without the template. Campaigns already sent with it keep their history.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-782b42b5633846363791198a26248f5fe4fb203c%2Ftemplates-delete-2.png?alt=media" alt="SMS Templates list with Delivery update, Appointment reminder, Winter sale and Login code; Old promo is gone"><figcaption><p>Old promo is deleted.</p></figcaption></figure>

## Change or remove it later

* A deleted template cannot be restored. To keep a copy first, use **Actions → Clone** in the [editor](/codemash/cloud/sms/templates/editor.md).

## Do it from code

```ts
await norbix.hub.notifications.deleteSmsTemplate({ id });
```

```sh
norbix hub notifications sms template delete --id tmpl_3bcdCrS0qxS08xsC6QbSTb --yes
```

The client setup is on the [SMS page](/codemash/cloud/sms.md#use-it-from-code). API: [Delete Sms Template](/codemash/api-reference/notifications/sms/delete-sms-template.md)
