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

# Template editor

**Where:** Push → Templates → template · `/projects/<project>/push/templates/new` · `…/<id>/edit`

**Add New Push Template** builds one push notification: a short title and body with Razor tokens, plus delivery options and platform-specific settings for iOS and Android.

{% hint style="danger" %}
Saving a template from the UI is **broken** right now: the form submits its values wrapped in an `emailTemplate` object, while the API expects `templateName` and `translations` at the top level — the request is rejected with `CM-ERRORS-PROPERTY-001: Property TemplateName is required`. The **Create Campaign** and **Rename Template** menu items are also not functional yet. Tracked in testing-plan area **15-push**. Until the fix lands, create templates through the API or SDK.
{% endhint %}

{% hint style="info" %}
Screenshot TODO — capture comes from testing-plan area **15-push**.
{% endhint %}

## Fields

**General push notification settings**

* **Template language** (edit mode) — switch between the project's languages; each language holds its own title and body.
* **Template name** (required) — e.g. `Notification when user registers`. Locked after creation.
* **Use pre-processing code** — a switch that opens a Razor code editor, for logic that runs before the message is rendered.
* **Title** — e.g. `Welcome @Model.FirstName to our app!`
* **Body** (required) — e.g. `You have successfully registered to our app @Model.FirstName @Model.LastName!`

**Advanced settings**

* **Provider** (required when integrations exist) — the [push integration](/cloud/push/integrations.md) that delivers sends from this template.
* **Priority** — None, Default, Normal, or High.
* **TTL** — how long (ms) the provider keeps trying to deliver, e.g. `15000`.
* **Pass extra information to push notification as JSON** — a switch that opens a JSON editor for a custom data payload your app receives with the notification.
* **Metadata** — free key/value pairs stored with the message.
* **Url** — a deep link opened on tap, e.g. `myapp://notifications/@Model.nId`.
* **Collapse ID** — newer notifications with the same id replace older ones.
* **File Integration** — reserved; the dropdown is not wired yet.

**Platform specific options** — two tabs; the provider must support the options (e.g. APNs ignores the Android tab):

* **IOS** — Push Type (Alert, Background, or Voip), Subtitle, App's bundle ID (e.g. `com.mycompany.myapp`), Group ID, Category, Badge Count (a number), Sound, Launch Image, and the Content Available checkbox.
* **Android** — Visibility (Private, Public, or Secret), Group Id, Group message, Channel Id, Restricted package name, Sound, Led Color, Light On Duration, Light off duration, Accent color, Small icon, Large icon, Vibration timings, and the Sticky, Default light settings, and Default vibration settings checkboxes.

**Create** / **Update** saves and returns to the [templates list](/cloud/push/templates.md); **Cancel** discards.

## Actions (edit mode)

* **Test** — available when there are no unsaved changes. A slide-over lets you pick the translation language and a provider, fill the template's tokens, and send a test. Its labels still read "email" ("Send Test Email", "Send test email to:") — copy carried over from the Email module.
* The actions menu adds **Create Campaign** and **Rename Template** (both not functional yet), **See documentation**, and **Delete** (with a confirmation dialog).

## Use it from code

[Create Push Template](/sdks-and-cli/notifications/push/create-push-template.md) · [Update Push Template](/sdks-and-cli/notifications/push/update-push-template.md)

## API reference

Endpoints: [Create](/api-reference/notifications/push/create-push-template.md), [Update](/api-reference/notifications/push/update-push-template.md), [Get](/api-reference/notifications/push/get-push-template.md), [Get content tokens](/api-reference/notifications/push/get-push-message-content-tokens.md), [Preview](/api-reference/notifications/push/preview-push-notification.md), [Render](/api-reference/notifications/push/render-push.md), [Delete](/api-reference/notifications/push/delete-push-template.md).
