GoliathDevelopersGet an API key
Reference/Teamgenerated from the gateway manifest

listTeammates

Fuzzy-search ACTIVE teammates by name, email or phone.

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

Fuzzy-search ACTIVE teammates by name, email or phone (optional searchTerm; omit it for an alphabetical page). This is the PICKER, not the roster: it returns at most limit rows (default 20, maximum 50), ranked by match quality, and SUSPENDED members are excluded at the query: so a page that comes back full may be a truncated page, and a person missing from it may be removed rather than absent. An empty or partial result is NOT 'no such person': they may be invited and not yet joined, so an admin reads listTeamInvites before saying nobody by that name is on the team. For the whole team, for anyone's role, or to tell a current member from a removed one, use listTeamMembers; to resolve a bare user id, use getTeammatesByIds. Use the returned userId with updateContact (addCollaborators), assignContact, and the userIds filter on findDeals.

curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "listTeammates",
    "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.team.listTeammates({})
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: 'listTeammates',
    variables: {}
  }),
})
const { data, errors } = await res.json()

limit is clamped to 50.

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.

searchTermString
limitInt

Default 20.

Response

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

response shape
{
  "data": {
    "teamQuery": {
      "getTeamAutocomplete": [
        {
          "userId": "<ID>",
          "firstName": "…",
          "lastName": "…",
          "email": "…",
          "phoneNumber": "…"
        }
      ]
    }
  }
}

Errors

Behaviour

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