userAdminUpdate Mutation
Description
Updates an admin user's information. You can update first name, last name, email, and password. Only the fields provided are updated; other fields remain unchanged. Email must be unique if changed.
mutation userAdminUpdate(
$firstName: String!
$lastName: String!
$email: String!
$password: String
) {
userAdminUpdate(
firstName: $firstName
lastName: $lastName
email: $email
password: $password
) {
_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
{
"firstName": "John",
"lastName": "Doe",
"email": "email@example.com",
"password": "password"
}
Response
{
"userAdminUpdate": {
"_id": "cb7474fcc68e5706aabb51d1",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"addedAt": 1760884043696,
"type": "example",
"verification": {
"status": true,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ",
"code": "example",
"date": 1736183899627,
"hash": "example"
},
"hasIntercom": true,
"mfa": {
"secret": "example",
"lastModified": 1730403422000,
"active": true
},
"hasPasscode": true,
"passwordToken": "example",
"lastLogin": 1731780015253,
"accessKeys": [
{
"_id": "9fc82fb216a112b28c5263ff",
"configRef": "c9fee275df312cb3a9c2b5c6",
"accessKey": "example",
"secretKey": "example",
"createdAt": 1723228885899,
"lastUsed": 1742525427487
}
]
}
}
Arguments
| Name | Type | Description |
|---|---|---|
firstName | String! | First name of the admin user. |
lastName | String! | Last name of the admin user. |
email | String! | Email address of the admin user. Must be unique if changed. |
password | String | New password for the admin user. If provided, the password is updated. Must meet password requirements. |