---
title: "Create New Users"
url: "https://public-api-docs.cipherscale.com/apis/cipherscale-api-1/versions/fef69080-6094-4620-8bf0-16fd2de7b598/operations/UsersController_create"
---

> Full API specification: https://public-api-docs.cipherscale.com/apis/cipherscale-api-1/versions/fef69080-6094-4620-8bf0-16fd2de7b598.md

# Create New Users

`POST` `/tenants/users`

Operation ID: `UsersController_create`

Creates one or more user accounts for the tenant. Supports bulk creation of up to 100 users in a single request. New users will receive invitation emails to complete their account setup.

## Request body (required)

Content types: `application/json`

## Responses

- `201` - Successfully created user(s)
- `400` - Invalid user data or too many users provided (max 100)
- `401` - Unauthorized - Invalid or missing authentication token
- `403` - Forbidden - Insufficient permissions to perform this operation.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Cipherscale API
  version: "1.0"
servers:
  - url: https://public-api.cipherscale.com/qa
    description: Cipherscale Public API Server
paths:
  /tenants/users:
    post:
      operationId: UsersController_create
      summary: Create New Users
      description: Creates one or more user accounts for the tenant. Supports bulk
        creation of up to 100 users in a single request. New users will receive
        invitation emails to complete their account setup.
      requestBody:
        required: true
        description: User data to create. Can be a single user object or an array of
          user objects (max 100).
        content:
          application/json:
            schema:
              oneOf:
                - $ref: "#/components/schemas/CreateUserDto"
                - type: array
                  items:
                    $ref: "#/components/schemas/CreateUserDto"
                  maxItems: 100
      responses:
        "201":
          description: Successfully created user(s)
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: "#/components/schemas/UserDto"
                  - type: object
                    additionalProperties:
                      oneOf:
                        - $ref: "#/components/schemas/UserDto"
                        - type: string
        "400":
          description: Invalid user data or too many users provided (max 100)
        "401":
          description: Unauthorized - Invalid or missing authentication token
        "403":
          description: Forbidden - Insufficient permissions to perform this operation.
      tags:
        - Users
      security:
        - ApiKeyAuth: []
security:
  - ApiKeyAuth: []
components:
  schemas:
    CreateUserDto:
      type: object
      properties:
        email:
          type: string
        groups:
          type: array
          items:
            type: string
            format: uuid
      required:
        - email
        - groups
    UserDto:
      type: object
      description: Complete user profile with authentication, authorization, and
        device information
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the user
        createdAt:
          format: date-time
          type: string
          description: Timestamp when the user account was created
        updatedAt:
          format: date-time
          type: string
          description: Timestamp when the user account was last modified
        lastConnection:
          format: date-time
          type: string
          description: Timestamp of the user's last network connection
        email:
          type: string
          description: User's email address used for authentication
        status:
          type: string
          description: Current status of the user account (active, inactive, pending, etc.)
        firstName:
          type: string
          description: User's first name
        lastName:
          type: string
          description: User's last name
        isOwner:
          type: boolean
          description: Whether this user is the tenant owner
        maxDevices:
          type: number
          nullable: true
          description: Maximum number of devices this user can register
        image:
          type: string
          description: URL or path to the user's profile image
        roles:
          type: array
          items:
            $ref: "#/components/schemas/RoleDto"
          description: List of roles assigned to this user
        groups:
          type: array
          items:
            $ref: "#/components/schemas/UserGroupDto"
          description: List of groups this user belongs to
        devices:
          type: array
          items:
            $ref: "#/components/schemas/DeviceDto"
          description: List of devices registered to this user
      required:
        - id
        - createdAt
        - updatedAt
        - status
        - isOwner
        - maxDevices
        - roles
        - groups
        - devices
    RoleDto:
      type: object
      description: User role definition with specific permissions and capabilities
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the role
        createdAt:
          format: date-time
          type: string
          description: Timestamp when the role was created
        updatedAt:
          format: date-time
          type: string
          description: Timestamp when the role was last modified
        name:
          type: string
          description: Human-readable name of the role
        description:
          type: string
          description: Detailed description of the role's purpose and permissions
        deleteable:
          type: boolean
          description: Whether this role can be deleted (system roles are typically not
            deletable)
        type:
          enum:
            - OWNER
            - ADMIN
            - DEFAULT
            - BASIC
            - BILLING
            - AUDITOR
          type: string
          description: Predefined role type that determines the base permissions
      required:
        - id
        - createdAt
        - updatedAt
        - name
        - deleteable
        - type
    UserGroupDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
        createdAt:
          format: date-time
          type: string
        updatedAt:
          format: date-time
          type: string
        name:
          type: string
        description:
          type: string
      required:
        - id
        - createdAt
        - updatedAt
        - name
    DeviceDto:
      type: object
      description: Device information including connection status, user association,
        and security posture
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier for the device
        createdAt:
          format: date-time
          type: string
          description: Timestamp when the device was registered
        updatedAt:
          format: date-time
          type: string
          description: Timestamp when the device information was last updated
        name:
          type: string
          description: Human-readable name for the device
        active:
          type: boolean
          description: Whether the device is currently active and can connect
        lastConnection:
          format: date-time
          type: string
          description: Timestamp of the device's last network connection
        status:
          enum:
            - Online
            - Offline
            - Deactivated
          type: string
          description: Current connection status of the device
        user:
          $ref: "#/components/schemas/DeviceUserDto"
          description: Information about the user who owns this device
        hardwareId:
          type: string
          description: Unique hardware identifier for the device
        posture:
          type: object
          description: Security posture information and compliance status
        appVersion:
          type: string
          description: Version of the Cipherscale client application installed on the device
      required:
        - id
        - createdAt
        - updatedAt
        - name
        - active
        - status
        - hardwareId
    DeviceUserDto:
      type: object
      properties:
        id:
          type: string
          format: uuid
        lastConnection:
          format: date-time
          type: string
        email:
          type: string
        firstName:
          type: string
        lastName:
          type: string
      required:
        - id
        - lastConnection
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: apikey
```
