---
title: "Create User"
method: POST
path: "/api/v1/admin/users"
tags: ["admin"]
---

# Create User

`POST /api/v1/admin/users`

Create a user (currently only bot role is supported).

## Request body

- UserCreate — Request body for creating a user
  - `username` string, required
  - `role` 'admin' | 'user' | 'bot' | 'pending', required — User roles for access control
  - `avatar_url` string, nullable

## Response `201`

Successful Response

- UserResponse — Full user information response
  - `id` string, uuid, required
  - `username` string, required
  - `avatar_url` string, nullable
  - `email` string, nullable
  - `role` string, required
  - `created_at` string, date-time, required
  - `last_login` string, date-time, nullable
  - `permissions` string[], required

## Other responses

- `422` — Validation Error

---

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