Skip to main content
POST
/
api
/
lead
/
update
/
{cid}
cURL
curl --request POST \
  --url https://api.pingtree.com/api/lead/update/{cid} \
  --header 'Content-Type: application/json' \
  --data '
{
  "transaction_id": "<string>",
  "first_name": "<string>",
  "last_name": "<string>",
  "email": "<string>",
  "mobile": "<string>",
  "address": "<string>",
  "state": "<string>",
  "city": "<string>",
  "zip_code": "<string>",
  "date_of_birth": "<string>"
}
'
{
  "status": "<string>",
  "type": "<string>",
  "message": "<string>"
}

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)
sub1sub5stringNoUpdated publisher sub-parameters
adv1adv5stringNoUpdated 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

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

{
  "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

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

Error — Lead Not Found

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

Error — Unauthorized

{
  "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.

Path Parameters

cid
string
required

Your campaign unique ID

Body

application/json

Lead details to add to the campaign

transaction_id
string
required

Lead's Transaction ID, Which was generate from click script of Pingtree

first_name
string

First name of the lead

last_name
string

Last name of the lead

email
string

Email of the lead

mobile
string

Mobile of the lead

address
string

Address of the lead

state
string

State of the lead

city
string

City of the lead

zip_code
string

Zip Code of the lead

date_of_birth
string

Date of Birth of the lead

Response

Lead successfully updated

status
string

Status code of API response

type
string

Type of API response which can be success or error

message
string

Message of API response