Kraiter
Guides

Campaigns

Organise sequences and templates into campaigns for coordinated email programmes.

Campaigns are an organisational layer that groups related sequences and templates together. They provide a high-level view of a coordinated email programme — such as a product launch, seasonal promotion, or onboarding funnel.

Creating a campaign

Create a campaign with a name and optional description:

SDK
const campaign = await kraiter.campaigns.create({
  name: 'Q1 Product Launch',
  description: 'Email programme for the January product launch, including announcement, follow-ups, and re-engagement.',
});
cURL
curl -X POST https://api.kraiter.com/campaigns \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Q1 Product Launch",
    "description": "Email programme for the January product launch."
  }'

Adding sequences to a campaign

Associate sequences with a campaign to group them logically:

SDK
await kraiter.campaigns.addSequence('Q1 Product Launch', {
  sequenceName: 'launch-announcement',
});

await kraiter.campaigns.addSequence('Q1 Product Launch', {
  sequenceName: 'launch-follow-up',
});

await kraiter.campaigns.addSequence('Q1 Product Launch', {
  sequenceName: 'launch-re-engagement',
});

A sequence can belong to multiple campaigns. Adding a sequence to a campaign does not change the sequence's behaviour — it is purely organisational.

Adding templates to a campaign

Similarly, associate templates with a campaign:

SDK
await kraiter.campaigns.addTemplate('Q1 Product Launch', {
  templateName: 'launch-hero-email',
});

await kraiter.campaigns.addTemplate('Q1 Product Launch', {
  templateName: 'launch-reminder',
});

Viewing campaign contents

Retrieve the full campaign with its associated sequences and templates:

SDK
const campaign = await kraiter.campaigns.get('Q1 Product Launch');

console.log(campaign.sequences);  // List of associated sequences
console.log(campaign.templates);  // List of associated templates
cURL
curl https://api.kraiter.com/campaigns/Q1%20Product%20Launch \
  -H "Authorization: Bearer YOUR_API_KEY"

Removing sequences and templates

Remove the association between a sequence or template and a campaign:

SDK
await kraiter.campaigns.removeSequence('Q1 Product Launch', {
  sequenceName: 'launch-re-engagement',
});

await kraiter.campaigns.removeTemplate('Q1 Product Launch', {
  templateName: 'launch-reminder',
});

Removing a sequence or template from a campaign does not delete the sequence or template itself — it only removes the association.

Campaign lifecycle

Campaigns follow a status lifecycle:

StatusDescription
draftNewly created. Not yet active.
activeCampaign is live. Associated sequences can be running.
pausedCampaign is temporarily paused.
completedCampaign has finished. All sequences have completed.
archivedPermanently archived for historical reference.

Update the campaign status:

SDK
await kraiter.campaigns.activate('Q1 Product Launch');
await kraiter.campaigns.pause('Q1 Product Launch');
await kraiter.campaigns.complete('Q1 Product Launch');
await kraiter.campaigns.archive('Q1 Product Launch');

Note that changing a campaign's status does not automatically change the status of its sequences. You manage sequence statuses independently. The campaign status serves as a coordination signal and organisational indicator.

Listing campaigns

List all campaigns with pagination:

SDK
const { items, nextCursor } = await kraiter.campaigns.list({
  limit: 20,
});
cURL
curl "https://api.kraiter.com/campaigns?limit=20" \
  -H "Authorization: Bearer YOUR_API_KEY"

Updating a campaign

Update the campaign name or description:

SDK
await kraiter.campaigns.update('Q1 Product Launch', {
  description: 'Updated programme for the January launch with additional re-engagement flow.',
});

Deleting a campaign

Delete a campaign. This removes the campaign and all its associations but does not delete the underlying sequences or templates.

SDK
await kraiter.campaigns.delete('Q1 Product Launch');
cURL
curl -X DELETE https://api.kraiter.com/campaigns/Q1%20Product%20Launch \
  -H "Authorization: Bearer YOUR_API_KEY"

Best practices

  • Use campaigns for coordination. Group related sequences and templates so your team can see the full picture of a programme.
  • Name campaigns clearly. Include the time period or initiative name (e.g. "Q1 Product Launch", "Summer Sale 2025", "Onboarding V2").
  • Archive completed campaigns. Keep your campaign list clean by archiving campaigns that have finished running.
  • One sequence per goal. Rather than creating a single complex sequence, break workflows into focused sequences and group them in a campaign.