Skip to main content
Campaigns let you dial hundreds — or thousands — of contacts in a single operation without triggering each call individually. You define the contact list and script up front, then use the campaign control endpoint to start, pause, or resume dialing on demand. This guide walks you through creating a campaign with a contacts array or a raw CSV string, then managing its lifecycle from not_started all the way to completed.

Prerequisites

  • API key from your Scalysis dashboard.
  • Script ID for the AI script the campaign will use.
  • A list of customer phone numbers you want to dial.

1

Create the campaign

Send a POST request to /api/v1/campaigns with your script ID and contact list. You can supply contacts either as a structured JSON array or as a raw CSV string — pick whichever fits your workflow.

Option A — contacts array

Each object in contacts[] must include customerPhone. All other fields are optional but recommended.

Option B — CSV text

Pass your CSV data as a raw string in csvText. By default, Scalysis reads phone numbers from a column named phone_number; use phoneColumn to point to a different column header.
Request fields reference:
Set startImmediately: false when creating a campaign. This gives you time to review the contact count in the response before committing to a live dial run — especially useful for large lists where a CSV parsing issue could otherwise affect thousands of contacts.
Keep each campaign creation request to roughly 2,000 contacts or fewer. For larger lists, split them across multiple campaigns and stagger the start times.
2

Note the campaign_id from the response

A successful create request returns HTTP 200 with the following body:
3

Start the campaign

When you’re ready to begin dialing, send a control request with action: "start":
Expected response:
Scalysis will now begin dialing contacts in order, respecting any maxConcurrency limit you set.
4

Monitor or pause the campaign

If you need to stop dialing mid-run — for example, due to off-hours restrictions or an issue with your script — send a pause action:
Expected response:
Any calls already in progress will complete naturally. No new calls are placed while the campaign is paused.
5

Resume the campaign

Ready to continue? Send a resume action and Scalysis picks up where it left off:
Expected response:

Campaign states