Offer Campaign APIs
Create Source Form API
The API URL serves as the endpoint where the traffic source submits lead data. This URL must be installed and used by the source sending the data to ensure it’s received properly by Pingtree. Find detailed documentation here. Use Generate Specs feature to get the api specification for this endpoint.
POST
cURL
Overview
The Source Form API is the primary lead submission endpoint for a specific campaign source. It accepts a full lead record from a publisher or media partner and routes it through the campaign’s distribution logic. This endpoint is equivalent to the Create Form API but is scoped to a source identified by its unique link ID rather than a campaign ID. It is the endpoint listed in your posting specification under “Form API”.Endpoint
{source-unique-id} with the linkUniqueId provided in your posting specification. This value is unique per source-campaign pairing.
Authentication
Include the source API token in theAuthorization header:
Request Parameters
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
source-unique-id | string | Yes | Link unique ID for this source-campaign pairing |
Body Parameters (JSON or form-encoded)
| Parameter | Type | Required | Description |
|---|---|---|---|
first_name | string | Conditional | Consumer’s first name |
last_name | string | Conditional | Consumer’s last name |
email | string | Conditional | Valid email address |
mobile | string | Conditional | 10-digit phone number (digits only) |
address | string | Conditional | Street address |
city | string | Conditional | City name |
state | string | Conditional | 2-letter state code (e.g. TX) |
zip_code | string | Conditional | 5-digit ZIP code |
country | string | No | Country code (default: US) |
date_of_birth | string | No | YYYY-MM-DD format |
transaction_id | string | No | Publisher-generated transaction ID; auto-generated if omitted |
sub1 – sub5 | string | No | Publisher sub-tracking parameters |
adv1 – adv5 | string | No | Advertiser sub-parameters |
utm_source | string | No | UTM source value |
utm_medium | string | No | UTM medium value |
utm_campaign | string | No | UTM campaign value |
utm_term | string | No | UTM term value |
utm_content | string | No | UTM content value |
gclid | string | No | Google Click ID |
fbclid | string | No | Facebook Click ID |
ttclid | string | No | TikTok Click ID |
jornaya | string | No | Jornaya LeadiD token |
xxTrustedFormCertUrl | string | No | TrustedForm certificate URL |
tcpa_consent | string | No | TCPA consent value |
tcpa_consent_date | string | No | TCPA consent timestamp |
loan_amount, home_owner, insurance_type) may also be required. Your posting specification lists all active fields with their required status.
Example Request
Example Responses
Success — Lead Accepted (Sold)
Success — Lead Unsold
Error — Invalid Field
Status Codes
| HTTP Code | Lead Status | Description |
|---|---|---|
| 201 | accepted | Lead distributed to at least one buyer |
| 201 | unsold | Lead recorded but not distributed (cap, filters, no buyers) |
| 400 | missingField | Required field absent from the request |
| 400 | invalidField | Field value did not pass format validation |
| 400 | rejected | Lead rejected by campaign rules |
| 401 | rejected | Invalid or missing API token |
| 405 | rejected | HTTP method not allowed |
| 500 | rejected | Internal server error |
Tips
- Check your posting spec: The exact list of required and optional fields, acceptable values, and field descriptions are auto-generated in your campaign’s posting specification page.
- Mobile number format: Send only digits. The API strips non-digit characters, but a 10-digit number is required (e.g.
4085559876not+1 (408) 555-9876). - Custom transaction IDs: If you supply a
transaction_id, it must be unique per lead. Reusing an ID may overwrite or conflict with existing records. - Redirect handling: Store the
redirect_urlfrom the response and immediately redirect the consumer to it for optimal conversion. - ZIP code lookup: The API can resolve
cityandstatefromzip_codeif those fields are not submitted, depending on campaign configuration.
Previous
Create Source Ping APIThe API URL serves as the endpoint where the traffic source submits lead data. This URL must be installed and used by the source sending the data to ensure it’s received properly by Pingtree. [Find detailed documentation here](/documentation/campaign/source-single-view/Ping-+-Post-API-(CS,-MC,-MP)). Use [Generate Specs](/documentation/campaign/source-single-view/Generate-Specs-(CS,-MC,-MP)) feature to get the api specification for this endpoint.
Next
cURL