Skip to main content
POST
/
v2
/
call
/
campaign
Create Campaign (v2)
curl --request POST \
  --url https://api.callkaro.ai/v2/call/campaign \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "name": "Inspection Campaign"
}
'
{
  "batch_id": "68433b7b0dee98e59245ebab",
  "message": "Campaign created successfully",
  "status": "success"
}
Create a campaign without specifying an agent ID. This allows you to use different agents for different calls within the same campaign.

Quick Example

curl -X POST https://api.callkaro.ai/v2/call/campaign \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: your_api_key_here" \
  -d '{
    "name": "Multi-Agent Campaign"
  }'

Workflow

1

Create the campaign (no agent ID required)

curl -X POST https://api.callkaro.ai/v2/call/campaign \
  -H "X-API-KEY: your_api_key_here" \
  -d '{
    "name": "Inspection Campaign"
  }'
Response:
{
  "batch_id": "68433b7b0dee98e59245ebab",
  "message": "Campaign created successfully",
  "status": "success"
}
2

Add calls with any agent

Use different agents for each call:
# Call 1 - Agent A
curl -X POST https://api.callkaro.ai/call/outbound \
  -H "X-API-KEY: your_api_key_here" \
  -d '{
    "to_number": "+919876543210",
    "batch_id": "68433b7b0dee98e59245ebab",
    "agent_id": "agent_sales_id",
    "metadata": {"name": "Customer 1"}
  }'

# Call 2 - Agent B
curl -X POST https://api.callkaro.ai/call/outbound \
  -H "X-API-KEY": your_api_key_here" \
  -d '{
    "to_number": "+919876543211",
    "batch_id": "68433b7b0dee98e59245ebab",
    "agent_id": "agent_support_id",
    "metadata": {"name": "Customer 2"}
  }'
3

Monitor in dashboard

Track campaign performance at /dashboard/batch-calls/{batch_id}

When to Use v2

Use Campaign v2 when:
  • ✅ You want to use different agents in the same campaign
  • ✅ You don’t have the agent ID ready when creating the campaign
  • ✅ You need maximum flexibility

v1 vs v2 Comparison

Featurev1 (POST /call/campaign)v2 (POST /v2/call/campaign)
Agent ID Required✅ Yes❌ No
Same Agent for All Calls✅ Yes❌ No - Can vary
FlexibilityLowerHigher
Use CaseSingle-agent campaignsMulti-agent or flexible campaigns
💡 Recommended: Use v2 for new integrations unless you specifically need all calls to share the same agent.

Response

Success (200 OK)

{
  "batch_id": "68433b7b0dee98e59245ebab",
  "message": "Campaign created successfully",
  "status": "success"
}
Save the batch_id - you’ll need it to add calls to this campaign!

Tips

Maximum flexibility: v2 gives you the freedom to assign any agent to any call within the campaign, making it ideal for complex workflows.
No upfront planning: Create campaigns first, assign agents later based on your business logic or customer needs.

Authorizations

X-API-KEY
string
header
required

Body

application/json
name
string
required

Campaign name for identification and organization

Required string length: 1 - 200
Example:

"Inspection Campaign"

Response

Campaign created successfully

batch_id
string

Unique identifier for the created campaign

Example:

"68433b7b0dee98e59245ebab"

message
string
Example:

"Campaign created successfully"

status
string
Example:

"success"