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

# Add a new user.



## OpenAPI

````yaml /openapi/chat-client.yaml post /users
openapi: 3.0.3
info:
  version: 1.0.0
  title: HealviChat Client API
servers:
  - url: https://{tenant_domain}/third-party/v1
    variables:
      tenant_domain:
        default: your-tenant.onhealvi.com
        description: Your tenant domain
security:
  - bearerAuth: []
paths:
  /users:
    post:
      tags:
        - users
      summary: Add a new user.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                email:
                  description: Must be unique across users.
                  type: string
                is_admin:
                  type: boolean
                external_id:
                  type: string
                  nullable: true
                external_group:
                  type: string
                  nullable: true
                pin:
                  description: Optional user switch pin. Must be 6 digits.
                  type: number
                  nullable: true
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
components:
  schemas:
    User:
      description: |
        User from business which operates this app.
      type: object
      properties:
        id:
          type: integer
          description: Internal ID.
        name:
          type: string
        email:
          type: integer
          nullable: true
        roles:
          description: List of roles. "admin" has all permissions implicitly.
          type: array
          items:
            type: string
        permissions:
          description: List of permissions.
          type: array
          items:
            type: string
        has_password:
          type: boolean
        has_pin:
          type: boolean
        created_at:
          type: string
          format: date-time
          nullable: true
          example: '2023-01-01T12:00:00Z'
        updated_at:
          type: string
          format: date-time
          nullable: true
          example: '2023-01-01T12:00:00Z'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````