Skip to main content
GET
/
api
/
lead
/
list
/
{org-id}
/
{cid}
cURL
curl --request GET \
  --url https://api.pingtree.com/api/lead/list/{org-id}/{cid} \
  --header 'Authorization: Bearer <token>'
{
  "status": "<string>",
  "type": "<string>",
  "message": "<string>",
  "leadsList": {},
  "totalRecord": "<string>"
}

Overview

The Lead List API returns a paginated list of leads associated with a specific offer campaign. Use it to pull lead records for reporting dashboards, data exports, CRM syncs, or campaign performance reviews. Results include lead details, status, source attribution, and timestamps.

Endpoint

GET /api/lead/list/{org-id}/{cid}
SegmentDescription
{org-id}Your organization (advertiser) unique ID
{cid}The campaign unique ID

Authentication

Include your API token in the Authorization header:
Authorization: Bearer <your-api-token>

Request Parameters

Path Parameters

ParameterTypeRequiredDescription
org-idstringYesOrganization unique ID
cidstringYesCampaign unique ID

Query Parameters

ParameterTypeRequiredDescription
pageintegerNoPage number (default: 1)
limitintegerNoRecords per page (default: 10, max: 100)
sortstringNoSort field (e.g. createdAt)
orderstringNoSort direction: asc or desc (default: desc)
searchstringNoFilter by email, mobile, or name
fromstringNoStart date filter (ISO 8601: YYYY-MM-DD)
tostringNoEnd date filter (ISO 8601: YYYY-MM-DD)
leadStatusstringNoFilter by status: accepted, unsold, rejected, duplicate
pidstringNoFilter by source unique ID

Example Request

curl -G "https://api.pingtree.com/api/lead/list/org_5f1a2b3c/cmp_9z8y7x6w" \
  -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
  --data-urlencode "page=1" \
  --data-urlencode "limit=25" \
  --data-urlencode "from=2025-08-01" \
  --data-urlencode "to=2025-08-31" \
  --data-urlencode "leadStatus=accepted"

Example Response

{
  "status": 200,
  "message": "Leads retrieved successfully",
  "data": {
    "leads": [
      {
        "transaction_id": "txn_7f3a2b1c-4d56-78ef-9012-abcdef123456",
        "first_name": "Jane",
        "last_name": "Doe",
        "email": "jane.doe@example.com",
        "mobile": "5551234567",
        "state": "CA",
        "zip_code": "90001",
        "leadStatus": "accepted",
        "isDeDupe": false,
        "pid": "src_abc123",
        "cid": "cmp_9z8y7x6w",
        "sub1": "campaign-abc",
        "createdAt": "2025-08-14T10:32:00.000Z"
      }
    ],
    "totalRecord": 412,
    "page": 1,
    "limit": 25
  }
}

Error — Invalid Campaign

{
  "status": 400,
  "message": "Campaign not found or access denied"
}

Error — Unauthorized

{
  "status": 401,
  "message": "Unauthorized"
}

Status Codes

HTTP CodeDescription
200Lead list returned successfully
400Invalid campaign ID, org ID, or query parameters
401Invalid or missing API token
500Internal server error

Tips

  • Pagination: Always use the page and limit parameters when working with large campaigns to avoid timeouts. Start at page 1 and increment until you reach all records (totalRecord / limit pages).
  • Date filters: Use from and to together to pull leads for a specific reporting window. Both accept YYYY-MM-DD format and filter on the lead’s creation timestamp in UTC.
  • Source filtering: Use the pid parameter to pull leads from a single source within a campaign — useful when comparing source performance.
  • Status filtering: Combine leadStatus=accepted with date filters for accurate sold-lead counts without pulling rejected or duplicate records.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

org-id
string
required

Your organization ID

cid
string
required

Your campaign unique ID

Query Parameters

page
string

Selected page number default 1

limit
string

No of leads in the page, default: 10, min:10, max:100

sortField
string

Sort the list of leads based on field default _id

sortOrder
string

Sort order of list based on sort field default: descending, valid values are desc , asc

date
string
required

For date filter anyone of these combination is rquired ["dateRange","singleDayDate","startDate and endDate"] from below list

dateRange
string

Valid date range format YYYY-MM-DD - YYYY-MM-DD

startDate
string

Valid startDate format YYYY-MM-DD

endDate
string

Valid endDate format YYYY-MM-DD

singleDayDate
string

Valid singleDayDate format YYYY-MM-DD

Response

Lead list successfully received

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

leadsList
object

Lead Details Array

totalRecord
string

Total leads count