---
title: "Add User"
method: POST
path: "/api/v1/users/"
tags: ["Users"]
---

# Add User

`POST /api/v1/users/`

Add a new user to the database.

This endpoint backs two flows that share the same route:

* Public sign up (unauthenticated). Allowed only when public registration is
  enabled for the deployment, i.e. AUTO_LOGIN is off (multi-user mode) and
  ENABLE_SIGNUP is True.
* Admin "add user" (authenticated active superuser). Always allowed,
  regardless of the sign up settings, so disabling public sign up does not
  break superuser-driven user creation.

User activation is controlled by the NEW_USER_IS_ACTIVE setting.

## Request body

- UserCreate
  - `optins` object, nullable
  - `password` string, required
  - `username` string, required

## Response `201`

Successful Response

- UserRead
  - `create_at` string, date-time, required
  - `id` string, uuid
  - `is_active` boolean, required
  - `is_superuser` boolean, required
  - `last_login_at` string, date-time, nullable, required
  - `optins` object, nullable
  - `profile_image` string, nullable, required
  - `store_api_key` string, nullable, required
  - `updated_at` string, date-time, required
  - `username` string, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/langflow-ai/apis/langflow.md) · [All operations](https://skmtc.net/langflow-ai/apis/langflow/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/langflow-ai/langflow/revisions/22962dc5e81b/schema)
