---
title: "Create new user"
method: POST
path: "/acc-api/users"
tags: ["User"]
---

# Create new user

`POST /acc-api/users`

Creates a new user

## Request body

- UserCreate
  - `username` string, required
  - `password` string, password, required
  - `roleId` integer, required — Role ID (1: admin, 2: editor, 3: viewer, 4: superadmin)
  - `profile` object
    - `firstName` string
    - `lastName` string
    - `email` string, email

## Response `201`

User created successfully

- User
  - `id` integer, required
  - `username` string, required
  - `role` 'admin' | 'editor' | 'viewer' | 'superadmin', required — User's role name
  - `profile` object, nullable
    - `firstName` string
    - `lastName` string
    - `email` string, email
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `400` — Invalid request parameters
- `409` — Username already exists
- `500` — Internal server error

## Changes

- **2026-07-17** `c863d4c0adcd` — 1 warning
  - added the new `superadmin` enum value to the `role` response property for the response status `201`
- **2025-06-18** `4e8707cf3e99` — 2 info
  - added the new optional request property `profile`
  - added the optional property `profile` to the response with the `201` status
- **2025-06-13** `1609c18b1e7f` — 2 warning, 1 info
  - removed the request property `profile`
  - removed the optional property `profile` from the response with the `201` status
  - removed the `superadmin` enum value from the `role` response property for the response status `201`

[Change history](https://skmtc.dev/nimtable/apis/nimtable-account-api/changes/acc-api/users/post.md)

---

[API](https://skmtc.dev/nimtable/apis/nimtable-account-api.md) · [All operations](https://skmtc.dev/nimtable/apis/nimtable-account-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nimtable/nimtable-account-api/revisions/c863d4c0adcd/schema)
