Skip to main content
While you can use agent.call_phone("+1...") / agent.callPhone("+1...") to place singular outbound calls, we recommend using Campaigns when calling multiple contacts. Campaigns automatically manage missed-call retries, enforce calling windows, and control call concurrency. Since they are persistent resources, you should create one Campaign for each distinct use case and continue adding contacts to it as needed. While Campaigns are responsible for dispatching calls - you will still need to “attach” an Agent to handle the call itself - this is done using a unique “code” created for each Campaign.
Prefer to manage campaigns programmatically over HTTP? See the Campaigns API reference for the full set of REST endpoints — create, upload contacts, status, and more.

Before you start

You’ll need:

Create a campaign in the dashboard

Open the Campaigns page and click Create Campaign. Configure your campaign name, origin phone numbers, calling windows, and retry settings. Once created, take note of the campaign code — it starts with gcmp-....

Upload contacts

From the campaign’s detail page in the dashboard, upload your contact list. Each contact needs a phone number and any per-call data variables your agent will use (such as a patient name or appointment time). These variables will be accessible inside your agent callbacks via call.get_variable() / call.getVariable().

Write your agent

Define an Agent and attach callbacks for each stage of the call.

Test your agent

Before attaching to a campaign, test your agent using agent.call_local() or agent.chat(). Pass a variables dict to simulate per-contact data:
campaign.py

Attach and serve the campaign

Next, run agent.attach_campaign("gcmp-..."). This “attaches” your agent to the Campaign that we previously created.
campaign.py

Review calls in the dashboard

Once your campaign is running, visit the Campaigns page to monitor progress.