Accounts & contacts
Read and write CRM accounts and contacts.
Read and write your CRM. Accounts are companies; contacts are people, optionally linked to an account.
Read
query Crm {
accounts(first: 20, search: "acme") {
edges { node { id companyName primaryDomain projectedArr } }
pageInfo { hasNextPage endCursor }
}
contacts(first: 20, accountId: "<account-id>") {
edges { node { id name email accountId } }
}
}Write
mutation NewAccount($input: CreateAccountInput!) {
createAccount(input: $input) {
account { id companyName primaryDomain }
error { code message }
}
}{
"input": {
"companyName": "Acme Inc",
"primaryDomain": "acme.com",
"arrAmount": 12000,
"arrCadence": "annual",
"tags": ["enterprise"]
}
}Contacts follow the same pattern with createContact / updateContact /
deleteContact. Updates merge customData per key; pass a null value to clear a
single key. CRM reads need accounts:read / contacts:read; writes need the
matching *:write scope.