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

# Archive or unarchive a template

Push templates have no publish step — a saved template is live. Archive a template to take it out of use, and unarchive it to bring it back.

**Where:** Push → Templates → a template → **Actions** → **Archive** / **Unarchive** · `/projects/<project>/push/templates/<templateId>/edit`

A push template has **no publish step**: once saved, it can be sent at once, and every change is live after **Update**. To take a template out of use without deleting it, **archive** it.

## Before you start

* The template is saved and the form has no unsaved changes — **Archive** and **Unarchive** are off otherwise.

## Steps

1. Open the template, here `Old promo`, and open **Actions**. An active template offers **Archive**; **Unarchive** is greyed out.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-b94770df325c0cb5e9b9f1801f22a8a5db5bfb0d%2Ftemplates-publish-1.png?alt=media" alt="Edit Push Template of Old promo with the Actions menu open: Create Campaign, Archive, Unarchive greyed out, Clone, See documentation, Delete"><figcaption><p>Archive in the Actions menu.</p></figcaption></figure>
2. Press **Archive**.

## Result

In the [templates list](/codemash/cloud/push/templates.md) the template stays, with **Is Active** = **No**. An archived template is not offered when you create a campaign, and its **Missing \<language>** badge is no longer shown.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-b15ec47c4cd7f9137384c8400c0629dada36c923%2Ftemplates-publish-2.png?alt=media" alt="Push Templates list with Old promo, Is Active No"><figcaption><p>Old promo is archived.</p></figcaption></figure>

## Change or remove it later

* **Unarchive** — open the template: **Actions** now offers **Unarchive** (and **Archive** is greyed out). Press it and the template is active again.

  <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-db463a0eea7862838e77dce331c1fb0c41f9c3ed%2Ftemplates-publish-3.png?alt=media" alt="The Actions menu of the archived Old promo: Archive greyed out, Unarchive available"><figcaption><p>Unarchive on an archived template.</p></figcaption></figure>
* **Delete** — see [Delete a template](/codemash/cloud/push/templates/delete.md).

## Do it from code

```ts
const id = 'tmpl_6agfvbRRfBg5SJ8EI01FqE'; // Back in stock
await norbix.hub.notifications.archivePushTemplate({ id });
await norbix.hub.notifications.unArchivePushTemplate({ id });
```

```sh
norbix hub notifications push template archive --id tmpl_2ghEVN2y6zJ29Adb1tPOby
norbix hub notifications push template unarchive --id tmpl_2ghEVN2y6zJ29Adb1tPOby
```

The list shows the new state after a second or two. The client setup is on the [Push page](/codemash/cloud/push.md#use-it-from-code). API: [Archive Push Template](/codemash/api-reference/notifications/push/archive-push-template.md) · [Unarchive Push Template](/codemash/api-reference/notifications/push/un-archive-push-template.md)
