Campaigns
Start, pause or resume a campaign
Start, pause or resume dialing.
curl -X POST https://app.scalysis.com/api/v1/campaigns/42/control \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "action": "start" }'
{
"success": true,
"action": "start_campaign",
"campaign_id": 42,
"state": "running",
"message": "Campaign started"
}
{
"success": false,
"error": "0 free only. Total: 10",
"error_code": "CONCURRENCY_POOL_EXHAUSTED",
"pool_free": 0,
"pool_limit": 10
}
number
required
The
campaign_id from Create a campaign.string
required
start, pause or resume.| Action | Effect |
|---|---|
start | Begin dialing a new campaign. |
pause | Stop placing new calls. Live calls finish. |
resume | Continue where it stopped. |
curl -X POST https://app.scalysis.com/api/v1/campaigns/42/control \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "action": "start" }'
{
"success": true,
"action": "start_campaign",
"campaign_id": 42,
"state": "running",
"message": "Campaign started"
}
{
"success": false,
"error": "0 free only. Total: 10",
"error_code": "CONCURRENCY_POOL_EXHAUSTED",
"pool_free": 0,
"pool_limit": 10
}
Errors
| Status | Why |
|---|---|
400 CONCURRENCY_POOL_EXHAUSTED | No free lines. Pause another campaign first. |
400 | action is not start, pause or resume, or the move is not allowed from the current state. |
404 | Campaign not found in your account. |
⌘I
curl -X POST https://app.scalysis.com/api/v1/campaigns/42/control \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "action": "start" }'
{
"success": true,
"action": "start_campaign",
"campaign_id": 42,
"state": "running",
"message": "Campaign started"
}
{
"success": false,
"error": "0 free only. Total: 10",
"error_code": "CONCURRENCY_POOL_EXHAUSTED",
"pool_free": 0,
"pool_limit": 10
}

