Overview
Every database source in Pingtree exposes a set of HTTP API endpoints for programmatic interaction. You can submit new leads, fetch existing leads, manage suppression lists, and regenerate authentication tokens — all via REST API. The API documentation specific to your source is accessible directly from the Source API Help tab within any database source.Authentication
All API requests require your database source’s unique API key. Include it in the request header:Tip: If you suspect an API key has been compromised, regenerate it immediately from the Source API Help tab. All future requests must use the new key.
Endpoints
Create Lead (Submit)
Submit a new lead to the database source.| Property | Value |
|---|---|
| Method | POST |
| Endpoint | /api/v1/database-source/{slug}/create |
| Header | Value |
|---|---|
Authorization | Bearer YOUR_API_KEY |
Content-Type | application/json |
Fetch Leads (Retrieve)
Retrieve leads from the database source with optional filtering.| Property | Value |
|---|---|
| Method | GET |
| Endpoint | /api/v1/database-source/{slug}/fetch |
| Parameter | Type | Description |
|---|---|---|
page | Integer | Page number for pagination (default: 1). |
limit | Integer | Number of leads per page (default: 50, max: 500). |
status | String | Filter by lead status (active, sold, duplicate, rejected). |
email | String | Filter leads by email address. |
phone | String | Filter leads by phone number. |
from_date | String | Filter leads created on or after this date (YYYY-MM-DD). |
to_date | String | Filter leads created on or before this date (YYYY-MM-DD). |
Token Regeneration
If your API key needs to be rotated for security reasons:- Open the Source API Help tab within the database source.
- Click Regenerate API Key.
- Confirm the action.
- Copy the new API key and update all systems that use it.
Warning: Regenerating the API key immediately invalidates the old key. Any system still using the old key will receive authentication errors until it is updated.
Suppression List Management
The suppression list prevents specific identifiers (email addresses, phone numbers) from being ingested into the source. Any lead submission matching a suppressed value is automatically rejected.Add to Suppression List
| Property | Value |
|---|---|
| Method | POST |
| Endpoint | /api/v1/database-source/{slug}/suppression/add |
| Field | Description |
|---|---|
type | The type of suppression: email or phone. |
value | The value to suppress. |
Remove from Suppression List
| Property | Value |
|---|---|
| Method | POST |
| Endpoint | /api/v1/database-source/{slug}/suppression/remove |
Fetch Suppression List
| Property | Value |
|---|---|
| Method | GET |
| Endpoint | /api/v1/database-source/{slug}/suppression |
Rate Limiting
To maintain platform stability, API requests to database source endpoints are subject to rate limits:| Limit | Value |
|---|---|
| Create Lead | 1,000 requests per minute per API key. |
| Fetch Leads | 60 requests per minute per API key. |
| Suppression | 500 requests per minute per API key. |
429 Too Many Requests response. Implement exponential backoff in your integration to handle rate limit responses gracefully.
Best Practices
- Validate data before submission: Pre-validate email format, phone length, and required fields on your end to minimize rejected leads.
- Handle duplicate responses: A duplicate response is not an error — log it and continue processing your batch.
- Use pagination for large fetches: Always paginate fetch requests rather than requesting all leads in a single call.
- Secure your API key: Never expose the API key in client-side code, public repositories, or unencrypted storage.
- Monitor response codes: Log all non-200 responses and alert on sustained error rates to detect integration issues early.