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

# Create User

> Creates a new user/student account.



## OpenAPI

````yaml api-reference/openapiFiles/users/Create/openapi.json post /users
openapi: 3.0.1
info:
  title: YJSG Institution APIs
  description: >-
    APIs for educational institutions to manage student accounts and track
    engagement.
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.yourjobsearchgenius.ai/v1
    description: Production server
security:
  - bearerAuth: []
paths:
  /users:
    post:
      description: Creates a new user/student account.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateUserRequest'
      responses:
        '201':
          description: User created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateUserResponse'
        '400':
          description: Unexpected error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Invalid Token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ValidationError'
        '500':
          description: Internal Server Error!
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateUserRequest:
      type: object
      properties:
        firstName:
          description: The first name of the user.
          type: string
        lastName:
          description: The last name of the user.
          type: string
        email:
          description: Email address of the user.
          type: string
          format: email
        uniqueUserId:
          description: Unique user ID assigned by the institution
          type: string
      required:
        - firstName
        - lastName
        - email
        - uniqueUserId
    CreateUserResponse:
      type: object
      properties:
        data:
          type: object
          properties:
            _id:
              description: ID of the created user (MongoDB ObjectId)
              type: string
            firstName:
              description: The first name of the user.
              type: string
            lastName:
              description: The last name of the user.
              type: string
            email:
              description: Email address of the user.
              type: string
            uniqueUserId:
              description: Unique user ID assigned by the institution
              type: string
            autoLoginUrl:
              description: Auto login URL for the user
              type: string
              format: uri
        success:
          description: Indicates if the request was successful
          type: boolean
      required:
        - data
        - success
    Error:
      required:
        - error
      type: object
      properties:
        error:
          type: string
          format: s
    ValidationError:
      type: object
      properties:
        errors:
          type: object
          properties:
            email:
              type: array
              items:
                type: string
            uniqueUserId:
              type: array
              items:
                type: string
        success:
          description: Indicates if the request was successful
          type: boolean
      required:
        - errors
        - success
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````