# inboxjot campaigns

Create, test and send campaigns.

## campaigns list

List campaigns.

```sh
inboxjot campaigns list [options]
```

| Option                | Description                                                  |
| --------------------- | ------------------------------------------------------------ |
| `--query <QUERY>`     | Show only campaigns whose name has this text.                |
| `--status <STATUS>`   | Show only campaigns with this status, such as draft or sent. |
| `-n, --limit <LIMIT>` | Show at most this many rows. Default: `50`.                  |
| `--all`               | Show every row, one page after another.                      |
| `--after <CURSOR>`    | Show the rows after this cursor.                             |
| `--before <CURSOR>`   | Show the rows before this cursor.                            |

```sh
inboxjot campaigns list --status draft
```

## campaigns inspect

Show a campaign.

```sh
inboxjot campaigns inspect <CAMPAIGN>
```

| Argument   | Description                                               |
| ---------- | --------------------------------------------------------- |
| `CAMPAIGN` | Campaign ID, such as cpg_06d2mfk8r7hm4ps9wb2kd. Required. |

```sh
inboxjot campaigns inspect cpg_06d2mfk8r7hm4ps9wb2kd
```

## campaigns create

Create a draft campaign.

```sh
inboxjot campaigns create [options]
```

| Option                        | Description                                                     |
| ----------------------------- | --------------------------------------------------------------- |
| `--name <NAME>`               | Campaign name.                                                  |
| `--subject <SUBJECT>`         | Subject line.                                                   |
| `--from <FROM>`               | From address on a verified domain, such as <hello@acme.com>.    |
| `--reply-to <EMAIL>`          | Reply-to address.                                               |
| `--preheader <PREHEADER>`     | Preview text that shows after the subject.                      |
| `--html-file <PATH>`          | Read the HTML from this file, or - for stdin.                   |
| `--template <TEMPLATE>`       | Template ID to start from.                                      |
| `--segment <SEGMENT>`         | Segment ID to send to; repeat it or separate IDs with commas.   |
| `--exclude-segment <SEGMENT>` | Segment ID to leave out; repeat it or separate IDs with commas. |
| `--topic <TOPIC>`             | Topic ID that recipients must be subscribed to.                 |

```sh
inboxjot campaigns create --name "November news" --subject "What's new" --from "Acme <news@acme.com>" --html-file news.html --segment seg_123
```

## campaigns update

Change a draft campaign.

```sh
inboxjot campaigns update <CAMPAIGN> [options]
```

| Argument   | Description                                               |
| ---------- | --------------------------------------------------------- |
| `CAMPAIGN` | Campaign ID, such as cpg_06d2mfk8r7hm4ps9wb2kd. Required. |

| Option                        | Description                                                     |
| ----------------------------- | --------------------------------------------------------------- |
| `--name <NAME>`               | Campaign name.                                                  |
| `--subject <SUBJECT>`         | Subject line.                                                   |
| `--from <FROM>`               | From address on a verified domain, such as <hello@acme.com>.    |
| `--reply-to <EMAIL>`          | Reply-to address.                                               |
| `--preheader <PREHEADER>`     | Preview text that shows after the subject.                      |
| `--html-file <PATH>`          | Read the HTML from this file, or - for stdin.                   |
| `--template <TEMPLATE>`       | Template ID to start from.                                      |
| `--segment <SEGMENT>`         | Segment ID to send to; repeat it or separate IDs with commas.   |
| `--exclude-segment <SEGMENT>` | Segment ID to leave out; repeat it or separate IDs with commas. |
| `--topic <TOPIC>`             | Topic ID that recipients must be subscribed to.                 |

```sh
inboxjot campaigns update cpg_06d2mfk8r7hm4ps9wb2kd --subject "What's new in November"
```

## campaigns test

Send a test of a campaign to a few addresses.

```sh
inboxjot campaigns test <CAMPAIGN> [options]
```

| Argument   | Description                                               |
| ---------- | --------------------------------------------------------- |
| `CAMPAIGN` | Campaign ID, such as cpg_06d2mfk8r7hm4ps9wb2kd. Required. |

| Option         | Description                                                |
| -------------- | ---------------------------------------------------------- |
| `--to <EMAIL>` | Address to send the test to; up to 5, separated by commas. |

```sh
inboxjot campaigns test cpg_06d2mfk8r7hm4ps9wb2kd --to riti@example.com
```

## campaigns send

Send a campaign now or at a set time.

```sh
inboxjot campaigns send <CAMPAIGN> [options]
```

| Argument   | Description                                               |
| ---------- | --------------------------------------------------------- |
| `CAMPAIGN` | Campaign ID, such as cpg_06d2mfk8r7hm4ps9wb2kd. Required. |

| Option        | Description                                                 |
| ------------- | ----------------------------------------------------------- |
| `--at <TIME>` | Send at this time, such as 2026-11-20T09:00:00Z or "in 2h". |

```sh
inboxjot campaigns send cpg_06d2mfk8r7hm4ps9wb2kd
inboxjot campaigns send cpg_06d2mfk8r7hm4ps9wb2kd --at 2026-11-20T09:00:00Z
```

## campaigns pause

Pause a sending campaign.

```sh
inboxjot campaigns pause <CAMPAIGN>
```

| Argument   | Description                                               |
| ---------- | --------------------------------------------------------- |
| `CAMPAIGN` | Campaign ID, such as cpg_06d2mfk8r7hm4ps9wb2kd. Required. |

```sh
inboxjot campaigns pause cpg_06d2mfk8r7hm4ps9wb2kd
```

## campaigns resume

Resume sending a paused campaign.

```sh
inboxjot campaigns resume <CAMPAIGN>
```

| Argument   | Description                                               |
| ---------- | --------------------------------------------------------- |
| `CAMPAIGN` | Campaign ID, such as cpg_06d2mfk8r7hm4ps9wb2kd. Required. |

```sh
inboxjot campaigns resume cpg_06d2mfk8r7hm4ps9wb2kd
```

## campaigns cancel

Cancel a scheduled or sending campaign.

```sh
inboxjot campaigns cancel <CAMPAIGN>
```

| Argument   | Description                                               |
| ---------- | --------------------------------------------------------- |
| `CAMPAIGN` | Campaign ID, such as cpg_06d2mfk8r7hm4ps9wb2kd. Required. |

```sh
inboxjot campaigns cancel cpg_06d2mfk8r7hm4ps9wb2kd
```

## campaigns versions list

List the saved versions of a campaign.

```sh
inboxjot campaigns versions list <CAMPAIGN> [options]
```

| Argument   | Description                                               |
| ---------- | --------------------------------------------------------- |
| `CAMPAIGN` | Campaign ID, such as cpg_06d2mfk8r7hm4ps9wb2kd. Required. |

| Option                | Description                                 |
| --------------------- | ------------------------------------------- |
| `-n, --limit <LIMIT>` | Show at most this many rows. Default: `50`. |
| `--all`               | Show every row, one page after another.     |
| `--after <CURSOR>`    | Show the rows after this cursor.            |
| `--before <CURSOR>`   | Show the rows before this cursor.           |

```sh
inboxjot campaigns versions list cpg_06d2mfk8r7hm4ps9wb2kd
```

## campaigns versions restore

Copy a version into a campaign.

```sh
inboxjot campaigns versions restore <CAMPAIGN> <VERSION>
```

| Argument   | Description                                               |
| ---------- | --------------------------------------------------------- |
| `CAMPAIGN` | Campaign ID, such as cpg_06d2mfk8r7hm4ps9wb2kd. Required. |
| `VERSION`  | Version ID, such as ver_06d2mfk8r5cx3nd8vt1qb. Required.  |

```sh
inboxjot campaigns versions restore cpg_06d2mfk8r7hm4ps9wb2kd ver_06d2mfk8r5cx3nd8vt1qb
```

## campaigns delete

Delete a campaign.

```sh
inboxjot campaigns delete <CAMPAIGN>
```

| Argument   | Description                                               |
| ---------- | --------------------------------------------------------- |
| `CAMPAIGN` | Campaign ID, such as cpg_06d2mfk8r7hm4ps9wb2kd. Required. |

```sh
inboxjot campaigns delete cpg_06d2mfk8r7hm4ps9wb2kd
```
