Agentic - Campaign Leads

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.

post/api/v1/agentic/campaign-leads

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

x-api-keystring required

Your API key for authentication. Required for all endpoints.

x-company-idstring

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

campaignIdstring required

ID of the campaign this lead belongs to

phoneNumberstring

Phone number for the lead contact

emailstring

Email address for the lead contact (will be set to null if invalid)

sipTrunkIdstring

SIP trunk to use for this lead. Get IDs from POST /phones/sip-trunks/query. Falls back to the campaign sipTrunkIds when omitted.

callerIdstring

Caller ID (e.g. phone number or SIP identity) displayed to the lead when outbound calls are placed — overrides the SIP trunk default

prefixstring

Prefix to use for the lead

status'pending' | 'running' | 'successful' | 'cancelled' | 'scheduled' | 'paused' | 'reachedMaxRetries' | 'failed' | 'askedToCallBackLater' | 'askedToNeverCallAgain' required

Current status of the campaign lead

statusUpdatedAtstring date-time

ISO 8601 date string

nextActionAtstring date-time

ISO 8601 date string

currentFollowUpCountnumber

Number of follow-up attempts made

currentStagestring

Last campaign stage assigned after an attempt

preferredChannel'email' | 'phone' | 'sms'

Preferred communication channel for this lead

timeZonestring

IANA time zone, e.g. Europe/Athens

dynamicVariablesobject

Merge tags and dynamic variables for this lead

analysisResultsobject

Analysis results - AI-generated analysis data from call processing

contextForAistring

Free-text prompt booster for AI interactions

viewUrlstring

URL to view the lead in the campaign

assignedUserIdstring

Company user who last took this lead — later campaign dials and post-call work stay with this user

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

successboolean required
countnumber required
messagestring required

Changes

No recorded changes to this operation across all 2 revisions of this API.