Skip to main content
QUERY
leads(_hasScheduledCall: Boolean, activeFrom: String, activeTo: String, after: String, createdFrom: String, createdTo: String, first: Number, hasScheduledCall: Boolean, query: String, stage: OpportunityStage, status: LeadStatusInput, updatedSince: String): LeadConnection!

Arguments

_hasScheduledCall
Boolean
deprecated

The original spelling of hasScheduledCall. Prefer that one; this is kept so existing queries keep parsing.

Use hasScheduledCall
activeFrom
String

Keep leads created, or with any form fill or call, on or after this date (ISO 8601). The pipeline board's date filter: a returning lead who filled a form this week is included though it was created earlier.

activeTo
String

Keep leads created, or with any form fill or call, on or before this date (ISO 8601). A date with no time includes that whole day.

after
String
  • Pagination cursor from previous response @param after - Pagination cursor from previous response
createdFrom
String

Keep leads created on or after this date: an ISO 8601 date (read as UTC) or a timestamp with a zone.

createdTo
String

Keep leads created on or before this date (ISO 8601). A date with no time includes that whole day.

first
  • Number of results per page (1-100, default: 50) @param first - Number of results per page (1-100, default: 50)
hasScheduledCall
Boolean

Keep only leads that do (true) or do not (false) have an upcoming, non-cancelled booking. Omit for no filtering.

query
String

Free-text search over the lead's name, CRM name, email and phone.

Matches anywhere in the value, not just the start, and tolerates phone formatting. Results come back newest first by created time and id. Use after to continue through matching leads.

Terms shorter than 3 characters return nothing: they carry no trigram for the index to match and would scan the table.

Keep leads in one derived pipeline stage, the column the lead sits in on the pipeline board. Use this for interested, qualified and disqualified: those leads usually have not booked a call, so opportunities has almost none of them. Leads an admin deleted are left out, as on the board, and so are leads archived through this API, which the board still shows. The search reads at most 1,000 leads per page, newest first; see scanLimited and continuationCursor. At most 3 stage-filtered lead lists per request.

  • Filter by lead status @param status - Filter by lead status
updatedSince
String

ISO 8601 time. Return only leads changed at or after it, oldest change first, for keeping a copy in sync. Changes from the last few seconds arrive on a later request. A stage change can come from a call alone, so read calls(updatedSince:) too. Cannot be combined with stage. Removed leads are not included.

appliedFilters

The filters this list applied, on the root leads list. Null on a nested connection.

continuationCursor
String

Cursor for the next page. Pass it as after when pageInfo.hasNextPage is true. With a stage filter and scanLimited true, this can move past pageInfo.endCursor, including on an empty page.

edges
pageInfo
scanLimited
Boolean!

True when a stage search reached its 1,000-lead limit before filling this page. Continue with continuationCursor to search older leads.

totalCount
Query
Response