updateUser
Requires permission users:user:update.
Updates a user. A user in another organization is refused unless you hold the cross-organization user update permission. Needs users:user:update.
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
mutation UpdateUser($id: String!, $input: UpdateUserInput!) {
updateUser(id: $id, input: $input) {
id
postalCode
name
firstName
lastName
status
directPermissions {
id
name
createdAt
action
description
direct
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation UpdateUser($id: String!, $input: UpdateUserInput!) {\n updateUser(id: $id, input: $input) {\n id\n postalCode\n name\n firstName\n lastName\n status\n directPermissions {\n id\n name\n createdAt\n action\n description\n direct\n }\n }\n}",
"variables": {
"id": "string",
"input": {}
}
}
EOF
Variables:
{
"id": "string",
"input": {}
}
Response:
{
"data": {
"updateUser": {
"id": "id",
"postalCode": "string",
"name": "string",
"firstName": "string",
"lastName": "string",
"status": "ACTIVE",
"directPermissions": [
{
"id": "id",
"name": "string",
"createdAt": "2025-01-15T00:00:00Z",
"action": "string",
"description": "string",
"direct": true
}
]
}
}
}
updateUser(
id: String!
input: UpdateUserInput!
): User!
Arguments
updateUser.id ● String! non-null scalar
The ID of the user.
updateUser.input ● UpdateUserInput! non-null input
The fields to change.
Type
User object
A user of the organization.