Pingtree

Offer Campaign APIs

Update Lead API

POSThttps://api.pingtree.com/api/lead/update/{cid}

Overview#

The Update Lead API enriches or corrects an existing lead record in a campaign. Use it when additional data becomes available after initial submission — for example, after a secondary form step, a phone verification flow, or a credit check callback. The lead is identified by transaction_id and the campaign's offer campaign ID.

Endpoint#

POST /api/lead/update/{offerCampaignId}

Replace {offerCampaignId} with the unique identifier of the offer campaign (available in your posting spec or dashboard).

Authentication#

Include the enrichment token in the Authorization header:

Authorization: Bearer <your-enrichment-token>

The enrichment token is distinct from the standard form API token and is listed separately in your posting specification.

Request Parameters#

Path Parameters#

ParameterTypeRequiredDescription
offerCampaignIdstringYesThe unique ID of the offer campaign

Body Parameters (JSON)#

ParameterTypeRequiredDescription
transaction_idstringYesThe transaction ID returned by the original lead submission
first_namestringNoUpdated first name
last_namestringNoUpdated last name
emailstringNoUpdated email address
mobilestringNoUpdated 10-digit mobile number
addressstringNoUpdated street address
citystringNoUpdated city
statestringNoUpdated state abbreviation
zip_codestringNoUpdated ZIP code
date_of_birthstringNoUpdated date of birth (YYYY-MM-DD)
sub1 – sub5stringNoUpdated publisher sub-parameters
adv1 – adv5stringNoUpdated advertiser sub-parameters

Any campaign-specific custom fields (e.g. loan_amount, credit_score) can also be included in the body. Only fields present in the request body are updated; existing field values are not overwritten if omitted.

Example Request#

Bash
curl -X POST "https://api.pingtree.com/api/lead/update/cmp_9z8y7x6w" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
  -H "Content-Type: application/json" \
  -d '{
    "transaction_id": "txn_7f3a2b1c-4d56-78ef-9012-abcdef123456",
    "loan_amount": 15000,
    "credit_score": "good",
    "home_owner": true
  }'

Example Responses#

Success — Lead Updated#

JSON
{
  "status": "201",
  "message": "Lead successfully updated",
  "transaction_id": "txn_7f3a2b1c-4d56-78ef-9012-abcdef123456",
  "data": {
    "transaction_id": "txn_7f3a2b1c-4d56-78ef-9012-abcdef123456",
    "leadStatus": "accepted",
    "redirect_url": "https://thank-you.example.com?tid=txn_7f3a2b1c"
  },
  "isDeDupe": false
}

Error — Missing Transaction ID#

JSON
{
  "status": "400",
  "message": "transaction_id is required",
  "data": {
    "leadStatus": "missingField"
  }
}

Error — Lead Not Found#

JSON
{
  "status": "400",
  "message": "Lead not found for the given transaction_id",
  "data": {
    "leadStatus": "rejected"
  }
}

Error — Unauthorized#

JSON
{
  "status": "401",
  "message": "Unauthorized",
  "data": {
    "leadStatus": "rejected"
  }
}

Status Codes#

HTTP CodeLead StatusDescription
201acceptedLead was updated and re-evaluated successfully
201unsoldLead was updated but not re-distributed
400missingFieldtransaction_id or another required enrichment field is missing
400invalidFieldA field failed format validation
400rejectedThe lead record was not found or the update was rejected
401rejectedInvalid or missing enrichment token
405rejectedHTTP method not allowed
500rejectedInternal server error

Tips#

  • transaction_id is mandatory. The update endpoint uses it to locate the original lead record. Always store this value from the initial form submission response.
  • Partial updates are safe. Only send the fields you want to change. Fields not included in the request are left unchanged.
  • Re-distribution: Depending on campaign settings, updating a lead may trigger re-distribution to buyers. Check with your campaign manager if re-posting behaviour is required.
  • Enrichment token vs form token: These are different credentials. Using the wrong token returns a 401 error.