Skip to main content
POST
cURL
Creates a new batch campaign by uploading a CSV of recipients. Returns HTTP 201 with a batch_id. The batch does not start calling until you call POST /batches/{batch_id}/schedule.

CSV format

  • contact_number is required — E.164 format
  • Any other column becomes a {variable} available in your agent’s prompt and welcome message
  • The per-call execution stores these columns in context_details.recipient_data

Example request

Use multipart/form-datanot JSON.
curl
Python (stdlib)
201 Response

Next step: schedule the batch

A created batch is idle until scheduled. Call POST /batches/{batch_id}/schedule with a scheduled_at timestamp:
Schedule request (form-data)
Use a numeric UTC offset like +00:00 — the Z suffix is rejected with a 500. The time must be at least 2 minutes in the future, and Bolna rounds the start up to the next 10-minute mark.
See the Batch Quickstart for a complete walk-through including scheduling and result retrieval.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
agent_id
string<uuid>
required

The ID of the agent

file
file
required

CSV file to upload

from_phone_numbers
string[]

List of phone numbers from which the batch calls will be made. Each number must include the country code in E.164 format. Pass multiple values to use multiple originating numbers.

Example:
retry_config
string

JSON string containing retry configuration for failed calls. See auto-retry documentation for details. Example - {"enabled":true,"max_retries":2,"retry_intervals_minutes":[15,30]}

webhook_url
string<uri>

URL that Bolna POSTs the batch payload to when the batch finishes processing, and again when all of its executions reach a terminal state. Use it to receive the batch's executions without polling. Must be a valid URL; an invalid value is ignored and no webhook is sent.

Example:

"https://your-server.com/batch-webhook"

Response

batch created response

batch_id
string<^[0-9a-fA-F]{32}$>
required

The ID of the batch

Example:

"3c90c3cc0d444b5088888dd25736052a"

state
enum<string>
required

Status of the request

Available options:
created