Skip to main content
This guide walks you through how to add your lead list to a campaign using the WhatTalk.ai API and start automated calls.

Overview

The entire process consists of 3 steps:
1

Create a campaign (or use an existing one)

Create a campaign from the dashboard or via the API.
2

Add leads to the campaign via API

Send an API request for each lead.
3

Start the campaign

Set the campaign status to “start” — the system begins calling automatically.
If your campaign is already “in-progress”, step 3 is not needed. Newly added leads are automatically queued for calling.

Prerequisites

Before you begin, make sure the following are ready:
  • API Key — Create one from Settings > API Keys in the dashboard
  • Campaign ID — Open your campaign in the dashboard and find the ID in the browser address bar. Example: app.whattalk.ai/campaigns/1050 → Your Campaign ID is 1050. Alternatively, you can create a new campaign via the API.
  • AI Assistant — An assistant assigned to the campaign, configured for outbound calls
  • Phone Number — A phone number assigned to the campaign

Authentication

All API requests use a Bearer token in the Authorization header:
Base URL: https://app.whattalk.ai/api

Step 1: Create a Campaign (Optional)

If you already have a campaign, skip to Step 2.
Note the campaign_id from the response — you’ll need it in the next step.
Newly created campaigns start in “draft” status. You must explicitly start the campaign for calls to begin (Step 3).

Step 2: Add Leads to the Campaign

Send a separate API request for each lead. Phone numbers must be in E.164 format (e.g., +905551234567).

Add a Single Lead

Successful Response

Bulk Lead Import (100 leads)

There is no bulk endpoint — send a request per lead. Here are loop examples in different languages:
The field names in variables must match the variable names in your assistant’s Prompt & Tools settings. For example, if your assistant uses {customer_name}, send "customer_name" in the API.

Step 3: Start the Campaign

After adding leads, start the campaign:

Start Campaign

Stop Campaign

To pause calls:

Campaign Statuses


Lead Statuses

While the campaign is running, each lead’s status is updated automatically:

FAQ

Yes. Leads added while the campaign is “in-progress” are automatically queued for calling. You don’t need to restart the campaign.
There is currently no bulk endpoint. You need to send a separate POST /user/lead request for each lead. This can be easily automated using the loop examples above.
E.164 format is required. It must start with + followed by the country code. Examples: +905551234567 (Turkey), +14155551234 (US).
No. You can manage leads and campaigns directly via the API. The automation platform is only needed for additional scenarios like CRM integration or post-call actions.
By default, duplicate numbers are blocked. To allow duplicates, use the "allow_dupplicate": true parameter.