---
title: "Create a new user"
method: POST
path: "/users"
tags: ["Users"]
---

# Create a new user

`POST /users`

## Request body

- object
  - `username` string, required
  - `password` string, required
  - `email` string, email
  - `role` string
  - `role_id` string — MongoDB ObjectId represented as a hexadecimal string

## Response `200`

User created successfully

- Success
  - `code` integer
  - `message` string
  - `data` object

## Other responses

- `400` — Bad request

## Changes

- **2025-03-02** `526e5bdf6dee` — 3 breaking, 17 warning, 8 info
  - added the new required request property `password`
  - added the new required request property `username`
  - request body became required
  - removed the request property `data`
  - …24 more

[Change history](https://skmtc.dev/crawlab-team/apis/crawlab-api/changes/users/post.md)

---

[API](https://skmtc.dev/crawlab-team/apis/crawlab-api.md) · [All operations](https://skmtc.dev/crawlab-team/apis/crawlab-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/crawlab-team/crawlab-api/revisions/526e5bdf6dee/schema)
