Create campaign
Create a new campaign in draft status. Mailboxes can be assigned using any combination of:
mailboxesormailboxIds- direct mailbox IDsmailboxEmails- resolve mailboxes by email addressmailboxTags- all mailboxes matching any of these tagsmailboxProvider- all mailboxes with this provider (e.g. "gmail", "outlook")
curl -X POST "https://api.sendkit.ai/v1/campaigns" \
-H "Content-Type: application/json" \
-H "X-Api-Key: YOUR_API_KEY" \
-d '{
"name": "Q2 Outbound - Decision Makers",
"sequence": [
{
"type": "email",
"order": 0,
"subject": "Quick question about {{companyName}}",
"body": "<p>Hi {{firstName}},</p><p>I noticed {{companyName}} is scaling fast. Would love to share how we helped similar teams cut outbound costs by 40%.</p>"
},
{
"type": "wait",
"order": 1,
"waitDays": 3
},
{
"type": "email",
"order": 2,
"subject": "Re: Quick question about {{companyName}}",
"body": "<p>Hey {{firstName}}, just bumping this up. Happy to send over a case study if that helps.</p>"
}
],
"schedule": {
"timezone": "America/Chicago",
"startTime": "08:30",
"endTime": "16:00",
"workingDays": [
1,
2,
3,
4,
5
],
"skipNationalHolidays": true
},
"settings": {
"trackOpens": true,
"trackClicks": true,
"includeUnsubscribeLink": false,
"cc": [
"sales-log@yourcompany.com"
],
"bcc": [
"crm-sync@yourcompany.com"
],
"stopOnReply": true,
"stopOnAutoReply": true,
"stopOnCompanyReply": true,
"skipDNC": true,
"dailySendLimit": 50,
"emailIntervalMinutes": 12,
"espMatchingMode": "auto",
"segCheckMode": "skip_providers",
"segSkipProviders": [
"proofpoint",
"mimecast"
],
"cnameTracking": {
"enabled": true,
"domain": "track.yourcompany.com"
},
"slackChannelId": "C04ABCDEF12",
"positiveRepliesOnlySlack": true,
"webhook": {
"enabled": true,
"url": "https://yourcompany.com/webhooks/sendkit",
"secret": "whsec_abc123xyz",
"events": [
"lead.replied",
"email.sent",
"lead.bounced"
]
},
"copyFatigueProtection": {
"enabled": true,
"autoRegenerate": true,
"autoResume": true
},
"variantOptimization": {
"enabled": true,
"minimumSendsPerVariant": 50,
"minimumDays": 5,
"optimizationMetric": "replyRate",
"keepMinimumVariants": 2
}
},
"mailboxTags": [
"outreach"
]
}'
import requests
import json
url = "https://api.sendkit.ai/v1/campaigns"
headers = {
"Content-Type": "application/json",
"X-Api-Key": "YOUR_API_KEY"
}
data = {
"name": "Q2 Outbound - Decision Makers",
"sequence": [
{
"type": "email",
"order": 0,
"subject": "Quick question about {{companyName}}",
"body": "<p>Hi {{firstName}},</p><p>I noticed {{companyName}} is scaling fast. Would love to share how we helped similar teams cut outbound costs by 40%.</p>"
},
{
"type": "wait",
"order": 1,
"waitDays": 3
},
{
"type": "email",
"order": 2,
"subject": "Re: Quick question about {{companyName}}",
"body": "<p>Hey {{firstName}}, just bumping this up. Happy to send over a case study if that helps.</p>"
}
],
"schedule": {
"timezone": "America/Chicago",
"startTime": "08:30",
"endTime": "16:00",
"workingDays": [
1,
2,
3,
4,
5
],
"skipNationalHolidays": true
},
"settings": {
"trackOpens": true,
"trackClicks": true,
"includeUnsubscribeLink": false,
"cc": [
"sales-log@yourcompany.com"
],
"bcc": [
"crm-sync@yourcompany.com"
],
"stopOnReply": true,
"stopOnAutoReply": true,
"stopOnCompanyReply": true,
"skipDNC": true,
"dailySendLimit": 50,
"emailIntervalMinutes": 12,
"espMatchingMode": "auto",
"segCheckMode": "skip_providers",
"segSkipProviders": [
"proofpoint",
"mimecast"
],
"cnameTracking": {
"enabled": true,
"domain": "track.yourcompany.com"
},
"slackChannelId": "C04ABCDEF12",
"positiveRepliesOnlySlack": true,
"webhook": {
"enabled": true,
"url": "https://yourcompany.com/webhooks/sendkit",
"secret": "whsec_abc123xyz",
"events": [
"lead.replied",
"email.sent",
"lead.bounced"
]
},
"copyFatigueProtection": {
"enabled": true,
"autoRegenerate": true,
"autoResume": true
},
"variantOptimization": {
"enabled": true,
"minimumSendsPerVariant": 50,
"minimumDays": 5,
"optimizationMetric": "replyRate",
"keepMinimumVariants": 2
}
},
"mailboxTags": [
"outreach"
]
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
const response = await fetch("https://api.sendkit.ai/v1/campaigns", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Api-Key": "YOUR_API_KEY"
},
body: JSON.stringify({
"name": "Q2 Outbound - Decision Makers",
"sequence": [
{
"type": "email",
"order": 0,
"subject": "Quick question about {{companyName}}",
"body": "<p>Hi {{firstName}},</p><p>I noticed {{companyName}} is scaling fast. Would love to share how we helped similar teams cut outbound costs by 40%.</p>"
},
{
"type": "wait",
"order": 1,
"waitDays": 3
},
{
"type": "email",
"order": 2,
"subject": "Re: Quick question about {{companyName}}",
"body": "<p>Hey {{firstName}}, just bumping this up. Happy to send over a case study if that helps.</p>"
}
],
"schedule": {
"timezone": "America/Chicago",
"startTime": "08:30",
"endTime": "16:00",
"workingDays": [
1,
2,
3,
4,
5
],
"skipNationalHolidays": true
},
"settings": {
"trackOpens": true,
"trackClicks": true,
"includeUnsubscribeLink": false,
"cc": [
"sales-log@yourcompany.com"
],
"bcc": [
"crm-sync@yourcompany.com"
],
"stopOnReply": true,
"stopOnAutoReply": true,
"stopOnCompanyReply": true,
"skipDNC": true,
"dailySendLimit": 50,
"emailIntervalMinutes": 12,
"espMatchingMode": "auto",
"segCheckMode": "skip_providers",
"segSkipProviders": [
"proofpoint",
"mimecast"
],
"cnameTracking": {
"enabled": true,
"domain": "track.yourcompany.com"
},
"slackChannelId": "C04ABCDEF12",
"positiveRepliesOnlySlack": true,
"webhook": {
"enabled": true,
"url": "https://yourcompany.com/webhooks/sendkit",
"secret": "whsec_abc123xyz",
"events": [
"lead.replied",
"email.sent",
"lead.bounced"
]
},
"copyFatigueProtection": {
"enabled": true,
"autoRegenerate": true,
"autoResume": true
},
"variantOptimization": {
"enabled": true,
"minimumSendsPerVariant": 50,
"minimumDays": 5,
"optimizationMetric": "replyRate",
"keepMinimumVariants": 2
}
},
"mailboxTags": [
"outreach"
]
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"name": "Q2 Outbound - Decision Makers",
"sequence": [
{
"type": "email",
"order": 0,
"subject": "Quick question about {{companyName}}",
"body": "<p>Hi {{firstName}},</p><p>I noticed {{companyName}} is scaling fast. Would love to share how we helped similar teams cut outbound costs by 40%.</p>"
},
{
"type": "wait",
"order": 1,
"waitDays": 3
},
{
"type": "email",
"order": 2,
"subject": "Re: Quick question about {{companyName}}",
"body": "<p>Hey {{firstName}}, just bumping this up. Happy to send over a case study if that helps.</p>"
}
],
"schedule": {
"timezone": "America/Chicago",
"startTime": "08:30",
"endTime": "16:00",
"workingDays": [
1,
2,
3,
4,
5
],
"skipNationalHolidays": true
},
"settings": {
"trackOpens": true,
"trackClicks": true,
"includeUnsubscribeLink": false,
"cc": [
"sales-log@yourcompany.com"
],
"bcc": [
"crm-sync@yourcompany.com"
],
"stopOnReply": true,
"stopOnAutoReply": true,
"stopOnCompanyReply": true,
"skipDNC": true,
"dailySendLimit": 50,
"emailIntervalMinutes": 12,
"espMatchingMode": "auto",
"segCheckMode": "skip_providers",
"segSkipProviders": [
"proofpoint",
"mimecast"
],
"cnameTracking": {
"enabled": true,
"domain": "track.yourcompany.com"
},
"slackChannelId": "C04ABCDEF12",
"positiveRepliesOnlySlack": true,
"webhook": {
"enabled": true,
"url": "https://yourcompany.com/webhooks/sendkit",
"secret": "whsec_abc123xyz",
"events": [
"lead.replied",
"email.sent",
"lead.bounced"
]
},
"copyFatigueProtection": {
"enabled": true,
"autoRegenerate": true,
"autoResume": true
},
"variantOptimization": {
"enabled": true,
"minimumSendsPerVariant": 50,
"minimumDays": 5,
"optimizationMetric": "replyRate",
"keepMinimumVariants": 2
}
},
"mailboxTags": [
"outreach"
]
}`)
req, err := http.NewRequest("POST", "https://api.sendkit.ai/v1/campaigns", bytes.NewBuffer(data))
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-Api-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.sendkit.ai/v1/campaigns')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.new(uri)
request['Content-Type'] = 'application/json'
request['X-Api-Key'] = 'YOUR_API_KEY'
request.body = '{
"name": "Q2 Outbound - Decision Makers",
"sequence": [
{
"type": "email",
"order": 0,
"subject": "Quick question about {{companyName}}",
"body": "<p>Hi {{firstName}},</p><p>I noticed {{companyName}} is scaling fast. Would love to share how we helped similar teams cut outbound costs by 40%.</p>"
},
{
"type": "wait",
"order": 1,
"waitDays": 3
},
{
"type": "email",
"order": 2,
"subject": "Re: Quick question about {{companyName}}",
"body": "<p>Hey {{firstName}}, just bumping this up. Happy to send over a case study if that helps.</p>"
}
],
"schedule": {
"timezone": "America/Chicago",
"startTime": "08:30",
"endTime": "16:00",
"workingDays": [
1,
2,
3,
4,
5
],
"skipNationalHolidays": true
},
"settings": {
"trackOpens": true,
"trackClicks": true,
"includeUnsubscribeLink": false,
"cc": [
"sales-log@yourcompany.com"
],
"bcc": [
"crm-sync@yourcompany.com"
],
"stopOnReply": true,
"stopOnAutoReply": true,
"stopOnCompanyReply": true,
"skipDNC": true,
"dailySendLimit": 50,
"emailIntervalMinutes": 12,
"espMatchingMode": "auto",
"segCheckMode": "skip_providers",
"segSkipProviders": [
"proofpoint",
"mimecast"
],
"cnameTracking": {
"enabled": true,
"domain": "track.yourcompany.com"
},
"slackChannelId": "C04ABCDEF12",
"positiveRepliesOnlySlack": true,
"webhook": {
"enabled": true,
"url": "https://yourcompany.com/webhooks/sendkit",
"secret": "whsec_abc123xyz",
"events": [
"lead.replied",
"email.sent",
"lead.bounced"
]
},
"copyFatigueProtection": {
"enabled": true,
"autoRegenerate": true,
"autoResume": true
},
"variantOptimization": {
"enabled": true,
"minimumSendsPerVariant": 50,
"minimumDays": 5,
"optimizationMetric": "replyRate",
"keepMinimumVariants": 2
}
},
"mailboxTags": [
"outreach"
]
}'
response = http.request(request)
puts response.body
{
"success": true,
"data": {
"_id": "665a1b2c3d4e5f6a7b8c9d0e",
"name": "Q1 Outreach Campaign",
"userId": "664f0a1b2c3d4e5f6a7b8c9d",
"workspaceId": "664f0a1b2c3d4e5f6a7b8c9e",
"status": "draft",
"mailboxes": [
"665b1c2d3e4f5a6b7c8d9e0f"
],
"sequence": [
{
"type": "email",
"name": "Initial Email",
"order": 0,
"subject": "Quick question, {{firstName}}",
"body": "<p>Hi {{firstName}},</p><p>I noticed {{company}} is growing fast...</p>"
},
{
"type": "wait",
"name": "Wait 3 days",
"order": 1,
"waitDays": 3
},
{
"type": "email",
"name": "Follow-up",
"order": 2,
"subject": "Re: Quick question",
"body": "<p>Just following up on my last email...</p>"
}
],
"sendingSchedule": {
"timezone": "America/New_York",
"startTime": "09:00",
"endTime": "17:00",
"workingDays": [
1,
2,
3,
4,
5
]
},
"trackOpens": true,
"trackClicks": true,
"stopOnReply": true,
"stats": {
"sent": 0,
"delivered": 0,
"opened": 0,
"clicked": 0,
"replied": 0,
"bounced": 0,
"unsubscribed": 0
},
"createdAt": "2025-06-10T10:30:00.000Z",
"updatedAt": "2025-06-10T10:30:00.000Z"
}
}
/v1/campaigns
Target server for requests. Edit to use your own host.
Platform API key (sk_user_...) or Workspace API key (sk_...)
The media type of the request body
Campaign name
Email sequence steps
Optional list of subsequences (nested follow-up flows). Each subsequence
fires when a lead's AI tag matches (trigger.type='ai_tag') or when the
lead first replies (trigger.type='reply').
Validation rules (mirrors the dashboard sequence builder): max 15 active
(non-archived) subsequences per campaign; at most one active subsequence
may have trigger.type='reply'; active ai_tag-trigger values must be
unique across subsequences (case-insensitive); the inner sequence
follows the same email/wait rules as the main campaign sequence, except
the first step MAY be a wait (subsequence emails can be sent as
in-thread replies after a delay); trigger is immutable once a subsequence
has sent any emails (addedCount > 0 or stats.sent > 0) — archive and
recreate to change.
Sending schedule configuration
Campaign tracking, sending, and deliverability settings
Mailbox IDs (legacy field)
Mailbox IDs to use for sending
Resolve mailboxes by email address
Use all mailboxes matching any of these tags
Use all mailboxes with this provider
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Platform API key (sk_user_...) or Workspace API key (sk_...)
Body
Campaign name
Email sequence steps
Optional list of subsequences (nested follow-up flows). Each subsequence
fires when a lead's AI tag matches (trigger.type='ai_tag') or when the
lead first replies (trigger.type='reply').
Validation rules (mirrors the dashboard sequence builder): max 15 active
(non-archived) subsequences per campaign; at most one active subsequence
may have trigger.type='reply'; active ai_tag-trigger values must be
unique across subsequences (case-insensitive); the inner sequence
follows the same email/wait rules as the main campaign sequence, except
the first step MAY be a wait (subsequence emails can be sent as
in-thread replies after a delay); trigger is immutable once a subsequence
has sent any emails (addedCount \\> 0 or stats.sent \\> 0) — archive and
recreate to change.
Sending schedule configuration
Campaign tracking, sending, and deliverability settings
Mailbox IDs (legacy field)
Mailbox IDs to use for sending
Resolve mailboxes by email address
Use all mailboxes matching any of these tags
Use all mailboxes with this provider