How to Submit a Lead via API

Leads

Single-Lead API Submission

For real-time integrations (web-form webhooks, CRM sync,
third-party lead vendors) submit leads individually to
POST /api/v1/leads. Each request creates or updates one
Lead.

Finding the Live API Docs in the App

In the left sidebar choose Leads -> Submit Leads. The
Submit Leads page (/leads/import_type) presents five
tiles: File Upload, Manual Test, Typeform Integration,
Instapage Guide, and API Usage. Clicking the API
Usage
tile opens the apipie reference at
/api/docs/1.0/leads_external/create.html, which lists
every parameter your deployment accepts along with
copy-ready curl examples scoped to your domain.

Request Format

The endpoint accepts form-encoded or JSON bodies.

Form-encoded example:

curl -X POST \
  "https://your-domain.com/api/v1/leads?lead_token=YOUR_TOKEN&caller_id=+18004506787&email=john@example.com&loan_amount=500"

JSON example:

curl -H "Content-Type: application/json" -X POST \
  -d '{
    "lead_token":"YOUR_TOKEN",
    "caller_id":"+18004506787",
    "data":{"email":"john@example.com","interest":"kittens"}
  }' \
  https://your-domain.com/api/v1/leads?lead_token=YOUR_TOKEN

Required Fields

  • lead_token: either a schedule lead token or an offer lead token. If neither matches, the request is rejected. You may also pass schedule_lead_token or offer_lead_token explicitly.
  • caller_id: the lead's phone number. The platform normalizes to E.164 automatically.

Documented Parameters

The following first-class params are accepted:
lead_token, caller_id, email,
contact_field_type, schedule_callback_at,
schedule_callback_in_seconds,
update_all_matching_leads, apply_to,
unblock_contact, blocked, assign_trackdrive_number,
assign_sms_number, expire_existing,
delete_existing, update_only, lead_priority,
restart_schedule, auto_format_nested_fields,
next_action_at, hours_to_expire,
max_contact_attempts, data.

Any keys outside a reserved list are captured as Lead
tokens, available for substitution in SMS templates,
call whispers, and webhook payloads. Reserved keys
include lead_token, offer_lead_token, data_json,
auth_token, update_only, etc.

Response Codes

  • 200 OK with a serialized Lead on success.
  • 422 Unprocessable Entity with validation errors if the lead fails to save.
  • 422 Unprocessable Entity if the lead_token does not resolve to a Schedule or Offer.

Browser-Side Submission with jQuery

Lead submission also works directly from a web page. The
request is an ordinary cross-origin POST, so jQuery's
$.ajax (or any fetch call) is sufficient:

$.ajax({
  url: "https://your-domain.com/api/v1/leads?lead_token=YOUR_TOKEN",
  method: "POST",
  data: {
    caller_id: "+17192221234",
    data: { loan_amount: "500" }
  }
});

This is the pattern used by TrackDrive's own in-app help
snippets. Place it inside the form's submit handler, or
fire it from a confirmation page after the visitor has
consented.

Traffic Source and Sub ID Attribution

Two optional parameters power click-level attribution:

  • traffic_source_id: the ID of a traffic source record configured on the company. This associates the lead with a specific acquisition channel for reporting.
  • sub_id: a free-form string that identifies a sub-publisher, affiliate, or creative within a single traffic source. Any opaque string works.

Example:

https://your-domain.com/api/v1/leads?lead_token=YOUR_TOKEN
  &caller_id=+17192223333
  &traffic_source_id=google_ads
  &sub_id=a1b2c3d

When the lead subsequently produces a call or conversion,
these tokens roll up into the source/sub-source breakdowns
on the reporting dashboards.

Full API Documentation

The live apipie docs are served at
/api/docs/1.0/leads_external/create.html on your
TrackDrive domain and reflect the exact fields your
deployment accepts.

Contact TrackDrive

Questions?

We're here to help. Reach out and a Voice Marketing Cloud Specialist will get back to you.

Email support@trackdrive.com
Request A Demo

Request A Demo.

See how you can improve your marketing and the customer experience with the Voice Marketing Cloud.

Request a demo