Accept a CSV upload and queue it for asynchronous processing.
Previously this endpoint parsed and inserted contacts inline, which on a
10k-row CSV would block the FastAPI worker for 30+ seconds and time out
most reverse proxies. Now the route persists the upload as a
CampaignDataImport row, dispatches a Celery task, and returns 202.
The client polls GET /campaigns/{id}/imports/{import_id} for status.
Bulk import contacts from a CSV file into a campaign. The endpoint validates phone numbers, detects duplicates, and maps columns to contact fields.Documentation Index
Fetch the complete documentation index at: https://docs.burki.dev/llms.txt
Use this file to discover all available pages before exploring further.
campaign_id (integer, required): The unique identifier of the campaignmultipart/form-data with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
file | file | Yes | CSV file with contacts |
column_mappings | string | No | JSON string mapping CSV columns to fields |
| Input Format | Normalized Output |
|---|---|
5551234567 | +15551234567 |
1-555-123-4567 | +15551234567 |
(555) 123-4567 | +15551234567 |
+15551234567 | +15551234567 |
| CSV Column Names | Maps To |
|---|---|
| phone, phone_number, mobile, cell | phone_number |
| name, full_name, contact_name | name |
| email, email_address | email |
| company, organization | company |
| Field | Description |
|---|---|
success | Whether import succeeded |
message | Human-readable status |
imported_count | Number of contacts imported |
total_contacts | Total contacts in campaign after import |
file_name | Original filename |
import_date | Import timestamp |
| Status Code | Description |
|---|---|
| 400 | Invalid file format or empty file |
| 404 | Campaign not found |
| 500 | Import processing failed |