GoliathDevelopersGet an API key
Reference/Contactsgenerated from the gateway manifest

contactTagUsage

Free-form tags, least-used first.

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

Free-form tags, least-used first: contactCount (visible, unarchived), orgContactCount (org, +archived; null w/o view-all: 0 proves nothing), dependents. maxContactCount 0 = unused (view-all). filterTree: MATCHING contacts per tag, carried tags first, no org count/dependents. Never countContacts per tag; getDeletionImpact before deleting.

curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "contactTagUsage",
    "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.contactTagUsage({})
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: 'contactTagUsage',
    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.

limitInt

Default 50.

offsetInt

Default 0.

maxContactCountInt
filterTreeJSON

Response

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

response shape
{
  "data": {
    "contactQuery": {
      "contactTagUsage": {
        "tags": [
          {
            "id": "<ID>",
            "name": "…",
            "isEditable": true,
            "contactCount": 0,
            "orgContactCount": 0,
            "dependents": [
              {
                "groupKind": "FILTER",
                "count": 0
              }
            ]
          }
        ],
        "totalCount": 0,
        "hasMore": true
      }
    }
  }
}

Errors

Behaviour

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