Skip to main content
POST
/
campaigns-leads
Add a lead to a campaign
curl --request POST \
  --url https://api.dialnexa.com/v1/campaigns-leads \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Priya Sharma",
  "phoneNumber": "9876543210",
  "campaignId": "cmp_xyz789",
  "countryCode": "+91",
  "notes": {
    "loan_amount": "250000",
    "product": "home_loan",
    "last_contact": "2024-01-15"
  }
}
'
{
  "id": "lead_abc123",
  "name": "Priya Sharma",
  "phone_number": "+919876543210",
  "campaign_id": "cmp_xyz789",
  "status": "completed",
  "notes": {
    "loan_amount": "250000",
    "product": "home_loan"
  },
  "call_log_id": "log_abc123",
  "created_at": "2024-03-01T10:00:00.000Z"
}
Adds one lead to a campaign. The lead will be queued for calling according to the campaign’s schedule and concurrency settings.

Dynamic variables via notes

Pass custom data in the notes object (up to 15 key-value pairs). These become dynamic variables available in the agent’s prompt via {{variable_name}}:
{
  "name": "Priya Sharma",
  "phoneNumber": "9876543210",
  "countryCode": "+91",
  "campaignId": "cmp_xyz789",
  "notes": {
    "loan_amount": "500000",
    "product": "home_loan",
    "last_contacted": "2024-01-10",
    "agent_name": "Rahul"
  }
}
In your agent prompt, reference these as {{loan_amount}}, {{product}}, etc. The agent receives a personalized briefing before every call.

Bulk upload

If you need to add hundreds or thousands of leads at once, use Bulk Upload with a CSV or XLSX file instead.

Request

curl "https://api.dialnexa.com/v1/campaigns-leads" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{...}'

Response

{
  "id": "lead_m4b7zx9nq2pw",
  "campaign_id": "cmp_5tw8vz2rnx1q",
  "phone_number": "+919876543210",
  "metadata": { "customer_name": "Priya Sharma", "product": "home_loan" },
  "status": "pending",
  "created_at": "2024-05-01T09:05:00.000Z"
}

Authorizations

Authorization
string
header
required

Pass your API key as a Bearer token in the Authorization header.

Body

application/json
name
string
required
Example:

"Priya Sharma"

phoneNumber
string
required
Example:

"9876543210"

campaignId
string
required
Example:

"cmp_xyz789"

countryCode
string
default:+91
Example:

"+91"

notes
object

Up to 15 custom key-value pairs. These become dynamic variables in the agent prompt (e.g., {{loan_amount}}).

Example:
{
"loan_amount": "250000",
"product": "home_loan",
"last_contact": "2024-01-15"
}

Response

Lead added to campaign.

id
string
Example:

"lead_abc123"

name
string
Example:

"Priya Sharma"

phone_number
string
Example:

"+919876543210"

campaign_id
string
Example:

"cmp_xyz789"

status
string
Example:

"completed"

notes
object
Example:
{
"loan_amount": "250000",
"product": "home_loan"
}
call_log_id
string | null
Example:

"log_abc123"

created_at
string<date-time>
Example:

"2024-03-01T10:00:00.000Z"