Skip to main content
Create a new campaign for automated outreach. The campaign starts in draft status and must be started separately.

Request Body

FieldTypeRequiredDescription
namestringYesCampaign name (1-200 characters)
descriptionstringNoCampaign description
campaign_typestringYesType: call, sms, or mixed
assistant_idintegerYesID of the assistant to use
welcome_message_templatestringNoTemplate for welcome message
agenda_templatestringNoTemplate for call agenda
end_call_message_templatestringNoTemplate for end call message
sms_message_templatestringNoTemplate for SMS content
fallback_valuesobjectNoFallback values for missing variables
max_attemptsintegerNoMax retry attempts (default: 3)
retry_delay_minutesintegerNoDelay between retries (default: 30)

Template Variables

Templates support Jinja2-style variables:
  • {{name}} - Contact’s name
  • {{company}} - Contact’s company
  • {{assistant_name}} - Your assistant’s name
  • Any custom field from imported contacts

Example Request

Request Body
{
  "name": "February Appointment Reminders",
  "description": "Reminder calls for February appointments",
  "campaign_type": "call",
  "assistant_id": 123,
  "welcome_message_template": "Hi {{name|title_case}}, this is {{assistant_name}} calling from {{company}}.",
  "agenda_template": "I'm calling to remind you about your appointment on {{appointment_date}}.",
  "end_call_message_template": "Thank you for your time, {{name}}. Have a great day!",
  "fallback_values": {
    "name": "there",
    "company": "our office"
  },
  "max_attempts": 3,
  "retry_delay_minutes": 60
}

Response

Response
{
  "id": 42,
  "name": "February Appointment Reminders",
  "description": "Reminder calls for February appointments",
  "campaign_type": "call",
  "status": "draft",
  "assistant_id": 123,
  "welcome_message_template": "Hi {{name|title_case}}, this is {{assistant_name}} calling from {{company}}.",
  "agenda_template": "I'm calling to remind you about your appointment on {{appointment_date}}.",
  "end_call_message_template": "Thank you for your time, {{name}}. Have a great day!",
  "sms_message_template": null,
  "fallback_values": {
    "name": "there",
    "company": "our office"
  },
  "variable_mappings": {},
  "available_variables": [],
  "max_attempts": 3,
  "retry_delay_minutes": 60,
  "total_contacts": 0,
  "completed_contacts": 0,
  "failed_contacts": 0,
  "created_at": "2024-02-01T10:00:00Z",
  "updated_at": "2024-02-01T10:00:00Z"
}

Example Code

cURL
curl -X POST "https://api.burki.dev/api/v1/campaigns" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "February Appointment Reminders",
    "campaign_type": "call",
    "assistant_id": 123,
    "welcome_message_template": "Hi {{name}}, this is {{assistant_name}}."
  }'
Python
import requests

response = requests.post(
    "https://api.burki.dev/api/v1/campaigns",
    headers={"Authorization": "Bearer YOUR_API_KEY"},
    json={
        "name": "February Appointment Reminders",
        "campaign_type": "call",
        "assistant_id": 123,
        "welcome_message_template": "Hi {{name}}, this is {{assistant_name}}."
    }
)

campaign = response.json()
print(f"Created campaign ID: {campaign['id']}")
JavaScript
const response = await fetch("https://api.burki.dev/api/v1/campaigns", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    name: "February Appointment Reminders",
    campaign_type: "call",
    assistant_id: 123,
    welcome_message_template: "Hi {{name}}, this is {{assistant_name}}."
  })
});

const campaign = await response.json();
console.log(`Created campaign ID: ${campaign.id}`);

Next Steps

After creating a campaign:
  1. Import contacts using the import-data endpoint
  2. Configure scheduling using the schedule endpoint
  3. Start the campaign using the start endpoint