v1

latestOpenAPI 3.1.02026-08-069158174.8 KB
CRM Service Calls

Get 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).

get/crm/leads/created

Query parameters

match_filter_dictstring
start_datestring nullable

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_datestring nullable

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

idstring required
first_namestring nullable required
last_namestring nullable required
namestring required
statusstring required
marketing_sourcestring nullable
created_datestring nullable required
updated_datestring nullable required
status_updated_datestring nullable required
tagsstring[] nullable
social_dict_listobject[] nullable
is_convertedboolean

Whether lead has been converted to contact

contact_idstring nullable

Contact ID if converted

has_dealboolean

Whether a deal/opportunity exists

deal_stagestring nullable

Current deal stage if exists

deal_idstring nullable

Deal/Opportunity ID if exists

value_of_salenumber nullable

Value of sale for the deal if exists

close_datestring nullable

Close date of the deal in ISO 8601 format