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

# Create user

`POST /users`

This can only be done by a logged in user who has the required privileges.

## Request body

- UserObject
  - `id` string — User Id
  - `username` string, required — Username as an email address
  - `firstname` string, required — firstname
  - `lastname` string, required — lastname
  - `status` 'active' | 'pending' | 'disabled'
  - `role` Role, required
    - `name` string
    - `permissions` string[]
    - `tenant` string
    - `scope` string
  - `confirmed` boolean — true, if the confirmation link/email has been triggered
  - `img` string — url to user image

## Response `200`

Id of created user

- UserObject
  - `id` string — User Id
  - `username` string, required — Username as an email address
  - `firstname` string, required — firstname
  - `lastname` string, required — lastname
  - `status` 'active' | 'pending' | 'disabled'
  - `role` Role, required
    - `name` string
    - `permissions` string[]
    - `tenant` string
    - `scope` string
  - `confirmed` boolean — true, if the confirmation link/email has been triggered
  - `img` string — url to user image

## Changes

- **2019-05-07** `8a89a8f58853` — 4 breaking, 1 warning, 13 info
  - removed the enum value `ADMIN` of the request property `role`
  - removed the enum value `USER` of the request property `role`
  - the `role` request property type changed from `string` to `object`
  - the response's body type changed from no type to `object` for status `200`
  - …14 more
- **2018-12-03** `a85cff4a1faa` — 6 breaking, 5 warning, 2 info
  - removed the enum value `INSTANCE_ADMIN` of the request property `role`
  - the response's body type changed from `object` to no type for status `200`
  - removed the required property `firstname` from the response with the `200` status
  - removed the required property `lastname` from the response with the `200` status
  - …9 more
- **2018-07-12** `1cc80c847b7e` — 1 breaking, 1 warning, 2 info
  - added the new required request property `role`
  - removed the request property `password`
  - added the new optional request property `id`
  - added the required property `role` to the response with the `200` status

[Change history](https://skmtc.dev/openintegrationhub/apis/iam-api-for-oih/changes/users/post.md)

---

[API](https://skmtc.dev/openintegrationhub/apis/iam-api-for-oih.md) · [All operations](https://skmtc.dev/openintegrationhub/apis/iam-api-for-oih/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/openintegrationhub/iam-api-for-oih/revisions/8a89a8f58853/schema)
