Skip to content
gist.link ↗

leads

Query CRM API — POST https://crm.api.gist.link/graphql

The leads query on the CRM API.

crm:query:leads

The calling IAM key must hold this permission (or a wildcard that covers it: crm:query:* or crm:*) and the access token must have been minted with audience=crm. See Permissions.

type Query {
leads(filter: LeadFilter, sort: SortInput, first: Int, after: String): LeadConnection!
}
Argument Type Required Description
filter LeadFilter No —
sort SortInput No —
first Int No —
after String No —

LeadConnection! — see the CRM types reference.

Terminal window
curl https://crm.api.gist.link/graphql \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H 'Content-Type: application/json' \
-d @- <<'JSON'
{
"query": "query Leads($filter: LeadFilter, $sort: SortInput, $first: Int, $after: String) { leads(filter: $filter, sort: $sort, first: $first, after: $after) { totalCount edges { cursor node { uuid name email status } } } }",
"variables": {
"filter": {
"search": "example",
"status": "example"
},
"sort": {
"field": "example",
"direction": "ASC"
},
"first": 10,
"after": "cursor"
}
}
JSON