Query
query Leads {
leads {
edges {
cursor
node {
attribution
company
completedCallCount
consent {
__typename
}
createdAt
daysSinceCreated
}
}
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}Response
{
"data": {
"leads": {
"edges": [
{
"cursor": "string",
"node": {
"attribution": "value",
"company": "string",
"completedCallCount": "value",
"consent": [
{
"__typename": "LeadConsent"
}
],
"createdAt": "string",
"daysSinceCreated": "value"
}
}
],
"pageInfo": {
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true,
"startCursor": "string"
},
"totalCount": "value"
}
}
}Queries
leads
List leads with filters and pagination
Returns leads for the authenticated organization only.
Uses Relay-style pagination for efficient large dataset handling.
@param first - Number of results per page (1-100, default: 50)
@param after - Pagination cursor from previous response
@param status - Filter by lead status
@param hasScheduledCall - Filter leads with/without scheduled calls
@returns Relay Connection with edges and pageInfo
@example ```graphql
query {
leads(first: 10, status: new) {
edges {
node {
id
name
email
status
totalRevenue { formatted }
hasScheduledCall
calls(args: { first: 5 }) {
edges {
node {
scheduledAt
status
}
}
}
}
cursor
}
pageInfo {
hasNextPage
endCursor
}
}
}
```
QUERY
leads(_hasScheduledCall: Boolean, after: String, first: Number, hasScheduledCall: Boolean, query: String, status: LeadStatusInput): LeadConnection!Arguments
_hasScheduledCall
Boolean
deprecated
The original spelling of hasScheduledCall. Prefer that one; this is
kept so existing queries keep parsing.
Use hasScheduledCall
after
String
- Pagination cursor from previous response @param after - Pagination cursor from previous response
first
Number
- 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.
status
- Filter by lead status @param status - Filter by lead status
Returns
edges
[LeadEdge!]!
pageInfo
totalCount
Number
Query
query Leads {
leads {
edges {
cursor
node {
attribution
company
completedCallCount
consent {
__typename
}
createdAt
daysSinceCreated
}
}
pageInfo {
endCursor
hasNextPage
hasPreviousPage
startCursor
}
totalCount
}
}Response
{
"data": {
"leads": {
"edges": [
{
"cursor": "string",
"node": {
"attribution": "value",
"company": "string",
"completedCallCount": "value",
"consent": [
{
"__typename": "LeadConsent"
}
],
"createdAt": "string",
"daysSinceCreated": "value"
}
}
],
"pageInfo": {
"endCursor": "string",
"hasNextPage": true,
"hasPreviousPage": true,
"startCursor": "string"
},
"totalCount": "value"
}
}
}