---
title: "Add a user to the tenant"
method: POST
path: "/api/v1/tenants/{id}/users"
tags: ["tenant"]
---

# Add a user to the tenant

`POST /api/v1/tenants/{id}/users`

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

## Path parameters

- `id` string, required

## Request body

- UserBody
  - `username` string — Username as an email address
  - `roles` Role[]
    - `id` string
    - `name` string
    - `permissions` Permissions[]
    - `scope` string
    - `createdAt` string
    - `updatedAt` string
    - `isGlobal` boolean
    - `description` string

## Response `200`

Success

## Changes

- **2022-08-18** `016871a170fd` — 1 breaking, 1 info
  - api path removed without deprecation
  - endpoint added
- **2021-08-09** `214f3986034a` — 2 info
  - added the new optional request property `roles/items/description`
  - added the new optional request property `roles/items/isGlobal`
- **2021-08-06** `e3cb40d13d06` — 2 warning, 2 info
  - removed the request property `roles/items/isCreated`
  - removed the request property `roles/items/isUpdated`
  - added the new optional request property `roles/items/createdAt`
  - added the new optional request property `roles/items/updatedAt`
- **2021-08-06** `3c703fa51ebd` — 3 info
  - added the new optional request property `roles/items/id`
  - added the new optional request property `roles/items/isCreated`
  - added the new optional request property `roles/items/isUpdated`
- **2021-08-06** `e366ae458db2` — 1 warning, 1 info
  - removed the request property `roles/items/description`
  - added the new optional request property `roles/items/scope`

[Full history](https://skmtc.dev/openintegrationhub/apis/iam-api-for-oih/changes/api/v1/tenants/:id/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/016871a170fd/schema)
