Lead Upload and Execution

Submit phone numbers, per-lead metadata, retry policy and dialling schedule to a configured campaign. For large files use the bulk CSV upload instead.

Choosing an endpoint

EndpointNumbers per requestTypical use
POST /v6/leadExactly oneReal-time single-number triggers, click-to-call, flow testing.
POST /v3/leadMultiple under one leadNameMicro-batches and API-driven campaign feeds.
POST /lead legacyFewer than tenExisting integrations only.
POST https://<host>/api/v1/astrixdispatcher/v6/lead?isDND=false

isDND

NameTypeRequiredDescription
isDNDbooleanrequiredfalse dials every number as submitted. true screens each number against the DND registry and suppresses registered numbers.

Request parameters

NameTypeRequiredDescription
ukeystringrequiredUser authentication key.
campaignIdintegerrequiredCampaign into which the data is uploaded.
leadNamestringrequiredName of the lead set. Unique within the campaign when creating a new set.
leadIdintegerconditionalRequired only when appending to an existing lead set. Omit when creating a new one.
countofNumbersintegeroptionalDeclared count, for reconciliation against totalRecords. Note the lower-case of.
phoneNumberDetailsarrayrequiredArray of lead objects, one per phone number.

Example body fields

The samples also send these fields. They appear in the cURL and Python examples in the source documentation.

NameTypeDescription
userIdintegerPresent in the sample request body (for example 267).
retryInfoobjectRetry policy object. See Retry configuration and the nested fields below.
cliobjectCLI map in the sample, for example { "S1": "1725617007" }. Assigned on the first request for the life of the lead set.

retryInfo

NameTypeDescription
retryTypestringC (round robin) or R (time based). Upper case, single character.
retryOnFailintegerShown as 3 in the cURL sample.
retryTimeOnFailintegerShown as 0 in the cURL sample. Interval fields are required when retryType is R.
retryOnNoAnsintegerShown as 3 in the cURL sample.
noOfRetryintegerShown as 3 in the samples. Total attempts equal leads × (1 + noOfRetry).

phoneNumberDetails[]

NameTypeDescription
phoneNumberstringDestination number for the lead (for example 7428193932).
customerInfoobjectPer-lead metadata. Sample keys: Amount, CustName, DueDate.

Retry configuration

All counters default to 0, meaning no retry.

TypeBehaviourInterval fields
C — round robinCompletes a full pass over the lead set, then begins the next retry pass. Retries are spaced by lead set size.Ignored
R — time basedA number becomes eligible only after the interval for its disposition has elapsed.Required

Examples

cURL

curl --location 'https://<host>/api/v1/astrixdispatcher/v6/lead?isDND=false' \
--header 'Content-Type: application/json' \
--data '{
  "leadName": "test",
  "campaignId": 1165,
  "userId": 267,
  "ukey": "YOUR_UKEY",
  "retryInfo": {
    "retryType": "R",
    "retryOnFail": 3,  "retryTimeOnFail": 0,
    "retryOnNoAns": 3, "noOfRetry": 3
  },
  "cli": { "S1": "1725617007" },
  "phoneNumberDetails": [
    {
      "phoneNumber": "7428193932",
      "customerInfo": {
        "Amount": "23424",
        "CustName": "Veer",
        "DueDate": "04/11/2025"
      }
    }
  ]
}'

Python

import requests

HOST = "https://<host>"
UKEY = os.environ["FONADA_UKEY"]  # never hard-code

payload = {
    "leadName": "test",
    "campaignId": 1165,
    "userId": 267,
    "ukey": UKEY,
    "retryInfo": {"retryType": "R", "noOfRetry": 3},
    "phoneNumberDetails": [{
        "phoneNumber": "7428193932",
        "customerInfo": {"CustName": "Veer", "Amount": "23424"},
    }],
}

r = requests.post(
    f"{HOST}/api/v1/astrixdispatcher/v6/lead",
    params={"isDND": "false"}, json=payload, timeout=60,
)
r.raise_for_status()
lead_id = r.json()["message"]["leadId"]

Response

{
  "Status": "200 OK",
  "message": {
    "leadId": 2296,
    "leadName": "test",
    "fileName": null,
    "totalRecords": 1,
    "uploadDtm": "30/08/2025 16:54:08"
  }
}

Response fields

FieldExampleDescription
Status200 OKTop-level status string in the sample response.
message.leadId2296Lead set identifier returned after upload.
message.leadNametestEcho of the submitted lead name.
message.fileNamenullFile name when applicable; null in the JSON sample.
message.totalRecords1Count of records accepted.
message.uploadDtm30/08/2025 16:54:08Upload timestamp from the sample.

Related: Conventions · Voice Bot · CDR Reference