userRelationships
Requires permission users:user:read.
Returns a user's reporting relationships in your organization. Needs users:user:read.
Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.
Example:
- GraphQL
- cURL
query UserRelationships($userId: String!) {
userRelationships(userId: $userId) {
subordinateOf {
id
createdAt
isActive
notes
organizationId
relatedUserId
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "query UserRelationships($userId: String!) {\n userRelationships(userId: $userId) {\n subordinateOf {\n id\n createdAt\n isActive\n notes\n organizationId\n relatedUserId\n }\n }\n}",
"variables": {
"userId": "string"
}
}
EOF
Variables:
{
"userId": "string"
}
Response:
{
"data": {
"userRelationships": {
"subordinateOf": [
{
"id": "id",
"createdAt": "2025-01-15T00:00:00Z",
"isActive": true,
"notes": "string",
"organizationId": "string",
"relatedUserId": "string"
}
]
}
}
}
userRelationships(
userId: String!
): UserRelationshipSummary!
Arguments
userRelationships.userId ● String! non-null scalar
The ID of the user.
Type
UserRelationshipSummary object
A user's relationships in both directions.