---
title: "Create Admin"
method: POST
path: "/api/admin"
tags: ["Admin"]
---

# Create Admin

`POST /api/admin`

Create a new admin if the current admin has sudo privileges.

## Request body

- AdminCreate
  - `username` string, required
  - `is_sudo` boolean, required
  - `telegram_id` integer, nullable
  - `discord_webhook` string, nullable
  - `users_usage` integer, nullable
  - `password` string, required

## Response `200`

Successful Response

- Admin
  - `username` string, required
  - `is_sudo` boolean, required
  - `telegram_id` integer, nullable
  - `discord_webhook` string, nullable
  - `users_usage` integer, nullable

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `409` — Conflict
- `422` — Validation Error

---

[API](https://skmtc.dev/atrvatam/apis/marzbanapi.md) · [All operations](https://skmtc.dev/atrvatam/apis/marzbanapi/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/atrvatam/marzbanapi/revisions/0aa31d6bd001/schema)
