POST /api/v1/leads
Send leads to your Trackdrive account.

Supported Formats

json

Examples

# Submit leads with a simple HTTP request
curl -X POST trackdrive.net/api/v1/leads?lead_token=yourtoken&caller_id=17193132645&email=john@gmail.com&custom_token=the_value&loan_amount=500
# Submit leads as JSON:
curl -H "Content-Type: application/json" -X POST -d '{"lead_token":"xyz","caller_id":"+18004506787","expires_in":60,"data":{"loan_amount":"500"}}' trackdrive.net/api/v1/leads

Params

Param name
Description
lead_token
optional

The token for the Schedule or Offer where you want leads sent. Get it from: trackdrive.net/schedules

  • Must be String

offer_lead_token
optional

The token for the Offer where you want leads sent. Get it from: trackdrive.net/offers

  • Must be String

schedule_lead_token
optional

The token for the Schedule where you want leads sent. Get it from: trackdrive.net/schedules

  • Must be String

caller_id
optional

The callerID for the lead. This is the number Trackdrive will dial when making outbound calls to the lead. This is also the number where Trackdrive will send SMS.

  • Must be String

email
optional

The email address for the lead. The lead's email is required for sending emails from schedules to leads.

  • Must be String

expires_in
optional

For how many minutes should the lead stay in our database before it is automatically deleted? Leave this blank to set an infinite expiry. The default is to never delete leads.

  • Must be String

apply_to
optional

translation missing: en.api.leads.apply_to

  • Must be one of: calls.

blocked
optional

translation missing: en.api.leads.blocked

  • Must be a boolean value: 1, true, yes, on, 0, false, no, off

data
optional

Trackdrive will convert this hash of JSON data into tokens. Inbound and Outbound calls made and received from this Lead will automatically inherit these tokens. {interest: 'kittens', source: 'google', first_name: 'John', last_name: 'Smith'} Emails and SMS also have access to these tokens, so it's possible to send email and SMS messages that substitute tokens with values, such as {{first_name}}. Example SMS: “Hello {{first_name}} {{last_name}}, thanks for you inquiry. We will be calling you in 30 seconds from {{trackdrive_number}}”

  • Must be Hash


PUT /api/v1/leads/:caller_id/caller_opt_out
Mark a single lead as opt-out. Opted-out leads will no longer be sent SMS, Calls, or Emails.

Supported Formats

json

Examples

curl -X PUT -d '' trackdrive.localhost/api/v1/leads/17193132645/caller_opt_out?lead_token=yourtoken

# GET requests are supported
curl trackdrive.net/api/v1/leads/17193132645/caller_opt_out?lead_token=yourtoken

Params

Param name
Description
lead_token
required

The token for the Schedule or Offer where you want leads sent. Get it from: trackdrive.net/schedules

  • Must be String


DELETE /api/v1/leads/:caller_id/caller_remove
Remove a single lead from a Schedule or Offer. This will prevent ANY additional actions being taken on behalf of the lead.

Supported Formats

json

Examples

curl -X DELETE trackdrive.localhost/api/v1/leads/17193132645/caller_remove?lead_token=yourtoken

# GET requests are supported
curl trackdrive.net/api/v1/leads/17193132645/caller_remove?lead_token=yourtoken

Params

Param name
Description
lead_token
required

The token for the Schedule or Offer where you want leads sent. Get it from: trackdrive.net/schedules

  • Must be String


GET /api/v1/leads
List your leads.

Supported Formats

json

Params

Param name
Description
auth_token
optional

Authorize requests using your token. Get it from your profile: trackdrive.net/profile/edit

  • Must be String


GET /api/v1/leads/:id
Get details about a lead.

Supported Formats

json

Params

Param name
Description
auth_token
optional

Authorize requests using your token. Get it from your profile: trackdrive.net/profile/edit

  • Must be String


DELETE /api/v1/leads/:id/id
Destory a lead by it's internal id.

Supported Formats

json

Params

Param name
Description
auth_token
optional

Authorize requests using your token. Get it from your profile: trackdrive.net/profile/edit

  • Must be String