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" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-d '{
"name": "Q1 Outreach Campaign",
"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>"
}
],
"schedule": {
"timezone": "America/New_York",
"startTime": "09:00",
"endTime": "17:00",
"workingDays": [
1,
2,
3,
4,
5
]
},
"settings": {
"trackOpens": true,
"trackClicks": true,
"stopOnReply": true,
"dailySendLimit": 50
},
"mailboxTags": [
"outreach"
]
}'
import requests
import json
url = "https://api.sendkit.ai/v1/campaigns"
headers = {
"Content-Type": "application/json",
"X-Api-Key": "YOUR_API_KEY",
"Authorization": "Bearer YOUR_API_TOKEN"
}
data = {
"name": "Q1 Outreach Campaign",
"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>"
}
],
"schedule": {
"timezone": "America/New_York",
"startTime": "09:00",
"endTime": "17:00",
"workingDays": [
1,
2,
3,
4,
5
]
},
"settings": {
"trackOpens": true,
"trackClicks": true,
"stopOnReply": true,
"dailySendLimit": 50
},
"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",
"Authorization": "Bearer YOUR_API_TOKEN"
},
body: JSON.stringify({
"name": "Q1 Outreach Campaign",
"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>"
}
],
"schedule": {
"timezone": "America/New_York",
"startTime": "09:00",
"endTime": "17:00",
"workingDays": [
1,
2,
3,
4,
5
]
},
"settings": {
"trackOpens": true,
"trackClicks": true,
"stopOnReply": true,
"dailySendLimit": 50
},
"mailboxTags": [
"outreach"
]
})
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
"bytes"
"encoding/json"
)
func main() {
data := []byte(`{
"name": "Q1 Outreach Campaign",
"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>"
}
],
"schedule": {
"timezone": "America/New_York",
"startTime": "09:00",
"endTime": "17:00",
"workingDays": [
1,
2,
3,
4,
5
]
},
"settings": {
"trackOpens": true,
"trackClicks": true,
"stopOnReply": true,
"dailySendLimit": 50
},
"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")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
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['Authorization'] = 'Bearer YOUR_API_TOKEN'
request.body = '{
"name": "Q1 Outreach Campaign",
"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>"
}
],
"schedule": {
"timezone": "America/New_York",
"startTime": "09:00",
"endTime": "17:00",
"workingDays": [
1,
2,
3,
4,
5
]
},
"settings": {
"trackOpens": true,
"trackClicks": true,
"stopOnReply": true,
"dailySendLimit": 50
},
"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
Platform API key (sk_user_...) or Workspace API key (sk_...)
The media type of the request body
Campaign name
Email sequence steps
Sending schedule configuration
Campaign tracking and sending 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_...)
Bearer token. API key as Bearer token
Body
Campaign name
Email sequence steps
Sending schedule configuration
Campaign tracking and sending 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
Responses
Last updated today
Built with Documentation.AI