---
title: "Provision User"
method: POST
path: "/management/v1/user"
tags: ["user"]
---

# Provision User

`POST /management/v1/user`

## Request

- Base URL: `https://localhost`
- URL: `https://localhost/management/v1/user`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/lakekeeper/apis/lakekeeper-management-api/docs/management/v1/user/post.ts> (a function with typed inputs; its response is checked against the schema)

Creates a new user or updates an existing user's metadata from the provided token.
The token should include "profile" and "email" scopes for complete user information.

## Request body

- CreateUserRequest
  - `email` string, nullable: Email of the user. If id is not specified, the email is extracted from the provided token.
  - `id` string, nullable: Subject id of the user - allows user provisioning. The id must be identical to the subject in JWT tokens, prefixed with `<idp-identifier>~`. For example: `oidc~1234567890` for OIDC users or `kubernetes~1234567890` for Kubernetes users. To create users in self-service manner, do not set the id. The id is then extracted from the passed JWT token.
  - `name` string, nullable: Name of the user. If id is not specified, the name is extracted from the provided token.
  - `update-if-exists` boolean: Update the user if it already exists Default: false
  - `user-type` 'human' | 'application': Type of a User

## Response `200`

User updated

- User: User of the catalog
  - `created-at` string, date-time, required: Timestamp when the user was created
  - `email` string, nullable: Email of the user
  - `id` string, required: The user's ID
  - `last-updated-with` 'create-endpoint' | 'config-call-creation' | 'update-endpoint' | 'role-provider', required: How the user was last updated
  - `name` string, required: Name of the user
  - `updated-at` string, date-time, nullable: Timestamp when the user was last updated
  - `user-type` 'human' | 'application', required: Type of a User

## Other responses

- `201`: User created
- `4XX`

---

[API](https://skmtc.dev/lakekeeper/apis/lakekeeper-management-api.md) - [All operations](https://skmtc.dev/lakekeeper/apis/lakekeeper-management-api/llms.txt) - [OpenAPI document](https://skmtc.dev/lakekeeper/apis/lakekeeper-management-api/revisions/c5cb9a12a98c?raw)
