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

# Add user

> Adds a user to the workspace.

<Info>Replace `{your-subdomain}` with your workspace's subdomain. <br /> Learn how to find your subdomain in [Workspace subdomain](/getting-started/workspace-subdomain).</Info>


## OpenAPI

````yaml bundled/users.yaml POST /users
openapi: 3.0.3
info:
  title: NeetoAuth APIs
  version: 1.0.0
servers:
  - description: NeetoAuth APIs
    url: https://{your-subdomain}.neetoauth.com/api/external/v2
    variables:
      your-subdomain:
        default: spinkart
        description: >-
          Replace **spinkart** with your [workspace's
          subdomain](/getting-started/workspace-subdomain).
security: []
paths:
  /users:
    post:
      summary: Add a user
      description: Adds a user to the workspace.
      parameters:
        - $ref: '#/components/parameters/api_key_header'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUserRequest'
      responses:
        '201':
          description: Created - User created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UserWithApps'
components:
  parameters:
    api_key_header:
      in: header
      name: X-Api-Key
      description: >-
        Use the X-Api-Key header to provide your workspace API key. Refer to
        [Authentication](/getting-started/authentication) for more information.
      required: true
      schema:
        type: string
  schemas:
    CreateUserRequest:
      type: object
      properties:
        user:
          type: object
          properties:
            email:
              type: string
              format: email
              description: Email of the user.
              example: oliver@example.com
            role:
              type: string
              description: Role of the user.
              enum:
                - owner
                - non_owner
              example: non_owner
            first_name:
              type: string
              description: First name of the user. Defaults to "-" when omitted.
              example: Oliver
            last_name:
              type: string
              description: Last name of the user. Defaults to "-" when omitted.
              example: Smith
            apps:
              type: array
              description: Product roles to assign to the user.
              items:
                $ref: '#/components/schemas/CreateUserApp'
          required:
            - email
            - role
            - apps
          description: >-
            If the email belongs to a deactivated user, that user is reactivated
            with the supplied attributes.
      required:
        - user
    UserWithApps:
      allOf:
        - $ref: '#/components/schemas/User'
        - type: object
          properties:
            apps:
              type: array
              items:
                $ref: '#/components/schemas/UserApp'
              example:
                - name: Cal
                  role: Admin
    CreateUserApp:
      type: object
      properties:
        name:
          type: string
          description: >-
            Product name returned by the [List available
            products](/api-reference/products/list) endpoint.
          example: Cal
        role:
          type: string
          description: Role returned in the product's roles list.
          example: Admin
      required:
        - name
        - role
    User:
      type: object
      properties:
        email:
          type: string
          format: email
          example: oliver@example.com
        role:
          type: string
          example: non_owner
        first_name:
          type: string
          example: Oliver
        last_name:
          type: string
          example: Smith
    UserApp:
      type: object
      properties:
        name:
          type: string
          example: Cal
        role:
          type: string
          example: Admin

````