The Create Lead API is used to add new lead data directly to the database source. This API is essential for maintaining comprehensive lead records and ensuring data is accurately stored across database source.
{db-source-id} with the MongoDB Object ID of the database source. This is available in the Pingtree dashboard under Database Sources.
Authorization header:
| Parameter | Type | Required | Description |
|---|---|---|---|
db-source-id | string | Yes | MongoDB Object ID of the database source |
| Parameter | Type | Required | Description |
|---|---|---|---|
first_name | string | Conditional | Consumer’s first name |
last_name | string | Conditional | Consumer’s last name |
email | string | Conditional | Email address (validated as a valid email format) |
mobile | string | Conditional | 10-digit phone number (digits only) |
address | string | Conditional | Street address |
city | string | Conditional | City name (letters and spaces only) |
state | string | Conditional | 2-letter state abbreviation |
zip_code | string | Conditional | 5-digit ZIP code |
transaction_id | string | No | Custom transaction ID; auto-generated if omitted |
| HTTP Code | Lead Status | Description |
|---|---|---|
| 201 | accept | Lead created successfully |
| 201 | duplicate | Lead already exists (deduplication enabled and matched) |
| 400 | missingField | One or more required fields are absent |
| 400 | invalidField | One or more fields failed format validation |
| 401 | — | Invalid or missing API key |
| 500 | — | Internal server error |
email or mobile) is checked against existing records before the lead is stored. If a match is found, the lead status is duplicate and the record is not stored again.
xxTrustedFormToken, xxTrustedFormCertUrl, and xxTrustedFormPingUrl are automatically mapped to internal fields if present in the request.Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Your database source ID
Lead details to add to the database source
First name of the lead
Last name of the lead
Email of the lead
Mobile of the lead
Address of the lead
State of the lead
City of the lead
Zip Code of the lead
Date of Birth of the lead