TSGGLOBAL Support sign in
Skip to page content
Browse TNID API docs

TNID API documentation User Users and search Global Search (User)

Global Search (User)

On this page

GraphQL endpoint: /user

Searches across users, companies, and groups in a single mixed list. Matches against display name and, when the query looks like an email or phone number, contact fields. Queries shorter than 3 characters return an empty list.

Query

query ($query: String!, $limit: Int, $showSensitiveData: Boolean) {
  globalSearch(query: $query, limit: $limit, showSensitiveData: $showSensitiveData) {
    id
    type
    label
    username
    image
    relation
    emails {
      id
      email
      visibility
    }
    telephoneNumbers {
      id
      number
      visibility
    }
    addresses {
      id
      street
      city
      state
      country
      zipCode
      visibility
    }
  }
}

Variables

{
  "query": "Acme"
}

Response

{
  "data": {
    "globalSearch": [
      {
        "addresses": [],
        "emails": [],
        "id": "00000000-0000-4000-8000-000000000001",
        "image": "http://localhost:4566/test_profile_image_url?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=SOME_RANDOM_ACCESS_KEY%2F20260115%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260115T090000Z&X-Amz-Expires=600&X-Amz-SignedHeaders=host&X-Amz-Signature=0000000000000000000000000000000000000000000000000000000000000000",
        "label": "Acmeperson Searchable",
        "relation": [],
        "telephoneNumbers": [],
        "type": "USER",
        "username": "username1"
      },
      {
        "addresses": [],
        "emails": [],
        "id": "00000000-0000-4000-8000-000000000002",
        "image": "http://localhost:4566/logo_url?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=SOME_RANDOM_ACCESS_KEY%2F20260115%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260115T090000Z&X-Amz-Expires=600&X-Amz-SignedHeaders=host&X-Amz-Signature=0000000000000000000000000000000000000000000000000000000000000000",
        "label": "Acmecorp Industries",
        "relation": [],
        "telephoneNumbers": [],
        "type": "COMPANY",
        "username": ""
      },
      {
        "addresses": [],
        "emails": [],
        "id": "00000000-0000-4000-8000-000000000003",
        "image": "http://localhost:4566/logo_url?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=SOME_RANDOM_ACCESS_KEY%2F20260115%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260115T090000Z&X-Amz-Expires=600&X-Amz-SignedHeaders=host&X-Amz-Signature=0000000000000000000000000000000000000000000000000000000000000000",
        "label": "Acmegroup Society",
        "relation": null,
        "telephoneNumbers": [],
        "type": "GROUP",
        "username": ""
      }
    ]
  },
  "errors": [
    {
      "locations": [
        {
          "column": 5,
          "line": 8
        }
      ],
      "message": "Cannot return null for non-nullable field",
      "path": [
        "globalSearch",
        2,
        "relation",
        0
      ]
    }
  ]
}