# Campaigns

Bulk email from a sending domain, and its event hook.

## mailset campaigns submit

Campaigns: queue up to 100 whole messages from a sending domain, each for one recipient.

```bash
mailset campaigns submit --domain <domain> --messages <json> [--org <id>]
```

### Flags

- `--domain` (\<domain\>, required): The sending domain the messages go from.
- `--messages` (\<json\>, required): The messages, 1 to 100, each for one recipient. Or @<path>, to read the JSON from a file.

An admin or owner of the org can run it.

With `--json` it prints what [the API returns](https://mailset.app/docs/api/campaigns#campaigns.submit-returns).

Example:

```bash
mailset campaigns submit --domain news.example.com --messages @campaign.json
```

`campaign.json`:

```json
[
  {
    "raw": "<the message as base64>",
    "campaign": "spring-sale",
    "recipient": "user_4821",
    "track": {
      "opens": true,
      "clicks": true
    }
  }
]
```

In the API: [POST /v1/campaigns.submit](https://mailset.app/docs/api/campaigns#campaigns.submit)

## mailset campaigns hook set

Campaigns: where events go.

```bash
mailset campaigns hook set --url <url> [--org <id>]
```

### Flags

- `--url` (\<url\>, required): Where events are POSTed: an https URL on a public host name.

An admin or owner of the org can run it.

With `--json` it prints what [the API returns](https://mailset.app/docs/api/campaigns#campaigns.hook.set-returns).

Example:

```bash
mailset campaigns hook set --url https://app.example.com/hooks/campaigns
```

In the API: [POST /v1/campaigns.hook.set](https://mailset.app/docs/api/campaigns#campaigns.hook.set)

## mailset campaigns hook rotate

Campaigns: a new signing secret for the hook; the old one stops.

```bash
mailset campaigns hook rotate [--org <id>]
```

An admin or owner of the org can run it.

With `--json` it prints what [the API returns](https://mailset.app/docs/api/campaigns#campaigns.hook.rotate-returns).

Example:

```bash
mailset campaigns hook rotate
```

In the API: [POST /v1/campaigns.hook.rotate](https://mailset.app/docs/api/campaigns#campaigns.hook.rotate)

---

© 2026 Intenseloop, Inc. Mailset’s site, docs and guides are copyrighted. You may read them and use their code to build with Mailset. Don’t republish them or use them to build a copy of Mailset. Terms: https://mailset.app/terms#content