> ## Documentation Index
> Fetch the complete documentation index at: https://docs.suprsend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Push Template

> Push locally edited notification template files and all channel variants to a SuprSend workspace as draft or commit them live in one step.

Push locally edited template files - including all channel variants - to a SuprSend workspace. By default, pushed changes are saved as a **draft** and do not go live until committed.

Use `--commit` to push and commit in a single step, making changes live immediately.

This action overwrites templates with the same slug in the workspace, or creates new ones if they do not exist.

## Syntax

```bash theme={"system"}
suprsend template push [<slug>] [flags]
```

## Flags

| Flag | Description | Default |
| - | - | - |
| `-h, --help` | Show help for the command | – |
| `-g, --slug string` | Push a single template by slug (alternative to the positional argument). Omit to push all templates in the directory. | – |
| `-d, --dir string` | Directory to read template files from | `./suprsend/templates` |
| `-c, --commit` | Commit the pushed templates to live immediately after pushing | – |
| `--commit-message string` | Message describing the changes (used when `--commit` is set) | – |
| `-F, --force` | Force commit by skipping variants that have errors (also skips the confirmation prompt) | – |
| `-n, --dry-run` | Print what would be pushed without making any changes | – |

## Example

```bash theme={"system"}
# Push all templates from the default directory as drafts
suprsend template push

# Push a single template by slug
suprsend template push --slug order-shipped

# Push from a custom directory
suprsend template push --dir ./my-templates

# Push and immediately commit to live
suprsend template push --slug order-shipped --commit

# Push and commit with a message describing the changes
suprsend template push --slug order-shipped --commit --commit-message "Update CTA copy for Q2 campaign"

# Push to production and commit, skipping any variants with errors
suprsend template push --workspace production --commit --force
```

> [!NOTE]
>
> Without `--commit`, pushed changes are saved as a draft. Run `suprsend template commit <slug>` as a separate step when you are ready to make them live.

> [!WARNING]
>
> Using `--force` skips validation errors on individual variants and commits the rest. Variants with errors will not be committed. Use with caution in production.


## Related topics

- [Android Push](https://docs.suprsend.com/docs/android-push-template.md)
- [Push Notifications](https://docs.suprsend.com/docs/expo-push-notifications.md)
- [Commands and Flags](https://docs.suprsend.com/reference/cli-template-overview.md)
- [CLI Overview](https://docs.suprsend.com/reference/cli-intro.md)
- [Web Push](https://docs.suprsend.com/docs/web-push-template.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.