Skip to main content

createUser

Requires permission users:user:create.

Creates a user in your organization. The organization always comes from the signed-in user, never from the input. Naming a role also needs the role update permission. 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 CreateUser($input: CreateUserInput!) {
createUser(input: $input) {
id
postalCode
name
firstName
lastName
status
directPermissions {
id
name
createdAt
action
description
direct
}
}
}

Variables:

{
"input": {
"email": "string",
"firstName": "string",
"lastName": "string"
}
}

Response:

{
"data": {
"createUser": {
"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
}
]
}
}
}
createUser(
input: CreateUserInput!
): User!

Arguments​

createUser.input ● CreateUserInput! non-null input​

The new user's details. Any organization in the input is ignored.

Type​

User object​

A user of the organization.