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

# Create Or Verify User

> Create a new system user with an email and password.

If no admin exists (first user), the user will be created as an admin.

Otherwise:
- User record was already created when the admin invited the user
- We should verify the user's email



## OpenAPI

````yaml https://api.galileo.ai/public/v2/openapi.json post /v2/system_users
openapi: 3.1.0
info:
  title: FastAPI
  version: 0.1.0
servers:
  - url: https://api.galileo.ai
    description: Galileo Public APIs - galileo-v2
security: []
paths:
  /v2/system_users:
    post:
      tags:
        - system_users
        - users
      summary: Create Or Verify User
      description: |-
        Create a new system user with an email and password.

        If no admin exists (first user), the user will be created as an admin.

        Otherwise:
        - User record was already created when the admin invited the user
        - We should verify the user's email
      operationId: create_or_verify_user_v2_system_users_post
      parameters:
        - name: signup_token
          in: query
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: Signup Token
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreate'
              examples:
                - email: user@example.com
                  first_name: Alice
                  last_name: Appleseed
                  auth_method: email
                  password: Th3secret_
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SystemUserDB'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    UserCreate:
      properties:
        email:
          type: string
          format: email
          title: Email
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
          default: ''
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
          default: ''
        auth_method:
          $ref: '#/components/schemas/AuthMethod'
          default: email
        role:
          $ref: '#/components/schemas/UserRole'
          default: read_only
        email_is_verified:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Email Is Verified
          default: false
        password:
          anyOf:
            - type: string
              format: password
              writeOnly: true
            - type: 'null'
          title: Password
      type: object
      required:
        - email
      title: UserCreate
    SystemUserDB:
      properties:
        id:
          type: string
          format: uuid4
          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
        first_name:
          anyOf:
            - type: string
            - type: 'null'
          title: First Name
        last_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Name
        email_is_verified:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Email Is Verified
        status:
          $ref: '#/components/schemas/SystemUserStatus'
        role:
          $ref: '#/components/schemas/SystemRole'
        auth_method:
          type: string
          title: Auth Method
      type: object
      required:
        - id
        - created_at
        - updated_at
        - email
        - status
        - role
        - auth_method
      title: SystemUserDB
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    AuthMethod:
      type: string
      enum:
        - email
        - google
        - github
        - okta
        - azure-ad
        - custom
        - saml
        - invite
      title: AuthMethod
    UserRole:
      type: string
      enum:
        - admin
        - manager
        - user
        - read_only
      title: UserRole
    SystemUserStatus:
      type: string
      enum:
        - requested
        - invited
        - enabled
        - disabled
      title: SystemUserStatus
    SystemRole:
      type: string
      enum:
        - system_admin
        - system_user
      title: SystemRole
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError

````