Skip to main content

Users

The Users API allows you to find specific users and retrieve lists of users from your account.

Find User

QUERYfindUser

Retrieves details for a specific user by ID, email, or phone number.

Arguments

ParameterTypeDescription
criteriaUserLookupInputRequired Criteria for finding a user

UserLookupInput

FieldTypeDescription
idIDOptional ID of the user to find
emailStringOptional Email of the user to find
phoneStringOptional Phone number of the user to find

Example Query

query {
viewer {
findUser(criteria: {
email: "john.doe@example.com"
}) {
id
profile {
firstName
lastName
email
phone
avatar
}
brand {
id
name
}
roles
}
}
}

Response

{
"data": {
"viewer": {
"findUser": {
"id": "VXNlcjoyNA==",
"profile": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com",
"phone": "+1234567890",
"avatar": "https://cdn.sixtyseconds.video/avatars/john-doe.jpg"
},
"brand": {
"id": "QnJhbmQ6MTA=",
"name": "Acme Inc."
},
"roles": ["ROLE_USER", "ROLE_BRAND_ADMIN"]
}
}
}
}

List Users

QUERYusers

Retrieves a paginated and filterable list of users. Requires admin access.

Arguments

ParameterTypeDescription
filterUserListFilterInputRequired Filter and pagination options

UserListFilterInput

FieldTypeDescription
searchStringOptional Search term to filter users by ID, email, first name or last name
pageIntOptional Page number for pagination (default: 1)
limitIntOptional Maximum number of users to return per page (default: 10)

Example Query

query {
viewer {
users(filter: {
search: "john",
page: 1,
limit: 10
}) {
items {
id
profile {
firstName
lastName
email
}
brand {
name
}
roles
}
total
page
limit
pages
}
}
}

Response

{
"data": {
"viewer": {
"users": {
"items": [
{
"id": "VXNlcjoyNA==",
"profile": {
"firstName": "John",
"lastName": "Doe",
"email": "john.doe@example.com"
},
"brand": {
"name": "Acme Inc."
},
"roles": ["ROLE_USER", "ROLE_BRAND_ADMIN"]
},
{
"id": "VXNlcjozMg==",
"profile": {
"firstName": "Johnny",
"lastName": "Smith",
"email": "johnny.smith@example.com"
},
"brand": {
"name": "XYZ Corp"
},
"roles": ["ROLE_USER"]
}
],
"total": 15,
"page": 1,
"limit": 10,
"pages": 2
}
}
}
}

User Fields

The User object contains the following fields:

FieldTypeDescription
idIDUnique identifier for the user
profileProfileUser's profile information
brandBrandThe brand associated with the user
roles[String]The roles assigned to the user
teamTeamThe team the user belongs to
verifiedBooleanWhether the user has been verified
currentStepIntCurrent step in the account creation process
enabledBooleanWhether the user account is active
messagingCampaigns[MessagingCampaign]Messaging campaigns associated with the user

User Roles

A user can have one or more of the following roles:

RoleDescription
ROLE_USERStandard user with basic access
ROLE_BRAND_ADMINAdministrator for a specific brand
ROLE_ORG_ADMINAdministrator for an entire organization
ROLE_ADMINGlobal administrator with full system access

Working with Users

Access Control

The findUser query requires admin privileges to access users other than the currently authenticated user. Regular users can only access their own information.

The users query requires admin privileges and will return a paginated list of all users in the system.

Search Functionality

The search parameter in the users query searches across multiple user fields including ID, email, firstName, and lastName, making it easy to find users without knowing their exact identifier.