Campaigns
Create a campaign
Upload a list to call with one agent.
curl -X POST https://app.scalysis.com/api/v1/campaigns \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scriptId": 2207,
"name": "July confirmations",
"maxConcurrency": 5,
"contacts": [
{ "customerPhone": "9149874123", "customerName": "Rahul", "orderNumber": "ORD-1001" },
{ "customerPhone": "9876543210", "customerName": "Priya", "orderNumber": "ORD-1002" }
]
}'
curl -X POST https://app.scalysis.com/api/v1/campaigns \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scriptId": 2207,
"csvText": "phone_number,customer_name,brand_name\n9149874123,Rahul,Acme\n9876543210,Priya,Acme",
"contextColumnHeaders": ["customer_name", "brand_name"]
}'
{
"success": true,
"action": "create_campaign",
"campaign_id": 42,
"name": "July confirmations",
"state": "not_started",
"contact_count": 2,
"started": false,
"message": "Campaign created (paused until start)"
}
Creates a campaign. It does not dial until you start it, unless
startImmediately is true.
Body
number
required
Agent ID used for every call.
array
string
The list as CSV text. Use this when your agent needs other variables, like
brand_name.string
default:"phone_number"
CSV column with the phone numbers.
string[]
CSV columns the agent can read. Names must match the agent’s variables.
string
Campaign name in the dashboard.
number
default:"1"
Calls at the same time. Above your account limit returns
400.boolean
default:"false"
Start dialing as soon as it is created.
curl -X POST https://app.scalysis.com/api/v1/campaigns \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scriptId": 2207,
"name": "July confirmations",
"maxConcurrency": 5,
"contacts": [
{ "customerPhone": "9149874123", "customerName": "Rahul", "orderNumber": "ORD-1001" },
{ "customerPhone": "9876543210", "customerName": "Priya", "orderNumber": "ORD-1002" }
]
}'
curl -X POST https://app.scalysis.com/api/v1/campaigns \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scriptId": 2207,
"csvText": "phone_number,customer_name,brand_name\n9149874123,Rahul,Acme\n9876543210,Priya,Acme",
"contextColumnHeaders": ["customer_name", "brand_name"]
}'
{
"success": true,
"action": "create_campaign",
"campaign_id": 42,
"name": "July confirmations",
"state": "not_started",
"contact_count": 2,
"started": false,
"message": "Campaign created (paused until start)"
}
Response
number
Save this. Use it to start, pause and resume.
number
Contacts accepted. Rows missing an agent variable are skipped, so compare this with your list.
string
not_started, or running if startImmediately was true.⌘I
curl -X POST https://app.scalysis.com/api/v1/campaigns \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scriptId": 2207,
"name": "July confirmations",
"maxConcurrency": 5,
"contacts": [
{ "customerPhone": "9149874123", "customerName": "Rahul", "orderNumber": "ORD-1001" },
{ "customerPhone": "9876543210", "customerName": "Priya", "orderNumber": "ORD-1002" }
]
}'
curl -X POST https://app.scalysis.com/api/v1/campaigns \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"scriptId": 2207,
"csvText": "phone_number,customer_name,brand_name\n9149874123,Rahul,Acme\n9876543210,Priya,Acme",
"contextColumnHeaders": ["customer_name", "brand_name"]
}'
{
"success": true,
"action": "create_campaign",
"campaign_id": 42,
"name": "July confirmations",
"state": "not_started",
"contact_count": 2,
"started": false,
"message": "Campaign created (paused until start)"
}

