---
title: "Create a SCIM user"
method: POST
path: "/api/organizations/{name}/scim/v2/Users"
tags: ["scim"]
---

# Create a SCIM user

`POST /api/organizations/{name}/scim/v2/Users`

Creates a new user in the organization. If the user already exists, only `active` field will be updated to provision the user.

## Path parameters

- `name` string, required

## Request body

- object
  - `schemas` string[], required
  - `userName` string, required — Username for the user, it should respect the hub rules: No consecutive dashes, No digit-only, Does not start or end with a dash, Only dashes, letters or numbers, Not 24 chars hex string
  - `emails` object[], required
    - `value` string, email, required
  - `name` object, required
    - `givenName` string, required
    - `familyName` string, required
  - `active` boolean
  - `externalId` string, required — External ID for the user, it must be unique within the organization and is required for managed users

## Response `201`

SCIM User

- object
  - `schemas` string[], required
  - `id` string, required
  - `externalId` string, nullable, required
  - `userName` string, required
  - `displayName` string, required
  - `name` object, required
    - `givenName` string, required
    - `familyName` string, required
    - `formatted` string, required
  - `emails` object[], required
    - `value` string, required
    - `primary` boolean, required
    - `type` 'work' — We only support work emails, other types are converted to work
  - `active` boolean, required
  - `meta` object, required
    - `resourceType` 'User', required
    - `location` string, required

## Other responses

- `409` — SCIM User already exists

---

[API](https://skmtc.net/huggingface/apis/hub-api-endpoints.md) · [All operations](https://skmtc.net/huggingface/apis/hub-api-endpoints/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/huggingface/hub-api-endpoints/versions/dae0cc3790f0/schema)
