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

# Log in

> Log in



## OpenAPI

````yaml /api-reference/openapi.json post /api/auth/login
openapi: 3.1.0
info:
  title: ontime API
  description: APIs for ontime.v2
  version: 1.0.0
servers:
  - url: https://app.ontime.hosai.app
    description: Production
security:
  - apiKey: []
paths:
  /api/auth/login:
    post:
      tags:
        - Auth
      summary: Log in
      description: Log in
      operationId: postApiAuthLogin
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                  pattern: >-
                    ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                password:
                  type: string
                  minLength: 1
              required:
                - email
                - password
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  user:
                    type: object
                    properties:
                      id:
                        type: string
                        format: uuid
                        pattern: >-
                          ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                      email:
                        type: string
                        format: email
                        pattern: >-
                          ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                      fullName:
                        type: string
                      platformRole:
                        anyOf:
                          - type: string
                            enum:
                              - SuperAdmin
                          - type: 'null'
                    required:
                      - id
                      - email
                      - fullName
                      - platformRole
                  memberships:
                    type: array
                    items:
                      type: object
                      properties:
                        orgId:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        orgName:
                          type: string
                        employeeId:
                          type: string
                          format: uuid
                          pattern: >-
                            ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                        roleName:
                          type: string
                      required:
                        - orgId
                        - orgName
                        - employeeId
                        - roleName
                  active:
                    anyOf:
                      - type: object
                        properties:
                          id:
                            type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          code:
                            type: string
                            minLength: 1
                          fullName:
                            type: string
                            minLength: 1
                          email:
                            type: string
                            format: email
                            pattern: >-
                              ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                          mobile:
                            type: string
                          designation:
                            type: string
                          departmentId:
                            anyOf:
                              - type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              - type: 'null'
                          locationId:
                            anyOf:
                              - type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              - type: 'null'
                          managerId:
                            anyOf:
                              - type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              - type: 'null'
                          shiftTemplateId:
                            anyOf:
                              - type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              - type: 'null'
                          employmentType:
                            type: string
                            enum:
                              - FullTime
                              - Probation
                              - Contract
                          joinedDate:
                            type: string
                            pattern: ^\d{4}-\d{2}-\d{2}$
                          status:
                            type: string
                            enum:
                              - Active
                              - Probation
                              - Onboarding
                              - Exited
                          exitDate:
                            anyOf:
                              - type: string
                                pattern: ^\d{4}-\d{2}-\d{2}$
                              - type: 'null'
                          roleId:
                            type: string
                            format: uuid
                            pattern: >-
                              ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                          firstName:
                            anyOf:
                              - type: string
                              - type: 'null'
                          middleName:
                            anyOf:
                              - type: string
                              - type: 'null'
                          lastName:
                            anyOf:
                              - type: string
                              - type: 'null'
                          preferredName:
                            anyOf:
                              - type: string
                              - type: 'null'
                          dob:
                            anyOf:
                              - type: string
                                pattern: ^\d{4}-\d{2}-\d{2}$
                              - type: 'null'
                          gender:
                            anyOf:
                              - type: string
                                enum:
                                  - Male
                                  - Female
                                  - Other
                                  - Undisclosed
                              - type: 'null'
                          maritalStatus:
                            anyOf:
                              - type: string
                                enum:
                                  - Single
                                  - Married
                                  - Other
                              - type: 'null'
                          personalEmail:
                            anyOf:
                              - type: string
                              - type: 'null'
                          personalPhone:
                            anyOf:
                              - type: string
                              - type: 'null'
                          address:
                            anyOf:
                              - type: string
                              - type: 'null'
                          city:
                            anyOf:
                              - type: string
                              - type: 'null'
                          state:
                            anyOf:
                              - type: string
                              - type: 'null'
                          pincode:
                            anyOf:
                              - type: string
                              - type: 'null'
                          pan:
                            anyOf:
                              - type: string
                              - type: 'null'
                          aadhaarLast4:
                            anyOf:
                              - type: string
                              - type: 'null'
                          pfUan:
                            anyOf:
                              - type: string
                              - type: 'null'
                          esiNumber:
                            anyOf:
                              - type: string
                              - type: 'null'
                          emergencyName:
                            anyOf:
                              - type: string
                              - type: 'null'
                          emergencyRelationship:
                            anyOf:
                              - type: string
                              - type: 'null'
                          emergencyPhone:
                            anyOf:
                              - type: string
                              - type: 'null'
                          subDepartment:
                            anyOf:
                              - type: string
                              - type: 'null'
                          grade:
                            anyOf:
                              - type: string
                              - type: 'null'
                          probationEndDate:
                            anyOf:
                              - type: string
                                pattern: ^\d{4}-\d{2}-\d{2}$
                              - type: 'null'
                          branch:
                            anyOf:
                              - type: string
                              - type: 'null'
                          tags:
                            type: array
                            items:
                              type: string
                          ctcAnnual:
                            anyOf:
                              - type: integer
                                minimum: -9007199254740991
                                maximum: 9007199254740991
                              - type: 'null'
                          payFrequency:
                            anyOf:
                              - type: string
                                enum:
                                  - Monthly
                                  - Biweekly
                                  - Weekly
                              - type: 'null'
                          bankName:
                            anyOf:
                              - type: string
                              - type: 'null'
                          bankAccountHolder:
                            anyOf:
                              - type: string
                              - type: 'null'
                          bankAccountNumber:
                            anyOf:
                              - type: string
                              - type: 'null'
                          ifsc:
                            anyOf:
                              - type: string
                              - type: 'null'
                          permissions:
                            type: array
                            items:
                              type: string
                              enum:
                                - self:read
                                - self:write
                                - employee:read
                                - employee:write
                                - team:read
                                - location:read
                                - location:write
                                - department:read
                                - department:write
                                - settings:read
                                - settings:write
                                - role:read
                                - role:write
                                - attendance:read
                                - attendance:punch
                                - attendance:write
                                - leave:read
                                - leave:write
                                - leave:approve
                                - leave:config
                                - pay:read
                                - payroll:read
                                - payroll:write
                                - compliance:read
                                - compliance:write
                                - integration:read
                                - integration:write
                                - report:read
                                - report:write
                                - shift:read
                                - shift:write
                                - roster:read
                                - roster:write
                                - roster:publish
                                - holiday:read
                                - holiday:write
                                - swap:read
                                - swap:write
                                - swap:approve
                                - regularization:read
                                - regularization:write
                                - regularization:approve
                                - document:read
                                - document:write
                                - device:read
                                - device:write
                                - audit:read
                                - notification:read
                                - message:write
                                - overtime:request
                                - overtime:approve
                                - hr:approve
                                - api:manage
                          role:
                            type: object
                            properties:
                              id:
                                type: string
                                format: uuid
                                pattern: >-
                                  ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
                              name:
                                type: string
                            required:
                              - id
                              - name
                          orgName:
                            type: string
                        required:
                          - id
                          - code
                          - fullName
                          - email
                          - mobile
                          - designation
                          - departmentId
                          - locationId
                          - managerId
                          - shiftTemplateId
                          - employmentType
                          - joinedDate
                          - status
                          - exitDate
                          - roleId
                          - firstName
                          - middleName
                          - lastName
                          - preferredName
                          - dob
                          - gender
                          - maritalStatus
                          - personalEmail
                          - personalPhone
                          - address
                          - city
                          - state
                          - pincode
                          - emergencyName
                          - emergencyRelationship
                          - emergencyPhone
                          - subDepartment
                          - grade
                          - probationEndDate
                          - branch
                          - tags
                          - payFrequency
                          - bankName
                          - bankAccountHolder
                          - permissions
                          - role
                          - orgName
                      - type: 'null'
                required:
                  - user
                  - memberships
                  - active
components:
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: ont_ API key
      description: >-
        Issue keys in Settings → API. Send them as `Authorization: Bearer ont_…`
        (an `X-Api-Key: ont_…` header is also accepted). Session-cookie routes
        are used by the OnTime web apps and are shown for completeness.

````