GoliathDevelopersGet an API key
Reference/Contactsgenerated from the gateway manifest

findSharedPhonesAndEmails

Groups of 2+ contacts carrying the same phone number.

POST/api/v1/callREADreadruns as the key's owner
View as Markdown

Groups of 2+ contacts carrying the same phone number (kind PHONE, the default) or email (kind EMAIL), WHATEVER THEIR NAMES, largest first, in ONE call: value (10-digit number or lowercase email), memberCount (every contact you see carrying it: say this number), members (the first 25, VERIFIED holders first) with their statuses for it. "How many times does this number show up", "who else has this number", a household or family on one line: this, not findDuplicateContactGroups (same name only). Never counted: a number marked WRONG, a relative's (sub-contact) number, a reserved-domain email (example.com). totalCount = groups across everything you see.

curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "findSharedPhonesAndEmails",
    "variables": {}
  }'
import { GoliathClient } from '@goliath-data/sdk'

const goliath = new GoliathClient({
  apiKey: process.env.GOLIATH_API_KEY!,
  baseUrl: 'https://server.goliathdata.com',
})

const result = await goliath.contacts.findSharedPhonesAndEmails({})
const res = await fetch('https://server.goliathdata.com/api/v1/call', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.GOLIATH_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    operationId: 'findSharedPhonesAndEmails',
    variables: {}
  }),
})
const { data, errors } = await res.json()

limit is clamped to 100.

Variables

The example sends only what the schema requires. Some operations also need one of several optional variables (one filter or another, say); the description above says which.

kindSharedContactInfoKind

Which value contacts are grouped on when they share it. Default PHONE.

PHONEEMAIL
limitInt

Default 50.

offsetInt

Default 0.

Response

What comes back under data: a list shows as one entry, and a value as its type.

response shape
{
  "data": {
    "contactQuery": {
      "sharedContactInfoGroups": {
        "groups": [
          {
            "value": "…",
            "memberCount": 0,
            "members": [
              {
                "id": "<ID>",
                "name": "…",
                "statuses": [
                  "VERIFIED"
                ]
              }
            ]
          }
        ],
        "totalCount": 0,
        "truncated": true,
        "hasMore": true
      }
    }
  }
}

Errors

Behaviour

A read. It rejects an Idempotency-Key header with 400 bad_request.