> ## Documentation Index
> Fetch the complete documentation index at: https://docs.y.uno/llms.txt
> Use this file to discover all available pages before exploring further.

# Create User

> Creates a new user. Users are created in DB only (no Auth0/WorkOS). The user must be created with at least one permission assignment: either account_permissions, account_group_permissions, or both.

Creates a new user within your organization. Users created via this API are stored directly in the Yuno database and are not managed via external identity providers like SAML or WorkOS.

Every user must be created with at least one permission assignment at either the account or account group level.


## OpenAPI

````yaml openapi/organizations/create-user.json POST /organizations/users
openapi: 3.1.0
info:
  title: Users API - Create
  version: 1.0.0
servers:
  - url: https://api-sandbox.y.uno/v1
security:
  - sec0: []
    sec1: []
paths:
  /organizations/users:
    post:
      summary: Create User
      description: >-
        Creates a new user. Users are created in DB only (no Auth0/WorkOS). The
        user must be created with at least one permission assignment: either
        account_permissions, account_group_permissions, or both.
      operationId: create-user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - email
                - first_name
                - last_name
              properties:
                email:
                  type: string
                  format: email
                  description: User email address.
                first_name:
                  type: string
                  description: First name.
                last_name:
                  type: string
                  description: Last name.
                account_permissions:
                  type: array
                  description: Direct account permission assignments.
                  items:
                    type: object
                    required:
                      - account_id
                      - role_id
                    properties:
                      account_id:
                        type: string
                        format: uuid
                        description: Account UUID (must belong to the org).
                      role_id:
                        type: string
                        description: Role ID (non-admin, non-staff, org-scoped).
                account_group_permissions:
                  type: array
                  description: Account group permission assignments.
                  items:
                    type: object
                    required:
                      - account_group_id
                      - role_id
                    properties:
                      account_group_id:
                        type: string
                        format: uuid
                        description: Account group UUID (must belong to the org).
                      role_id:
                        type: string
                        description: Role ID (non-admin, non-staff, org-scoped).
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                  email:
                    type: string
                  first_name:
                    type: string
                  last_name:
                    type: string
                  account_permissions:
                    type: array
                    items:
                      type: object
                      properties:
                        account_id:
                          type: string
                          format: uuid
                        role_id:
                          type: string
                  account_group_permissions:
                    type: array
                    items:
                      type: object
                      properties:
                        account_group_id:
                          type: string
                          format: uuid
                        role_id:
                          type: string
                  created_at:
                    type: string
                    format: date-time
                  updated_at:
                    type: string
                    format: date-time
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: PUBLIC-API-KEY
      x-default: <Your PUBLIC-API-KEY>
    sec1:
      type: apiKey
      in: header
      name: PRIVATE-SECRET-KEY
      x-default: <Your PRIVATE-SECRET-KEY>

````