post
https://api.duodeal.app/api/users
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.
Body Fields
| Field | Type | Required | Description |
|---|---|---|---|
email | string | Yes | Unique email address (validated) |
password | string | Yes | Plain password — hashed before storage |
firstName | string | No | First name |
lastName | string | No | Last name |
userGroup | object | No | User group: {"id": <user_group_id>} |
active | boolean | No | Active status |
phone | string | No | Phone number |
jobTitle | string | No | Job title |
mailProvider | string | No | Mail provider: internal, gmail, outlook, or mailto |
language | string | No | Preferred locale (e.g. en, fr) |
locale | string | No | Alias used to set language |
Response
201 Created: User successfully created400 Bad Request: Missing password, invalid JSON, or validation error401 Unauthorized: Invalid or missing API key403 Forbidden: Caller is not an admin
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
201Resource created
400Bad request
401Unauthorized
