POST
/
api
/
v1
/
campaigns
curl -X POST https://api.ravan.ai/api/v1/campaigns/ \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Q2 Outbound Blitz",
    "agent_id": "019d1fdb-98e9-7c87-86c7-321e2fa98733",
    "phone_number_id": "019d2a1b-4c5e-7f8a-9b0c-1d2e3f4a5b6c",
    "from_phone_number": "+919876543210",
    "contact_ids": ["019d3a2b-5c6d-7e8f-9a0b-1c2d3e4f5a6b", "019d3a2b-6d7e-8f9a-0b1c-2d3e4f5a6b7c"],
    "schedule": {
      "window_start": "09:00",
      "window_end": "18:00",
      "window_days": [1,2,3,4,5],
      "timezone": "Asia/Kolkata",
      "max_concurrent": 5,
      "retry_attempts": 3,
      "retry_gap_min": 30
    }
  }'
{
  "success": true,
  "message": "Campaign created successfully",
  "data": {
    "id": "019d5b4c-8d9e-0f1a-2b3c-4d5e6f7a8b9c",
    "organization_id": "1268c1f0-19f3-47db-aefb-c16a7c3ace6e",
    "name": "Q2 Outbound Blitz",
    "agent_id": "019d1fdb-98e9-7c87-86c7-321e2fa98733",
    "phone_number_id": "019d2a1b-4c5e-7f8a-9b0c-1d2e3f4a5b6c",
    "from_phone_number": "+919876543210",
    "status": "draft",
    "execution_status": "idle",
    "schedule": {
      "window_start": "09:00",
      "window_end": "18:00",
      "window_days": [1,2,3,4,5],
      "timezone": "Asia/Kolkata",
      "max_concurrent": 5,
      "retry_attempts": 3,
      "retry_gap_min": 30
    },
    "contact_stats": {
      "total": 2, "contacted": 0, "successful": 0,
      "failed": 0, "no_answer": 0, "pending": 2, "in_progress": 0
    },
    "started_at": null,
    "completed_at": null,
    "created_at": "2026-03-20T14:30:00Z",
    "updated_at": "2026-03-20T14:30:00Z"
  }
}

Authorizations

X-Api-Key
string
required
Your Agni API key.

Body

name
string
required
Campaign name (e.g. "Q2 Outbound Blitz").
agent_id
string
required
UUID of the AI agent that will handle calls for this campaign.
phone_number_id
string
required
UUID of the phone number to use as the outbound line.
from_phone_number
string
required
Caller ID in E.164 format (e.g. +919876543210). Must match the phone number.
contact_ids
string[]
required
Array of contact UUIDs to include in the campaign.
schedule
object
Optional scheduling configuration.

Response

success
boolean
Whether the request succeeded.
message
string
Human-readable status message.
data
object
The created campaign object.
curl -X POST https://api.ravan.ai/api/v1/campaigns/ \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Q2 Outbound Blitz",
    "agent_id": "019d1fdb-98e9-7c87-86c7-321e2fa98733",
    "phone_number_id": "019d2a1b-4c5e-7f8a-9b0c-1d2e3f4a5b6c",
    "from_phone_number": "+919876543210",
    "contact_ids": ["019d3a2b-5c6d-7e8f-9a0b-1c2d3e4f5a6b", "019d3a2b-6d7e-8f9a-0b1c-2d3e4f5a6b7c"],
    "schedule": {
      "window_start": "09:00",
      "window_end": "18:00",
      "window_days": [1,2,3,4,5],
      "timezone": "Asia/Kolkata",
      "max_concurrent": 5,
      "retry_attempts": 3,
      "retry_gap_min": 30
    }
  }'
{
  "success": true,
  "message": "Campaign created successfully",
  "data": {
    "id": "019d5b4c-8d9e-0f1a-2b3c-4d5e6f7a8b9c",
    "organization_id": "1268c1f0-19f3-47db-aefb-c16a7c3ace6e",
    "name": "Q2 Outbound Blitz",
    "agent_id": "019d1fdb-98e9-7c87-86c7-321e2fa98733",
    "phone_number_id": "019d2a1b-4c5e-7f8a-9b0c-1d2e3f4a5b6c",
    "from_phone_number": "+919876543210",
    "status": "draft",
    "execution_status": "idle",
    "schedule": {
      "window_start": "09:00",
      "window_end": "18:00",
      "window_days": [1,2,3,4,5],
      "timezone": "Asia/Kolkata",
      "max_concurrent": 5,
      "retry_attempts": 3,
      "retry_gap_min": 30
    },
    "contact_stats": {
      "total": 2, "contacted": 0, "successful": 0,
      "failed": 0, "no_answer": 0, "pending": 2, "in_progress": 0
    },
    "started_at": null,
    "completed_at": null,
    "created_at": "2026-03-20T14:30:00Z",
    "updated_at": "2026-03-20T14:30:00Z"
  }
}

Authorizations

X-Api-Key
string
header
required

Body

application/json
name
string
required
agent_id
string
required
phone_number_id
string
required
from_phone_number
string
required
contact_ids
string[]
required
schedule
object

Response

Successful response

success
boolean
message
string
data
object