Campaign lifecycle
Every campaign moves through three states. Understanding the transitions helps you build reliable automation around campaign control.- Draft — The campaign has been created with
POST /v1/campaignsbut has not yet started sending. You can modify sequence steps and enroll leads while a campaign is in draft. - Running — The campaign is actively sending messages to enrolled leads according to the sequence schedule. Trigger this state with
POST /v1/campaigns/:id/start. - Paused — Sending is suspended. No new messages go out, but the campaign retains all its data and can be restarted. Trigger this state with
POST /v1/campaigns/:id/pause.
You can enroll additional leads into a running campaign at any time using the bulk upsert endpoint. Newly enrolled leads start at step one of the sequence regardless of where existing leads are in the flow.
Creating a campaign
UsePOST /v1/campaigns to create a draft campaign. You can define all sequence steps up front or add them before you start the campaign.
draft state. You can now enroll leads with POST /v1/campaigns/:id/leads/bulk and then call POST /v1/campaigns/:id/start to begin sending.
Sequence steps
A sequence is an ordered list of steps, where each step is one email in the outbound thread. Every step has asubject and a bodyHtml. When you create a campaign you define all steps up front, and Leadterra spaces them according to the delay you configure on each step.
Example sequence step object
| Token | Resolved from |
|---|---|
{{firstName}} | Lead’s firstName field |
{{company}} | Lead’s company field |
{{jobTitle}} | Lead’s jobTitle field |
If a lead is missing the field a token references, Leadterra replaces the token with an empty string by default. Always verify your lead data is complete before starting a campaign to avoid awkward gaps like “Hi ,” in your subject lines.
Campaign stats
Once a campaign is running, useGET /v1/campaigns/:id/stats to pull performance metrics:
- delivered — Messages successfully accepted by the recipient’s mail server.
- queued — Messages waiting to send, either because of daily capacity limits or step delays.
- bounced — Messages permanently rejected by the recipient’s mail server.
- replied — Leads who sent at least one reply to any step in the sequence.
campaign.started, message.sent, and message.bounced webhook events to receive these signals in real time rather than polling the stats endpoint.