---
title: "Create an admin user"
method: POST
path: "/api/server/admin-user"
tags: ["Server Configuration"]
---

# Create an admin user

`POST /api/server/admin-user`

## Request body

- object
  - `username` string
  - `name` string
  - `email` string
  - `password` string

## Response `201`

User was created successfully.

- ServerAdminUser
  - `hasUser` boolean

## Other responses

- `405` — An admin user already exists.
- `500` — The user account could not be created.
- `501` — Contao console does not support the necessary contao:user:list and/or contao:user:create commands/options.
- `503` — If the PHP command line binary cannot be found.

## Changes

- **2025-03-06** `4dc3bf84edf7` — 2 info
  - the endpoint scheme security `CookieAuthentication` was added to the API
  - the endpoint scheme security `TokenAuthentication` was added to the API
- **2024-11-06** `e06d9f9dee25` — 1 breaking
  - the `password` request property's minLength was increased from `0` to `8`
- **2022-07-26** `b5e0c2bf578d` — 1 info
  - endpoint added
- **2020-07-23** `42c41034504b` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/contao/apis/contao-manager-api/changes/api/server/admin-user/post.md)

---

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