POST
/
campaigns
/
create
cURL
curl --request POST \
  --url https://api.callab.ai/v1/campaigns/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "<string>",
  "notes": "<string>",
  "campaign_type": "<string>",
  "contacts_list_source": [
    "<string>"
  ],
  "contacts_list_tags": [
    "<string>"
  ],
  "contacts_list_categories": [
    "<string>"
  ],
  "contacts_list_source_metadata": {},
  "agent_variables_contact_metadata_mapping": {},
  "webhook_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "ai_agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "call_time_of_day_from": "<string>",
  "call_time_of_day_to": "<string>",
  "number_of_call_attempts": [
    123
  ],
  "retry_delay": [
    123
  ],
  "retry_delay_unit": [
    "<string>"
  ],
  "days_of_week": [
    123
  ],
  "time_zone": "<string>",
  "inbound_phone_number_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "outbound_phone_number_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "started_at": "2023-12-25",
  "ended_at": "2023-12-25",
  "webhook_mapping_variables": {},
  "webhook_mapping_variables_sources": {},
  "workspace": "<string>"
}'
{
  "status": "<string>",
  "message": "<string>",
  "data": "<string>"
}

Authorizations

Authorization
string
header
required

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

Body

application/json

The campaign to create.

Data for creating a new campaign.

name
string
required

Campaign name

notes
string
required

Additional notes about the campaign

campaign_type
string
required

Type of campaign (e.g., "outbound", "inbound")

ai_agent_id
string<uuid>
required

ID of the AI agent to use for calls

days_of_week
(integer | null)[]
required

Days of week to make calls (0=Sunday, 6=Saturday)

time_zone
string
required

Timezone for the campaign

workspace
string
required

Workspace ID

contacts_list_source
(string | null)[] | null

Source of contact list

contacts_list_tags
(string | null)[] | null

Tags for contact filtering

contacts_list_categories
(string | null)[] | null

Categories for contact filtering

contacts_list_source_metadata
object | null

Additional metadata for contact list source

agent_variables_contact_metadata_mapping
object | null

Mapping between agent variables and contact metadata

webhook_id
string<uuid> | null

ID of the webhook to use

call_time_of_day_from
string<time> | null

Start time for making calls (in campaign timezone)

call_time_of_day_to
string<time> | null

End time for making calls (in campaign timezone)

number_of_call_attempts
(integer | null)[] | null

Number of call attempts for each contact

retry_delay
(integer | null)[] | null

Delay between retry attempts

retry_delay_unit
(string | null)[] | null

Unit for retry delay (e.g., "minutes", "hours", "days")

inbound_phone_number_id
string<uuid> | null

ID of the phone number to use for inbound calls

outbound_phone_number_id
string<uuid> | null

ID of the phone number to use for outbound calls

started_at
string<date> | null

Campaign start date

ended_at
string<date> | null

Campaign end date

webhook_mapping_variables
object | null

Mapping of webhook variables

webhook_mapping_variables_sources
object | null

Sources for webhook variable mapping

Response

Campaign created successfully.

status
string
message
string
data
string

ID of the created campaign.