Skip to main content
POST
Create a campaign

Authorizations

X-Api-Key
string
header
required

Headers

X-Api-Key
string
required

Api key to pass as a X-Api-Key request header. You can get yours in your profile when authenticated in Starleads

Body

name
string
required

Name of the campaign

Minimum string length: 1
agentId
string
required

ID of the AI agent to associate with the campaign

Minimum string length: 1
phoneNumber
string | null

Outbound phone number. Required if the agent channel is Phone. Must belong to the company's phone number list

maxRetries
integer<int32> | null

Maximum number of call retries (default: 3, max: 4)

Required range: 1 <= x <= 4
delayBetweenRetries
number<double> | null

Delay between retries in hours (default: 2)

Required range: x >= 0.01
webhookUrl
string<uri> | null

Webhook URL to receive campaign events

timezone
string | null

Timezone identifier (default: "Europe/Paris")

schedule
object[] | null

Campaign schedule. Defaults to Monday-Friday 09:00-12:00 / 14:00-17:00 if not provided

Response

Created

Response returned after a campaign is successfully created

id
string | null

Unique identifier of the created campaign

name
string | null

Name of the campaign

agentId
string | null

ID of the AI agent associated with the campaign

phoneNumber
string | null

Outbound phone number (null for web agents)

maxRetries
integer<int32>

Maximum number of retry attempts (between 1 and 4)

delayBetweenRetries
number<double>

Delay between retry attempts in hours

webhookUrl
string | null

Webhook URL for campaign event notifications

country
string | null

Country code (always FR)

timezone
string | null

Timezone identifier (e.g. Europe/Paris)

schedule
object[] | null

Weekly schedule defining the calling time slots

isActive
boolean

Whether the campaign is active (always false at creation)