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

# Footers

> View, create, update, and publish email footers.

The `footers` command lets you manage the custom [footers](https://loops.so/docs/creating-emails/footers.md) of your campaign and workflow emails.

A footer has a name, a placement, and content. The content is [LMX](https://loops.so/docs/creating-emails/lmx.md) and has a draft version and a published version. Emails use the published version only.

To use a new footer:

1. Create the footer with [`create`](#create).
2. Set the draft content with [`variant update`](#variant-update).
3. Publish the draft with [`variant publish`](#variant-publish).
4. Make the footer the default with [`set-default`](#set-default), or set it on one email with [`email-messages update --footer-id`](https://loops.so/docs/cli/email-messages#setting-the-footer).

## `create`

Create a footer. The new footer has an unpublished draft. Emails cannot use the footer until you publish its content.

```bash theme={"dark"}
loops footers create --name "Newsletter footer"
```

### Flags

| Flag | Short | Description |
| - | - | - |
| `--name` | `-n` | Footer name. Loops applies a default name if you omit this flag. |

## `delete`

Delete a footer and its content.

```bash theme={"dark"}
loops footers delete cmo2b6r8t005zl70z4a5b6c7d
```

You cannot delete the default footer or a footer that emails use.

## `get`

Get a footer by ID, including its content and `contentRevisionId`.

```bash theme={"dark"}
loops footers get cmo2b6r8t005zl70z4a5b6c7d
```

## `list`

List footers.

```bash theme={"dark"}
loops footers list
```

Pass `--pick` to filter the list interactively with [fzf](https://github.com/junegunn/fzf) and copy the selected footer ID to your clipboard. Requires `fzf` to be installed and on your `PATH`.

```bash theme={"dark"}
loops footers list --pick
```

### Flags

| Flag | Description |
| - | - |
| `--pick` | Interactively pick a footer and copy its ID to the clipboard. Requires [fzf](https://github.com/junegunn/fzf). |
| `--per-page` | Results per page (10–50, default 20) |
| `--cursor` | Pagination cursor for a specific page |

## `set-default`

Make a published footer the default footer. New campaign and workflow emails use the default footer.

```bash theme={"dark"}
loops footers set-default cmo2b6r8t005zl70z4a5b6c7d --existing-emails previousDefault
```

`--existing-emails` selects which existing campaign and workflow emails change to the footer:

* `previousDefault` — the emails that use the previous default footer.
* `all` — all emails.
* `none` — no emails. Only new emails use the footer.

The output includes `updatedEmailCount`, the number of existing emails that changed to the footer.

### Confirmation

`--existing-emails all` changes the footer on every existing campaign and workflow email, so the CLI asks for confirmation first. Pass `--yes` to skip the prompt.

```bash theme={"dark"}
loops footers set-default cmo2b6r8t005zl70z4a5b6c7d --existing-emails all --yes
```

The CLI cannot show the prompt with `--output json` or when the input is not a terminal, for example in a script or CI job. In these cases `--yes` is required.

### Flags

| Flag | Short | Description |
| - | - | - |
| `--existing-emails` | | Existing emails that change to the footer: `previousDefault`, `all`, or `none` Required |
| `--yes` | `-y` | Skip the confirmation prompt |

## `update`

Update the name or placement of a footer. Changes apply immediately, including to running workflows.

```bash theme={"dark"}
loops footers update cmo2b6r8t005zl70z4a5b6c7d --name "Newsletter footer" --placement below
```

To change the content of a footer, use [`variant update`](#variant-update).

### Flags

| Flag | Short | Description |
| - | - | - |
| `--name` | `-n` | Footer name |
| `--placement` | | Where the footer shows: `inside` or `below` the email body |

At least one flag must be provided.

## `variant`

The `variant` subcommands manage the content of a footer. A footer has one variant, so each subcommand takes the footer ID.

### `variant get`

Get the content of a footer, including its `contentRevisionId`.

```bash theme={"dark"}
loops footers variant get cmo2b6r8t005zl70z4a5b6c7d
```

The text output shows the draft content. `unpublishedChanges` is `true` when the draft is different from the published content. Use `--output json` to get both `draftLmx` and `publishedLmx`.

### `variant update`

Update the draft content of a footer. Emails continue to use the published content until you publish the draft.

```bash theme={"dark"}
loops footers variant update cmo2b6r8t005zl70z4a5b6c7d \
  --expected-revision-id clv8g2x4z012yl70n5o6p7q8r \
  --lmx-file ./footer.lmx
```

Pass [LMX](https://loops.so/docs/creating-emails/lmx.md) inline with `--lmx` or from a file with `--lmx-file`.

Footer content supports a subset of LMX. The only variables it can use are `{system.company_name}`, `{system.company_address}`, `{system.mailing_list_name}`, `{system.unsubscribe_link}`, and `{contact.email}`. It cannot use `<Style />` or components.

#### Flags

| Flag | Short | Description |
| - | - | - |
| `--expected-revision-id` | `-r` | Last-seen `contentRevisionId` from `footers variant get`. Mutually exclusive with `--force`. |
| `--force` | `-f` | Fetch the current revision and use it (overwrites concurrent edits). Mutually exclusive with `--expected-revision-id`. |
| `--lmx` | | [LMX](https://loops.so/docs/creating-emails/lmx.md) markup (inline). Mutually exclusive with `--lmx-file`. |
| `--lmx-file` | | Path to a file containing [LMX](https://loops.so/docs/creating-emails/lmx.md) markup. Mutually exclusive with `--lmx`. |

One of `--lmx` or `--lmx-file` must be provided.

### `variant publish`

Publish the draft content of a footer. Emails that use the footer use the new content immediately.

```bash theme={"dark"}
loops footers variant publish cmo2b6r8t005zl70z4a5b6c7d \
  --expected-revision-id clv8g2x4z012yl70n5o6p7q8r
```

The draft must contain:

* `{system.company_name}` in the text.
* `{system.company_address}` in the text.
* `{system.unsubscribe_link}` as the URL of a link or button.

#### Flags

| Flag | Short | Description |
| - | - | - |
| `--expected-revision-id` | `-r` | Last-seen `contentRevisionId` from `footers variant get`. Mutually exclusive with `--force`. |
| `--force` | `-f` | Fetch the current revision and use it (overwrites concurrent edits). Mutually exclusive with `--expected-revision-id`. |

### Concurrency control

`variant update` and `variant publish` must include either `--expected-revision-id` or `--force`:

* `--expected-revision-id` — pass the `contentRevisionId` from a prior `footers variant get`. The request is rejected with a conflict if the server's revision has advanced, so you don't overwrite or publish a concurrent edit.
* `--force` — fetch the current revision automatically and use it. With `variant update`, this overwrites any concurrent edits. With `variant publish`, this publishes the current draft, including edits from other users.


## Related topics

- [Footers](https://loops.so/docs/creating-emails/footers.md)
- [Delete a footer](https://loops.so/docs/api-reference/delete-footer.md)
- [Update a footer](https://loops.so/docs/api-reference/update-footer.md)
- [Get a footer](https://loops.so/docs/api-reference/get-footer.md)
- [Create a footer](https://loops.so/docs/api-reference/create-footer.md)
