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
| Variable | Type | Required | Description |
input.id | String | Yes | The 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
| Field | Type | Description |
name | String | User's display name |
id | String | Unique user identifier |
email | String | User's email address |
accountId | String | ID of the account this user belongs to |
accountName | String | Name of the account this user belongs to |
acquisition
| Field | Type | Description |
signedUpOn | String | ISO 8601 timestamp of signup |
isInvited | Boolean | Whether the user was invited (vs organic) |
abuseStatus | String | Abuse detection status for this user |
engagement
| Field | Type | Description |
isActive | Boolean | Whether the user is currently active |
lastActiveAt | String | Timestamp of last recorded activity |
totalSignIns | Int | Total number of sign-in events recorded |
demographics
| Field | Type | Description |
employmentName | String | Current employer name |
employmentTitle | String | Job title |
employmentRole | String | High-level role (e.g., Engineering, Sales) |
country | String | Country of the user |
location | String | Full human-readable location |
phone | String | Phone number |
linkedinHandle | String | LinkedIn profile handle |
twitterHandle | String | Twitter 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"
}
}
}
}
}