> ## Documentation Index
> Fetch the complete documentation index at: https://arizeai-433a7140.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a new user

> Create a new user with the specified configuration.



## OpenAPI

````yaml post /v1/users
openapi: 3.1.0
info:
  title: Arize-Phoenix REST API
  description: Schema for Arize-Phoenix REST API
  version: '1.0'
servers: []
security: []
paths:
  /v1/users:
    post:
      tags:
        - users
      summary: Create a new user
      description: Create a new user with the specified configuration.
      operationId: createUser
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUserRequestBody'
      responses:
        '201':
          description: The newly created user.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateUserResponseBody'
        '400':
          content:
            text/plain:
              schema:
                type: string
          description: Role not found.
        '403':
          description: Forbidden
          content:
            text/plain:
              schema:
                type: string
        '409':
          content:
            text/plain:
              schema:
                type: string
          description: Username or email already exists.
        '422':
          description: Unprocessable Entity
          content:
            text/plain:
              schema:
                type: string
components:
  schemas:
    CreateUserRequestBody:
      properties:
        user:
          oneOf:
            - $ref: '#/components/schemas/LocalUserData'
            - $ref: '#/components/schemas/OAuth2UserData'
            - $ref: '#/components/schemas/LDAPUserData'
          title: User
          discriminator:
            propertyName: auth_method
            mapping:
              LDAP:
                $ref: '#/components/schemas/LDAPUserData'
              LOCAL:
                $ref: '#/components/schemas/LocalUserData'
              OAUTH2:
                $ref: '#/components/schemas/OAuth2UserData'
        send_welcome_email:
          type: boolean
          title: Send Welcome Email
          default: true
      type: object
      required:
        - user
      title: CreateUserRequestBody
    CreateUserResponseBody:
      properties:
        data:
          oneOf:
            - $ref: '#/components/schemas/LocalUser'
            - $ref: '#/components/schemas/OAuth2User'
            - $ref: '#/components/schemas/LDAPUser'
          title: Data
          discriminator:
            propertyName: auth_method
            mapping:
              LDAP:
                $ref: '#/components/schemas/LDAPUser'
              LOCAL:
                $ref: '#/components/schemas/LocalUser'
              OAUTH2:
                $ref: '#/components/schemas/OAuth2User'
      type: object
      required:
        - data
      title: CreateUserResponseBody
    LocalUserData:
      properties:
        email:
          type: string
          title: Email
        username:
          type: string
          title: Username
        role:
          type: string
          enum:
            - SYSTEM
            - ADMIN
            - MEMBER
            - VIEWER
          title: Role
        auth_method:
          type: string
          const: LOCAL
          title: Auth Method
        password:
          type: string
          title: Password
      type: object
      required:
        - email
        - username
        - role
        - auth_method
      title: LocalUserData
    OAuth2UserData:
      properties:
        email:
          type: string
          title: Email
        username:
          type: string
          title: Username
        role:
          type: string
          enum:
            - SYSTEM
            - ADMIN
            - MEMBER
            - VIEWER
          title: Role
        auth_method:
          type: string
          const: OAUTH2
          title: Auth Method
        oauth2_client_id:
          type: string
          title: Oauth2 Client Id
        oauth2_user_id:
          type: string
          title: Oauth2 User Id
      type: object
      required:
        - email
        - username
        - role
        - auth_method
      title: OAuth2UserData
    LDAPUserData:
      properties:
        email:
          type: string
          title: Email
        username:
          type: string
          title: Username
        role:
          type: string
          enum:
            - SYSTEM
            - ADMIN
            - MEMBER
            - VIEWER
          title: Role
        auth_method:
          type: string
          const: LDAP
          title: Auth Method
      type: object
      required:
        - email
        - username
        - role
        - auth_method
      title: LDAPUserData
    LocalUser:
      properties:
        id:
          type: string
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        email:
          type: string
          title: Email
        username:
          type: string
          title: Username
        role:
          type: string
          enum:
            - SYSTEM
            - ADMIN
            - MEMBER
            - VIEWER
          title: Role
        auth_method:
          type: string
          const: LOCAL
          title: Auth Method
        password:
          type: string
          title: Password
        password_needs_reset:
          type: boolean
          title: Password Needs Reset
      type: object
      required:
        - id
        - created_at
        - updated_at
        - email
        - username
        - role
        - auth_method
        - password_needs_reset
      title: LocalUser
    OAuth2User:
      properties:
        id:
          type: string
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        email:
          type: string
          title: Email
        username:
          type: string
          title: Username
        role:
          type: string
          enum:
            - SYSTEM
            - ADMIN
            - MEMBER
            - VIEWER
          title: Role
        auth_method:
          type: string
          const: OAUTH2
          title: Auth Method
        oauth2_client_id:
          type: string
          title: Oauth2 Client Id
        oauth2_user_id:
          type: string
          title: Oauth2 User Id
        profile_picture_url:
          type: string
          title: Profile Picture Url
      type: object
      required:
        - id
        - created_at
        - updated_at
        - email
        - username
        - role
        - auth_method
      title: OAuth2User
    LDAPUser:
      properties:
        id:
          type: string
          title: Id
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        email:
          type: string
          title: Email
        username:
          type: string
          title: Username
        role:
          type: string
          enum:
            - SYSTEM
            - ADMIN
            - MEMBER
            - VIEWER
          title: Role
        auth_method:
          type: string
          const: LDAP
          title: Auth Method
      type: object
      required:
        - id
        - created_at
        - updated_at
        - email
        - username
        - role
        - auth_method
      title: LDAPUser

````