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

# Create a new user

`POST /api/v1/users`

Create a new user in the system

## Request body

- CreateUserInput
  - `name` string, required
  - `oauth_provider` string
  - `oauth_provider_data` object
  - `oauth_provider_id` string
  - `password` string
  - `profile_picture` string
  - `role_names` string[], required
  - `username` string, required

## Response `200`

OK

- User
  - `active` boolean
  - `created_at` string
  - `id` string
  - `identities` UserIdentity[]
    - `created_at` string
    - `id` string
    - `provider` string
    - `provider_data` object
    - `provider_email` string
    - `provider_user_id` string
    - `updated_at` string
    - `user_id` string
  - `must_change_password` boolean
  - `name` string
  - `preferences` object
  - `profile_picture` string
  - `roles` Role[]
    - `description` string
    - `id` string
    - `name` string
    - `permissions` Permission[]
      - `action` string
      - `description` string
      - `id` string
      - `name` string
      - `resource_type` string
  - `updated_at` string
  - `username` string

## Other responses

- `400` — Bad Request
- `409` — Conflict

---

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