Add leads to a campaign for automated outbound calling
Upload one or more leads to a campaign. Each lead represents a contact that will be called by the AI agent. You can upload leads in bulk by providing an array of lead objects.
Required Fields:
- campaignId: ID of the campaign to add leads to
- phoneNumber OR email: At least one contact method is required
Optional Fields:
- sipTrunkId: SIP trunk for this lead (get from POST /phones/sip-trunks/query). Falls back to the campaign sipTrunkIds when omitted.
- status: Initial status (default: "pending")
- dynamicVariables: Merge tags for personalization (e.g., firstName, lastName, company)
- contextForAi: Additional context to help the AI agent during the call
- preferredChannel: Preferred communication channel (phone, email, sms)
- timeZone: Timezone for scheduling calls at appropriate times
- nextActionAt: Schedule the first call attempt for a specific time
Dynamic Variables: Dynamic variables are used for personalization in AI conversations. Common examples:
- firstName, lastName: For addressing the lead by name
- company: Company name for context
- productInterest: Specific product or service they're interested in
- lastInteraction: Notes from previous interactions
Example: send an array of leads, then activate the campaign so it starts dialing during its schedule.
Bulk Upload: Send the full list in one request. The server drops duplicate phones in the list, matches against existing campaign numbers (including additional numbers), then writes in batches.
Request
- Base URL: https://api.voicelogica.ai
- URL: https://api.voicelogica.ai/api/v1/agentic/campaign-leads
- Auth: API key in header x-api-key
Headers
Your API key for authentication. Required for all endpoints.
Optional company ID for resellers. When provided, the API request will operate on behalf of the specified subsidiary company. The API key must have access to the specified company.
Request body
Example request
[
{
"campaignId": "507f1f77bcf86cd799439011",
"phoneNumber": "+306912345678",
"email": "john.doe@example.com",
"sipTrunkId": "507f1f77bcf86cd799439015",
"status": "pending",
"dynamicVariables": {
"firstName": "John",
"lastName": "Doe",
"company": "Acme Corp",
"order_id": "ORD-123"
},
"contextForAi": "John requested a callback about order ORD-123. Prefers Greek.",
"nextActionAt": "2026-09-16T09:00:00.000Z"
},
{
"campaignId": "507f1f77bcf86cd799439011",
"phoneNumber": "+306987654321",
"email": "jane.smith@example.com",
"status": "pending",
"dynamicVariables": {
"firstName": "Jane",
"lastName": "Smith",
"quote_id": "Q-567"
},
"contextForAi": "Follow up on the quote sent last week."
}
]Response
Leads added successfully
Changes
No recorded changes to this operation across all 2 revisions of this API.