v7

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-013764062.2 MB
Users

Create a new user

Creates a new user with the given root role.

post/api/admin/user-admin

Request body

usernamestring

The user's username. Must be provided if email is not provided.

emailstring

The user's email address. Must be provided if username is not provided.

namestring

The user's name (not the user's username).

passwordstring

Password for the user

sendEmailboolean

Whether to send a welcome email with a login link to the user or not. Defaults to true.

Example request

{
  "username": "hunter",
  "email": "user@example.com",
  "name": "Sam Seawright",
  "password": "k!5As3HquUrQ",
  "rootRole": 1
}

Response

The resource was successfully created.

idinteger required

The user id

namestring nullable

Name of the user

emailstring

Email of the user

usernamestring nullable

A unique username for the user

imageUrlstring

URL used for the user profile image

inviteLinkstring

If the user is actively inviting other users, this is the link that can be shared with other users

loginAttemptsinteger

How many unsuccessful attempts at logging in has the user made

emailSentboolean

Is the welcome email sent to the user or not

seenAtstring date-time nullable

The last time this user logged in

createdAtstring date-time

The user was created at this time

accountType'User' | 'Service Account'

A user is either an actual User or a Service Account

permissionsstring[]

Deprecated

scimIdstring nullable

The SCIM ID of the user, only present if managed by SCIM

seatTypestring nullable

The seat type of this user

companyRolestring nullable

The role of the user within the company.

productUpdatesEmailConsentboolean nullable

Whether the user has consented to receive product update emails.

activeSessionsinteger nullable

Count of active browser sessions for this user

deletedSessionsnumber

Experimental. The number of deleted browser sessions after last login

Example response

{
  "id": 123,
  "name": "User",
  "email": "user@example.com",
  "username": "hunter",
  "imageUrl": "https://example.com/242x200.png",
  "inviteLink": "http://localhost:4242/invite-link/some-secret",
  "loginAttempts": 3,
  "rootRole": 1,
  "seenAt": "2023-06-30T11:42:00.345Z",
  "createdAt": "2023-06-30T11:41:00.123Z",
  "accountType": "User",
  "scimId": "01HTMEXAMPLESCIMID7SWWGHN6",
  "seatType": "Regular",
  "companyRole": "Developer",
  "activeSessions": 2,
  "deletedSessions": 1
}