Skip to main content

userAdminVerify Mutation

Description

Verifies an admin user's email address using a verification token, or resends the verification code if resend is true. Admin users must verify their email address during account setup.

mutation userAdminVerify($userRef: ID!, $token: String, $resend: Boolean) {
userAdminVerify(userRef: $userRef, token: $token, resend: $resend) {
_id
firstName
lastName
name
email
addedAt
type
verification {
status
token
code
date
hash
}
hasIntercom
mfa {
secret
lastModified
active
}
hasPasscode
passwordToken
lastLogin
accessKeys {
_id
configRef
accessKey
secretKey
createdAt
lastUsed
}
}
}

Variables

{
"userRef": "8e01074739be37e762c66baf",
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ",
"resend": true
}

Response

{
"userAdminVerify": {
"_id": "9bc3bded072f04986014a8cd",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"addedAt": 1742408124453,
"type": "example",
"verification": {
"status": true,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ",
"code": "example",
"date": 1764066637131,
"hash": "example"
},
"hasIntercom": true,
"mfa": {
"secret": "example",
"lastModified": 1706402711947,
"active": true
},
"hasPasscode": true,
"passwordToken": "example",
"lastLogin": 1760539811280,
"accessKeys": [
{
"_id": "a794d38fa8ba96e4daea5816",
"configRef": "f8c1da67075b2dc85734c77b",
"accessKey": "example",
"secretKey": "example",
"createdAt": 1718841315470,
"lastUsed": 1709271965781
}
]
}
}

Arguments

NameTypeDescription
userRefID!Reference ID of the admin user to verify.
tokenStringVerification token to validate. Required if resend is false.
resendBooleanWhether to resend the verification code instead of verifying. If true, a new verification code is generated and sent via email.

Returns

Admin