[Yandex Cloud documentation](../../../index.md) > [Yandex Cloud Notification Service](../../index.md) > [Step-by-step guides](../index.md) > SMS notifications > Managing SMS templates

# Managing SMS templates

[SMS templates](../../concepts/sms.md#templates) allow you to divide SMS notifications into different types, each with its own sending [cost](../../pricing.md), thus enabling more efficient expense management.

## Creating an SMS template {#create}

To create an SMS template:

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select the folder where you want to create the template.
  1. Navigate to **Cloud Notification Service**.
  1. In the left-hand panel, select ![route](../../../_assets/console-icons/route.svg) **Notification channels** and select a channel with an [individual sender](../../concepts/sms.md#individual-sender) you want to create a template in.
  1. In the left-hand menu, select ![square-chart-bar](../../../_assets/console-icons/square-chart-bar.svg) **Templates** and click **Create template**. In the window that opens:

      1. In the **Name** field, enter a name for the template.
      1. In the **Type** field, select the type of your new template:

          * `Transaction`: Used to notify about financial transactions, e.g., crediting, debiting, transfer, and reservation of funds, accrual of interest on deposit, etc.
          * `Service`: Used to notify users about the status of services, maintenance works, terms of service updates, etc.
          * `Authorization`: Used to send data required for various authorization procedures, verifications, confirmations of actions/transactions, or consents.
          
          If an SMS notification does not fall under any of these types, it is treated as _advertising_ by default.

      1. In the **Template** field, specify the template body.

          The text of SMS notifications must exactly match the template: the character case as well as the number and type of spaces must match, and the text must not contain any undefined special characters.

          Learn more about template requirements [here](../../concepts/sms.md#template-contents).
      1. In the **Example message** field, enter a sample text for the SMS notification you intend to send. This notification must match the template you are creating.

          You cannot create a template if the sample message does not match the template specified above.
      1. Click **Create**.

{% endlist %}

Once created, the SMS template will switch to the `Registering` [status](../../concepts/sms.md#template-status) and will be sent for registration on the telecom provider side. At the same time, a [support](https://center.yandex.cloud/support) ticket will be created. Registering a template takes two to four weeks. Once all telecom providers complete template registration, the template will switch to the `Active` status and be available for use.

## Deleting a template {#delete}

Before deleting an active SMS template on the Cloud Notification Service side, [deregister](#deregister) that template on the telecom provider side. You can delete templates in the `Deregistered` [status](../../concepts/sms.md#template-status) only.

### Deregistering a template {#deregister}

To deregister an SMS template in the `Active` status:

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select the folder containing the template.
  1. Navigate to **Cloud Notification Service**.
  1. In the left-hand panel, select ![route](../../../_assets/console-icons/route.svg) **Notification channels** and select a channel with an [individual sender](../../concepts/sms.md#individual-sender) you want to delete a template from.
  1. In the left-hand menu, select ![square-chart-bar](../../../_assets/console-icons/square-chart-bar.svg) **Templates**.
  1. In the row with the template, click ![ellipsis](../../../_assets/console-icons/ellipsis.svg) and select **Deregister**.
  1. In the window that opens, confirm deregistration.

{% endlist %}

The SMS template will now enter the `Deregistering` [status](../../concepts/sms.md#template-status) and be submitted for deregistration to the telecom providers. A [support](https://center.yandex.cloud/support) ticket will be created at the same time. Once all telecom providers complete tempate deregistration, the template will become `Deregistered`, and you will be able to delete it from Cloud Notification Service.

### Deleting a deregistered template {#delete-deregistered}

To delete an SMS template in the `Deregistered` status:

{% list tabs group=instructions %}

- Management console {#console}

  1. In the [management console](https://console.yandex.cloud), select the folder containing the template.
  1. Navigate to **Cloud Notification Service**.
  1. In the left-hand panel, select ![route](../../../_assets/console-icons/route.svg) **Notification channels** and select a channel with an [individual sender](../../concepts/sms.md#individual-sender) you want to delete a template from.
  1. In the left-hand menu, select ![square-chart-bar](../../../_assets/console-icons/square-chart-bar.svg) **Templates**.
  1. In the row with the template, click ![ellipsis](../../../_assets/console-icons/ellipsis.svg) and select **Delete**.
  1. In the window that opens, confirm the deletion.

{% endlist %}

If you want to delete a template in the `Registering` status, cancel its registration first. To do this, write about your intention in the support ticket that was previously generated when creating the template.

If the template has not been used for two months, it may be automatically unregistered by the telecom providers and deleted from Cloud Notification Service.

#### Useful links {#see-also}

* [SMS templates](../../concepts/sms.md#templates)