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

# Create a user

> Creates a new user with the given properties.



## OpenAPI

````yaml admin-openapi POST /users
openapi: 3.0.1
info:
  title: api
  version: 0.0.1
servers:
  - url: https://api.proficientai.com
    description: Production (The production environment)
  - url: https://main-64bxvpctea-uc.a.run.app
    description: Staging (The staging environment)
  - url: http://localhost:8080
    description: Development (The local environment)
security: []
paths:
  /users:
    post:
      tags:
        - Users
      summary: Create a user
      description: Creates a new user with the given properties.
      operationId: users_create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UserCreateParams'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/User'
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
components:
  schemas:
    UserCreateParams:
      title: UserCreateParams
      type: object
      description: The data with which a user is created.
      properties:
        external_id:
          $ref: '#/components/schemas/UserExternalId'
        first_name:
          $ref: '#/components/schemas/UserFirstName'
          nullable: true
        last_name:
          $ref: '#/components/schemas/UserLastName'
          nullable: true
        live_mode:
          $ref: '#/components/schemas/UserLiveMode'
          nullable: true
      required:
        - external_id
    User:
      title: User
      type: object
      description: <p>Represents a user of your project.</p>
      properties:
        id:
          $ref: '#/components/schemas/UserId'
        object:
          $ref: '#/components/schemas/UserObjectType'
        created_at:
          $ref: '#/components/schemas/CreatedAt'
        external_id:
          $ref: '#/components/schemas/UserExternalId'
        first_name:
          $ref: '#/components/schemas/UserFirstName'
        last_name:
          $ref: '#/components/schemas/UserLastName'
        live_mode:
          $ref: '#/components/schemas/UserLiveMode'
        updated_at:
          $ref: '#/components/schemas/UpdatedAt'
      required:
        - id
        - object
        - created_at
        - external_id
        - first_name
        - last_name
        - live_mode
        - updated_at
    ApiError:
      title: ApiError
      type: object
      description: >-
        Represents the general interface of an API error. The body of every
        error returned by the API contains `code` and `message` fields.
      properties:
        error:
          $ref: '#/components/schemas/ApiErrorBody'
      required:
        - error
    UserExternalId:
      title: UserExternalId
      type: string
      description: >-
        A string that uniquely identifies the user within your project. Ensure
        that this is the ID that you use to identify the user in your system
        e.g. database ID, Firebase Auth ID etc. Failing to do so may cause
        unexpected bugs and errors in your application.
    UserFirstName:
      title: UserFirstName
      type: string
      description: The first name of the user.
    UserLastName:
      title: UserLastName
      type: string
      description: The last name of the user.
    UserLiveMode:
      title: UserLiveMode
      type: boolean
      description: >-
        Whether the user exists in live mode. This will be `false` if the user
        is a test user.
    UserId:
      title: UserId
      type: string
      description: The unique identifier of the user
    UserObjectType:
      title: UserObjectType
      type: string
      enum:
        - user
      description: The type of the `User` object
    CreatedAt:
      title: CreatedAt
      type: integer
      description: >-
        The time at which the object was created, measured in milliseconds since
        the Unix epoch
    UpdatedAt:
      title: UpdatedAt
      type: integer
      description: >-
        The time at which the object was last updated, measured in milliseconds
        since the Unix epoch
    ApiErrorBody:
      title: ApiErrorBody
      type: object
      properties:
        code:
          $ref: '#/components/schemas/ApiErrorCode'
        message:
          type: string
      required:
        - code
        - message
    ApiErrorCode:
      title: ApiErrorCode
      type: string
      enum:
        - invalid_request
        - invalid_credentials
        - forbidden
        - resource_not_found
        - conflict
        - unavailable
        - unknown

````