Skip to main content

deleteUser

Requires permission users:user:delete.

Deletes a user. You cannot delete your own account, and deleting another user needs every permission that user holds. A user in another organization is refused unless you hold the cross-organization user delete permission. Needs users:user:delete.

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 DeleteUser($id: String!) {
deleteUser(id: $id) {
id
postalCode
name
firstName
lastName
status
directPermissions {
id
name
createdAt
action
description
direct
}
}
}

Variables:

{
"id": "string"
}

Response:

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

Arguments​

deleteUser.id ● String! non-null scalar​

The ID of the user.

Type​

User object​

A user of the organization.