Skip to main content
POST
Create Campaign
Before creating a campaign, upload your contacts CSV to get a source_url. Set telephony_configuration_id to pin the campaign to a specific telephony configuration. If omitted, Bananaflow falls back to the organization’s default outbound configuration – supplying an id that doesn’t exist in your organization returns 400 telephony_configuration_not_found. The time_slots field controls when Bananaflow is allowed to place calls. If omitted, calls can be placed at any time. The timezone field applies to all time slot windows.
Once created, the campaign is in draft status. Call Start to begin dialing. To split calls between agents or versions, send traffic_split instead of workflow_id:
You can specify one to five unique agent/version pairs. Weights must be whole percentages from 1 to 100 and total 100. All agents must belong to your organization, and your CSV must supply the template variables required by every selected version. Omit workflow_definition_id or set it to null to use the latest published version at dial time. A definition ID pins a published or archived version; drafts cannot be selected. Calls already in progress keep their version. You can change the split with PATCH /api/v1/campaign/{campaign_id} while a campaign is running or paused. Changes apply to the next batch, including retries. A contact stays on the same variant while the split is unchanged; changing weights or removing variants can move contacts. Reordering existing variants alone does not change allocation. Redial campaigns inherit the current split and its allocation seed. The campaign detail page shows current target percentages and actual shares across all attempts, including retries and earlier splits. Shares are approximate, especially with small contact lists. GET /api/v1/campaign/{campaign_id}/traffic-stats returns the same counts, outcomes, and versions used, including variants removed from the current split.

Headers

authorization
string | null
X-API-Key
string | null

Body

application/json
name
string
required
Required string length: 1 - 255
source_type
string
required
Pattern: ^csv$
source_id
string
required
workflow_id
integer | null
Required range: x > 0
traffic_split
TrafficSplitRequest · object | null
telephony_configuration_id
integer | null
retry_config
RetryConfigRequest · object | null
max_concurrency
integer | null
Required range: x >= 1
rate_limit_per_second
integer
default:1
Required range: x >= 1
schedule_config
ScheduleConfigRequest · object | null
circuit_breaker
CircuitBreakerConfigRequest · object | null

Response

Successful Response

id
integer
required
name
string
required
workflow_id
integer
required
workflow_name
string
required
state
string
required
source_type
string
required
source_id
string
required
total_rows
integer | null
required
processed_rows
integer
required
failed_rows
integer
required
created_at
string<date-time>
required
started_at
string<date-time> | null
required
completed_at
string<date-time> | null
required
retry_config
RetryConfigResponse · object
required
traffic_split
TrafficSplitResponse · object | null
max_concurrency
integer | null
rate_limit_per_second
integer
default:1
schedule_config
ScheduleConfigResponse · object | null
circuit_breaker
CircuitBreakerConfigResponse · object | null
executed_count
integer
default:0
total_queued_count
integer
default:0
parent_campaign_id
integer | null
redialed_campaign_id
integer | null
telephony_configuration_id
integer | null
telephony_configuration_name
string | null
logs
CampaignLogEntryResponse · object[]
warnings
string[]