Campaign API: Sample Flows

This article presents possible use cases and corresponding sample flows that you can support. It provides a useful starting point as you plan your implementation.

A/B test email subject lines

A marketing team wants to determine which subject line drives higher open rates before committing to a full send. They run two variants of the same campaign with different subject lines, measure the results, and send the winning variant to the rest of the audience.

Prerequisite: Create and publish two campaigns with different subject lines before running this flow.

To A/B test email subject lines:

  1. Call List Campaigns to retrieve the campaign IDs for both campaigns. Save the IDs for later.
  2. Call List Statistics and pass both campaign IDs. Compare the email.opened count for each campaign to determine which subject line performed better.
  3. Call List Recipients for the winning campaign with activity set to CLICKED to identify the most engaged recipients.
  4. Call Label Contact to tag the clicked recipients with a label for future targeting.
  5. Call Reuse Campaign on the winning campaign to create a draft copy.
  6. Call Publish Campaign with the label ID from step 4 in emailDistributionOptions.labelIds to send the refined campaign to the engaged audience.

Last updated: 10 September 2026

Did this help?