---
title: "Create a user."
method: POST
path: "/user"
tags: ["user"]
---

# Create a user.

`POST /user`

With enabled registration: non admin users can be created without authentication.
With disabled registrations: users can only be created by admin users.

Requires elevated authentication.

## Request body

- CreateUserExternal — Used for user creation.
  - `admin` boolean, required — If the user is an administrator.
  - `name` string, required — The user name. For login.
  - `pass` string, required — The user password. For login.

## Response `200`

Ok

- User — The User holds information about permission and other stuff.
  - `admin` boolean, required — If the user is an administrator.
  - `createdAt` string, date-time, required — The date the user was created.
  - `id` integer, required — The user id.
  - `name` string, required — The user name. For login.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden

---

[API](https://skmtc.net/gotify/apis/gotify-rest-api.md) · [All operations](https://skmtc.net/gotify/apis/gotify-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/gotify/gotify-rest-api/revisions/7b32fcdb1345/schema)
