Create a new email campaign.
Creates a campaign in DRAFT status. Use the launch endpoint to start sending emails.
Args: request: Campaign creation request with steps configuration current_user: Authenticated user information service: Campaign service instance
Returns: Created campaign response
Documentation Index
Fetch the complete documentation index at: https://bavlio.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Request model for creating a campaign.
Campaign name
1 - 255Dataset containing leads
Campaign steps configuration
1 - 10 elementsCampaign description
1000Campaign type (email, linkedin, or mixed)
email, linkedin, mixed Bavimail alias IDs for sending (required for email campaigns)
Connected account ID (required for linkedin campaigns)
Launch type (immediate or scheduled)
immediate, scheduled Scheduled start date (required if launch_type=scheduled)
Max actions per day
1 <= x <= 10000Daily sending window start (UTC)
Daily sending window end (UTC)
Minimum seconds between actions
60 <= x <= 3600Timezone for sending window interpretation
Days of week to send (3-letter lowercase abbreviations)
Campaign-level personalization prompt override. When set, the email pipeline resolver uses this in preference to sender_data.custom_prompt. NULL = fall through to sender-level custom_prompt or DEFAULT.
100 - 5000Policy applied at scheduled launch time when the campaign uses AI personalization and the user never reviewed drafts in the playground. launch_default = regenerate at send; hold = pause + notify; cancel = revert to draft + notify.
launch_default, hold, cancel Successful Response
Response model for campaign.
Unique campaign identifier
Owner user ID
Associated dataset ID
Campaign name
Campaign type (email, linkedin, mixed)
Current campaign status
draft, launching, scheduled, active, draining, paused, completed, failed Launch type
immediate, scheduled Max actions per day
Daily sending window start
Daily sending window end
Min seconds between actions
Timezone for sending window
Steps configuration
Days of week to send
Creation timestamp
Last update timestamp
Campaign description
Scheduled start date
Bavimail alias IDs
Connected account for LinkedIn
Total leads in campaign
Leads not in pending/active status
ARQ job ID for background launch
When launch was requested
Error message if launch failed
Campaign-level personalization prompt override (migration 108).
Policy for scheduled launch without playground review (migration 108).
launch_default, hold, cancel Reason the campaign is paused, e.g. 'pending_personalization_review' (migration 108).
When the owner dismissed the playground discovery banner (migration 108).