Skip to main content

restoreUser

Requires permission users:user:create.

Restores a deleted staff user in your organization: their account, role and permissions come back, but they must sign in again because the delete ended their sessions. You need every permission the restored user holds. Use it when adding a user fails because a deleted user already has that email. Needs users:user:create.

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:

mutation RestoreUser($id: String!) {
restoreUser(id: $id) {
id
postalCode
name
firstName
lastName
status
directPermissions {
id
name
createdAt
action
description
direct
}
}
}

Variables:

{
"id": "string"
}

Response:

{
"data": {
"restoreUser": {
"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
}
]
}
}
}
restoreUser(
id: String!
): User!

Arguments​

restoreUser.id ● String! non-null scalar​

The ID of the user.

Type​

User object​

A user of the organization.