---
title: "Create User"
method: POST
path: "/api/auth/user"
tags: ["Auth API"]
---

# Create User

`POST /api/auth/user`

## Request

- The document declares no server URL.
- Auth: none declared

Create a new user.

Args:
    request: CreateUserRequest with user details
    created_by: Authenticated user making the request

Returns:
    Created User object

## Headers

- `x-osmo-user` string, nullable

## Request body

- CreateUserRequest: Request to create a new user.
  - `id` string, required
  - `roles` string[], nullable

## Response `200`

Successful Response

- User: User record.
  - `id` string, required
  - `created_at` string, date-time, nullable
  - `created_by` string, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-08-03** `b9d312a13f5d`: 2 info
  - added the optional property `detail/items/ctx` to the response with the `422` status
  - added the optional property `detail/items/input` to the response with the `422` status
- **2026-04-08** `a8157dc3279d`: 2 breaking, 3 info
  - response property `created_at` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - response property `created_by` list-of-types was widened by adding types `null` to media type `application/json` of response `200`
  - `header` request parameter `x-osmo-user` list-of-types was widened by adding types `null`
  - for the `header` request parameter `x-osmo-user`, the type was generalized from `string` to no type
  - …1 more
- **2026-02-27** `3b4b243276b5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/nvidia/apis/nvidia-corporation-osmo-api/changes/api/auth/user/post.md)

---

[API](https://skmtc.dev/nvidia/apis/nvidia-corporation-osmo-api.md) - [All operations](https://skmtc.dev/nvidia/apis/nvidia-corporation-osmo-api/llms.txt) - [OpenAPI document](https://skmtc.dev/nvidia/apis/nvidia-corporation-osmo-api/revisions/845585a71dbb?raw)
