Skip to main content
POST
/
campaigns
Create a campaign
curl --request POST \
  --url https://api.vocobase.com/api/v2/campaigns \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Black Friday outreach",
  "description": "Outbound to VIP customers",
  "agent_id": "a1234567-abcd-1234-abcd-123456789012",
  "provider": "twilio",
  "concurrency_limit": 3
}
'
{
  "success": true,
  "data": {
    "campaign_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "<string>",
    "description": "<string>",
    "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "agent_name": "<string>",
    "provider": "mcube",
    "concurrency_limit": 5,
    "status": "draft",
    "total_contacts": 123,
    "completed_count": 123,
    "failed_count": 123,
    "skipped_count": 123,
    "started_at": "2023-11-07T05:31:56Z",
    "paused_at": "2023-11-07T05:31:56Z",
    "completed_at": "2023-11-07T05:31:56Z",
    "created_at": "2023-11-07T05:31:56Z"
  }
}

Authorizations

Authorization
string
header
required

API key in format: rg_live_xxxx. Pass as a Bearer token in the Authorization header.

Body

application/json
name
string
required

Human-readable campaign name.

agent_id
string<uuid>
required

Agent used for every call in this campaign.

provider
enum<string>
required

Telephony provider. Must be in allowed_telephony_providers and have credentials configured.

Available options:
mcube,
twilio,
exotel
description
string

Optional campaign description.

concurrency_limit
integer
default:1

Maximum concurrent active calls for this campaign. Clamped to 1-10.

Required range: 1 <= x <= 10

Response

Campaign created in draft status.

success
boolean
data
object