# contactListUsage

EVERY list in ONE call, import uploads ("Contacts from … .csv", kind UPLOAD) and exports included, emptiest first: contactCount (unarchived you see), orgActiveContactCount / orgArchivedContactCount and isEmpty (no unarchived contact in the org; null unless you can view all contacts). onlyEmpty and kinds narrow it. Use instead of a countContacts per list. Tags are contactTagUsage.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "contactListUsage", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: no

## Variables

- `kinds`: `[ContactListKind!]` (one of `LIST`, `UPLOAD`, `EXPORT`). Which kind of list: one people made, an import's upload list, or an export's list.
- `onlyEmpty`: `Boolean` (default `false`)

## Response (data, an example)

```json
{
  "contactQuery": {
    "contactListUsage": {
      "lists": [
        {
          "id": "<ID>",
          "name": "…",
          "kind": "LIST",
          "contactCount": 0,
          "orgActiveContactCount": 0,
          "orgArchivedContactCount": 0,
          "isEmpty": true
        }
      ],
      "totalCount": 0,
      "emptyCount": 0
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "contactListUsage",
    "variables": {}
  }'
```
