---
title: "Create User"
method: POST
path: "/auth/users"
tags: ["Users"]
---

# Create User

`POST /auth/users`

Create a new local (sylve) user in the system

## Request body

- InternalHandlersAuthCreateUserRequest
  - `admin` boolean, required
  - `auxGroupIds` integer[]
  - `disablePassword` boolean
  - `doasEnabled` boolean
  - `email` string
  - `fullName` string
  - `homeDirPerms` integer
  - `homeDirectory` string
  - `locked` boolean
  - `newPrimaryGroup` boolean
  - `password` string
  - `primaryGroupId` integer
  - `shell` string
  - `sshPublicKey` string
  - `uid` integer
  - `username` string, required

## Response `201`

User Created

- GithubComAlchemillahqSylveInternalAPIResponseGithubComAlchemillahqSylveInternalDbModelsUser
  - `data` GithubComAlchemillahqSylveInternalDbModelsUser
    - `admin` boolean
    - `createdAt` string
    - `disablePassword` boolean
    - `doasEnabled` boolean
    - `email` string
    - `fullName` string
    - `groups` GithubComAlchemillahqSylveInternalDbModelsGroup[]
      - `createdAt` string
      - `id` integer
      - `name` string
      - `notes` string
      - `updatedAt` string
      - `users` GithubComAlchemillahqSylveInternalDbModelsUser[]
    - `homeDirPerms` integer
    - `homeDirectory` string
    - `id` integer
    - `lastLoginTime` string
    - `locked` boolean
    - `notes` string
    - `primaryGroupId` integer
    - `shell` string
    - `sshPublicKey` string
    - `tokens` GithubComAlchemillahqSylveInternalDbModelsToken[]
      - `authType` string
      - `createdAt` string
      - `expiry` string
      - `id` integer
      - `token` string
      - `updatedAt` string
      - `user` GithubComAlchemillahqSylveInternalDbModelsUser — recursive
      - `userId` integer
    - `totp` string
    - `uid` integer
    - `updatedAt` string
    - `username` string
  - `error` string
  - `message` string
  - `status` string

## Other responses

- `400` — Bad Request
- `500` — Internal Server Error

---

[API](https://skmtc.net/alchemillahq/apis/sylve-api.md) · [All operations](https://skmtc.net/alchemillahq/apis/sylve-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/alchemillahq/sylve-api/revisions/950e51f8af98/schema)
