v1
latestOpenAPI 3.1.02026-08-069158174.8 KBGet Leads Created
Retrieve leads created within a time window (default: last 4 hours).
Returns leads whose created_ts falls within the specified date range. If neither start_date nor end_date is provided, defaults to a rolling 4-hour window ending at the current UTC time — useful for near-real-time polling.
Time-based filtering (start_date / end_date):
Pass start_date and/or end_date as query parameters to customize the time window. Both accept ISO 8601 UTC strings.
- Format: YYYY-MM-DDTHH:MM:SSZ (full) or YYYY-MM-DD (date only = midnight UTC)
- If only start_date is provided, returns all leads created from that point to now.
- If only end_date is provided, returns leads created from (now − 4h) to that point.
- If both are provided, returns leads created within that exact window.
Example requests:
- Leads created in the last 4 hours (default): GET /leads/created
- Leads created in the last 7 days: GET /leads/created?start_date=2026-03-22T00:00:00Z&end_date=2026-03-29T23:59:59Z
- Leads created since March 1st: GET /leads/created?start_date=2026-03-01
- Leads created in the last 7 days with status "assigned": GET /leads/created?start_date=2026-03-22&match_filter_dict={"lead_status": "assigned"}
Other Query Parameters:
- match_filter_dict (optional): JSON-encoded MongoDB filter applied on top of the time window. Use for non-date fields only. Filterable fields: lead_status, lead_source, name, email_list, phone_list, tags, employer_name, profession, title.
Response: Array of lead objects (same schema as GET /leads).
Query parameters
Start of date range in ISO 8601 format (e.g. 2026-03-22T00:00:00Z). Defaults to now − 4 hours.
Start of date range in ISO 8601 format (e.g. 2026-03-22T00:00:00Z). Defaults to now − 4 hours.
End of date range in ISO 8601 format (e.g. 2026-03-29T23:59:59Z). Defaults to now.
End of date range in ISO 8601 format (e.g. 2026-03-29T23:59:59Z). Defaults to now.
Response
Successful Response