Create user

Creates a new user inside the authenticated admin's company. Requires ROLE_ADMIN.

The new user is automatically attached to the caller's company. A super admin can override the company by passing a company ID in the body.

The account can be created already active and with a profile photo in a single request by passing active and avatar (see below).

Body Fields

FieldTypeRequiredDescription
emailstringYesUnique email address (validated)
passwordstringYesPlain password — hashed before storage
firstNamestringNoFirst name
lastNamestringNoLast name
userGroupobjectNoUser group: {"id": <user_group_id>}
activebooleanNoActive status. Pass true to activate the account immediately (no manual activation needed).
avatarstringNoProfile photo as a base64-encoded image (data-URI accepted, e.g. data:image/png;base64,…). Stored under the new user's own path.
phonestringNoPhone number
jobTitlestringNoJob title
mailProviderstringNoMail provider: internal, gmail, outlook, or mailto
languagestringNoPreferred locale (e.g. en, fr)
localestringNoAlias used to set language

Response

  • 201 Created: User successfully created
  • 400 Bad Request: Missing password, invalid JSON, or validation error
  • 401 Unauthorized: Invalid or missing API key
  • 403 Forbidden: Caller is not an admin
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Body Params
string
string
string
string
boolean
string
Responses
201

Resource created

400

Bad request

401

Unauthorized

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here!