Campaigns

Campaigns

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

On this page
  1. campaigns submit
  2. campaigns hook set
  3. campaigns hook rotate

mailset campaigns submit

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

Admin or owner

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.

Returns

With --json it prints what the API returns.

In the API: POST /v1/campaigns.submit

Usage
mailset campaigns submit --domain <domain> --messages <json> [--org <id>]
Example
mailset campaigns submit --domain news.example.com --messages @campaign.json
campaign.json
[
  {
    "raw": "<the message as base64>",
    "campaign": "spring-sale",
    "recipient": "user_4821",
    "track": {
      "opens": true,
      "clicks": true
    }
  }
]

mailset campaigns hook set

Campaigns: where events go.

Admin or owner

Flags

  • --url<url>required

    Where events are POSTed: an https URL on a public host name.

Returns

With --json it prints what the API returns.

In the API: POST /v1/campaigns.hook.set

Usage
mailset campaigns hook set --url <url> [--org <id>]
Example
mailset campaigns hook set --url https://app.example.com/hooks/campaigns

mailset campaigns hook rotate

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

Admin or owner

Returns

With --json it prints what the API returns.

In the API: POST /v1/campaigns.hook.rotate

Usage
mailset campaigns hook rotate [--org <id>]
Example
mailset campaigns hook rotate