> ## Documentation Index
> Fetch the complete documentation index at: https://dialnexa.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Add a Lead

> Add a single lead to an existing campaign.

<Warning>
  **Legacy endpoint - deprecated.** Unversioned endpoints are scheduled for removal on **July 31, 2026**. A public v1 replacement is not currently listed in the v1 reference. This endpoint remains available for existing integrations until then.
</Warning>

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}}`:

```json theme={null}
{
  "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](/docs/api-reference/campaign-leads/upload) with a CSV or XLSX file instead.


## OpenAPI

````yaml POST /campaigns-leads
openapi: 3.0.0
info:
  title: DialNexa API
  description: >-
    Public REST API for the DialNexa voice AI platform. Versioned endpoints are
    under /v1; unversioned endpoints are legacy and deprecated.
  version: 1.0.0
servers:
  - url: https://api.dialnexa.com
    description: DialNexa production API
security:
  - bearer: []
tags:
  - name: API Keys
  - name: Agent Functions
  - name: Agents V1
  - name: Agents2
  - name: Batch Calls
  - name: Batch Calls V1
  - name: Call Logs
  - name: Calls
  - name: Calls V1
  - name: Campaign Leads
  - name: Campaigns
  - name: External Webhooks
  - name: Knowledge Base
  - name: Knowledge Base V1
  - name: LLMs
  - name: LLMs V1
  - name: Languages
  - name: Languages V1
  - name: Organization Phone Numbers
  - name: Organization Phone Numbers V1
  - name: Phone Number Pricing
  - name: Phone Number Pricing V1
  - name: Transcribers
  - name: Transcribers V1
  - name: User Webhooks
  - name: User Webhooks V1
  - name: V1
  - name: Voices
  - name: Voices V1
  - name: Webcall
  - name: Workflow Leads
  - name: Workflow Leads V1
  - name: Workflows
  - name: Workflows V1
paths:
  /campaigns-leads:
    post:
      tags:
        - Campaign Leads
      summary: Create a new lead for a specific campaign
      description: >-
        **Legacy endpoint - deprecated, scheduled for removal on July 31,
        2026.** Use the `/v1` version for new integrations. 
      operationId: CampaignsLeadsController_create
      parameters:
        - name: campaignId
          required: true
          in: path
          description: ID of the campaign
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCampaignLeadDto'
      responses:
        '201':
          description: Lead created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignLead'
        '400':
          description: Bad request
        '500':
          description: Internal server error
      deprecated: true
components:
  schemas:
    CreateCampaignLeadDto:
      type: object
      properties:
        name:
          type: string
          example: John Doe
          description: Name of the lead
        phoneNumber:
          type: string
          example: 9876543210
          description: Phone number without country code
        countryCode:
          type: string
          example: '+91'
          description: Country code of the lead. Default is "+91".
        organisationId:
          type: string
          example: org_abc123xyz789
          description: Organisation ID to which the lead belongs (string of length 14)
        campaignId:
          type: string
          example: 5
          description: Campaign ID to which the lead is associated
        notes:
          type: object
          example:
            customer_id: '123'
            follow_up: true
            tags:
              - vip
              - renewal
          description: Optional notes JSON for the lead. Maximum 15 top-level keys.
      required:
        - name
        - phoneNumber
        - organisationId
        - campaignId
    CampaignLead:
      type: object
      properties:
        id:
          type: string
          example: lead_abc123
          description: Signed lead ID
      required:
        - id
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````