Skip to main content
POST
/
campaigns
Create Campaign
curl --request POST \
  --url https://api.kejue.co/api/v1/campaigns \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "persona_id": "<string>",
  "voice_config_id": "<string>",
  "call_settings": {
    "allowed_days": [
      0,
      1,
      2,
      3,
      4
    ],
    "auto_retry": true,
    "call_end_hour": 17,
    "call_start_hour": 9,
    "phone_assignment_mode": "local",
    "retry_schedule": [
      60,
      240
    ],
    "scoring_criteria": "Score 0-100 based on buying intent",
    "structured_data_schema": [
      {
        "description": "Stated budget range",
        "key": "budget"
      },
      {
        "description": "Decision timeline",
        "key": "timeline"
      }
    ],
    "tags": [
      {
        "description": "Contact expressed buying interest",
        "name": "Interested"
      },
      {
        "description": "Contact requested a follow-up call",
        "name": "Follow-up"
      }
    ]
  },
  "metadata": {},
  "contact_ids": [
    "<string>"
  ],
  "priority": 50,
  "scheduled_start_at": "<string>",
  "auto_start": false
}
'
{
  "id": "<string>",
  "name": "<string>",
  "status": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "persona_id": "<string>",
  "contacts_added": 123,
  "scheduled_start_at": "<string>"
}

Authorizations

X-API-Key
string
header
required

Workspace API key (e.g. kej_live_...)

Body

application/json

Create a campaign (public API).

name
string
required
Required string length: 1 - 255
description
string | null
persona_id
string | null

Persona to use

voice_config_id
string | null

Voice agent (infers persona)

call_settings
CallSettingsInput · object

Call settings

Example:
{
"allowed_days": [0, 1, 2, 3, 4],
"auto_retry": true,
"call_end_hour": 17,
"call_start_hour": 9,
"phone_assignment_mode": "local",
"retry_schedule": [60, 240],
"scoring_criteria": "Score 0-100 based on buying intent",
"structured_data_schema": [
{
"description": "Stated budget range",
"key": "budget"
},
{
"description": "Decision timeline",
"key": "timeline"
}
],
"tags": [
{
"description": "Contact expressed buying interest",
"name": "Interested"
},
{
"description": "Contact requested a follow-up call",
"name": "Follow-up"
}
]
}
metadata
Metadata · object
contact_ids
string[] | null

Contact IDs to add (max 10,000)

Maximum array length: 10000
priority
integer
default:50

Queue priority

Required range: 1 <= x <= 100
scheduled_start_at
string | null

Naive datetime 'YYYY-MM-DDTHH:MM' per contact timezone

auto_start
boolean
default:false

Start immediately after adding contacts

Response

Successful Response

Response after creating a campaign via public API.

id
string
required
name
string
required
status
string
required
created_at
string<date-time>
required
persona_id
string | null
contacts_added
integer | null
scheduled_start_at
string | null