API Stability Long-Term

The removeUserById() GraphQL mutation is used to remove a user by their identifier.

For more information on user authorization, see the Manage users & permissions documentation page.

Syntax

Below is the syntax for the removeUserById() mutation field:

graphql
removeUserById(
      input: RemoveUserByIdInput!
   ): RemoveUserByIdMutation!

Below is an example of how this mutation field might be used:

Show:
graphql
mutation {
  removeUserById(input:
     { id: "T5PE5ql3JdfM8sqoxinUPMrz" } 
  )
  { user { id, firstName } }
}
Example Responses
Show:
json
{
  "data": {
    "removeUserById": {
      "user": {
        "id": "T5PE5ql3JdfM8sqoxinUPMrz",
        "firstName": "Bob"
      }
    }
  }
}

Given Datatypes

RemoveUserByIdInput has one parameter. It's described below:

Table: RemoveUserByIdInput

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Sep 19, 2024
idstringyes Long-TermThe unique identifier of the user to be removed.

Returned Datatypes

RemoveUserByIdMutation has one parameter, but several sub-parameters. Click on the link in the table below to see them.

Table: RemoveUserByIdMutation

ParameterTypeRequiredDefaultStabilityDescription
Some arguments may be required, as indicated in the Required column. For some fields, this column indicates that a result will always be returned for this column.
Table last updated: Oct 3, 2024
userUseryes Long-TermThe user to remove from the mutation. See User.