Skip to content
gist.link ↗

segmentContacts

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

Contacts for a segment — the campaigns app’s send-time materialization endpoint (company segments yield their companies’ contacts).

crm:query:segmentContacts

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 {
segmentContacts(segmentUuid: ID!, first: Int, after: String): ContactConnection!
}
Argument Type Required Description
segmentUuid ID! Yes —
first Int No —
after String No —

ContactConnection! — 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 SegmentContacts($segmentUuid: ID!, $first: Int, $after: String) { segmentContacts(segmentUuid: $segmentUuid, first: $first, after: $after) { totalCount edges { cursor node { uuid firstName lastName displayName primaryEmail emails phones title } } } }",
"variables": {
"segmentUuid": "01a01234-abcd-7000-9000-0123456789ab",
"first": 10,
"after": "cursor"
}
}
JSON