---
title: "Create a new user"
method: POST
path: "/api/user/new"
tags: ["Users"]
---

# Create a new user

`POST /api/user/new`

Creates a user with a given e-mail address and password.
Requires `admin` privileges or the `access_user_info` + `create_user` permissions.

## Request body

- object
  - `username` string, email, required — The user's e-mail address.
  - `password` string — The user's password (min 4, max 254 characters). If omitted, a random password is generated.
  - `privileges` union — Privilege(s) to assign. Defaults to ["user"].
    - string
    - string[]
  - `first_name` string
  - `last_name` string
  - `country` string
  - `subdivisionfirst` string
  - `subdivisionsecond` string
  - `subdivisionthird` string
  - `organization` string
  - `timezone` string
  - `language` string

## Response `200`

User created successfully.

- object
  - `user_id` integer
  - `password` string

## Other responses

- `400` — Bad request.
- `403` — Access denied.

---

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