Growth Intelligence

GetUserById

Fetch a complete user profile by their unique ID. Returns acquisition signals, engagement metrics, and demographic information — the full picture ThriveStack has on a single user.

Endpoint

This is a GraphQL query sent over HTTP POST.

POST /growth-intelligence

Authentication

content-type: application/json
x-api-key: YOUR_API_KEY

Input

VariableTypeRequiredDescription
input.idStringYesThe unique user identifier (same user_id used in Identify and Track calls).

GraphQL query

query GetUserById($input: GetUserByIdRequest!) {
  getUserById(input: $input) {
    user {
      name
      id
      email
      accountId
      accountName
      acquisition {
        signedUpOn
        isInvited
        abuseStatus
      }
      engagement {
        isActive
        lastActiveAt
        totalSignIns
      }
      demographics {
        location
        phone
        linkedinHandle
        twitterHandle
        employmentName
        employmentTitle
        employmentRole
        country
      }
    }
  }
}

Example

cURL

curl --location 'https://api.app.thrivestack.ai/growth-intelligence' \
--header 'content-type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data '{
  "operationName": "GetUserById",
  "variables": {
    "input": {
      "id": "18f716ac-37a4-464f-adb7-3cc30032308c"
    }
  },
  "query": "query GetUserById($input: GetUserByIdRequest!) { getUserById(input: $input) { user { name id email accountId accountName acquisition { signedUpOn isInvited } engagement { isActive totalSignIns } demographics { employmentTitle country } } } }"
}'

JavaScript

const response = await fetch("https://api.app.thrivestack.ai/growth-intelligence", {
  method: "POST",
  headers: {
    "content-type": "application/json",
    "x-api-key": "YOUR_API_KEY"
  },
  body: JSON.stringify({
    operationName: "GetUserById",
    variables: { input: { id: "18f716ac-37a4-464f-adb7-3cc30032308c" } },
    query: `query GetUserById($input: GetUserByIdRequest!) {
  getUserById(input: $input) {
    user {
      name id email accountId accountName
      acquisition { signedUpOn isInvited }
      engagement { isActive totalSignIns }
      demographics { employmentTitle country }
    }
  }
}`
  })
});
const data = await response.json();
console.log(data.data.getUserById.user);

Response fields

Top-level user

FieldTypeDescription
nameStringUser's display name
idStringUnique user identifier
emailStringUser's email address
accountIdStringID of the account this user belongs to
accountNameStringName of the account this user belongs to

acquisition

FieldTypeDescription
signedUpOnStringISO 8601 timestamp of signup
isInvitedBooleanWhether the user was invited (vs organic)
abuseStatusStringAbuse detection status for this user

engagement

FieldTypeDescription
isActiveBooleanWhether the user is currently active
lastActiveAtStringTimestamp of last recorded activity
totalSignInsIntTotal number of sign-in events recorded

demographics

FieldTypeDescription
employmentNameStringCurrent employer name
employmentTitleStringJob title
employmentRoleStringHigh-level role (e.g., Engineering, Sales)
countryStringCountry of the user
locationStringFull human-readable location
phoneStringPhone number
linkedinHandleStringLinkedIn profile handle
twitterHandleStringTwitter handle

Example response

{
  "data": {
    "getUserById": {
      "user": {
        "name": "John Doe",
        "id": "18f716ac-37a4-464f-adb7-3cc30032308c",
        "email": "john.doe@acme.com",
        "accountId": "ac8db7ba-5139-4911-ba6e-523fd9c4704b",
        "accountName": "Acme Corporation",
        "acquisition": {
          "signedUpOn": "2024-01-15T10:30:00Z",
          "isInvited": false,
          "abuseStatus": "clean"
        },
        "engagement": {
          "isActive": true,
          "lastActiveAt": "2024-01-15T09:00:00Z",
          "totalSignIns": 42
        },
        "demographics": {
          "employmentName": "Acme Corporation",
          "employmentTitle": "Senior Engineer",
          "employmentRole": "Engineering",
          "country": "United States",
          "location": "San Francisco, CA, United States"
        }
      }
    }
  }
}