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": "54f5f6fbca2d082b46defc4f",
"firstName": "example",
"lastName": "example",
"name": "example",
"email": "email@example.com",
"addedAt": 1744586520562,
"type": "example",
"verification": {
"status": true,
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ",
"code": "example",
"date": 1749052411801,
"hash": "example"
},
"hasIntercom": true,
"mfa": {
"secret": "example",
"lastModified": 1712647214835,
"active": true
},
"hasPasscode": true,
"passwordToken": "example",
"lastLogin": 1735644502217,
"accessKeys": [
{
"_id": "59800e6c30f2bb9346ce6230",
"configRef": "4d38598aeed35e6f7ba039c5",
"accessKey": "example",
"secretKey": "example",
"createdAt": 1766316513926,
"lastUsed": 1719841573132
}
]
}
}
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. |