KLOKIN Auth API

The Auth API from KLOKIN — 10 operation(s) for auth.

GitHub OpenAPI

Operations 13

POST /auth/login Admin login #
GET /auth/permissions List the caller's effective permissions #
GET /auth/org-info Current organization info, plan and entitlements #
GET /auth/me Current user's profile #
PUT /auth/me Update own email or password #
POST /auth/admin Create an admin user #
PUT /auth/admin/{id} Update an admin user #
DELETE /auth/admin/{id} Deactivate an admin user #
POST /auth/employee-login Employee portal login (trusted browser required) #
GET /auth/trusted-browsers List trusted browsers for the organization #
DELETE /auth/trusted-browsers/{id} Revoke a trusted browser #
GET /auth/clock-settings How employees may clock in (store terminals, and optionally their own phone… #
PUT /auth/clock-settings Allow or disallow clocking in from the employee's own phone (requires… #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/klokin-io:klokin-io-auth-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

klokin-io-auth-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Klokin Auth API
  version: 1.0.0
  description: 'REST API for the Klokin employee time-tracking platform.


    ## Authentication

    Most endpoints accept a Bearer token in the `Authorization` header — either

    a JWT obtained from `POST /v1/auth/login`, or an organization API key

    (`klkn_…`) created on the "API raktai" admin page. API keys carry an

    explicit permission list; JWT users get their role''s permissions.


    ## Organization context

    Multi-tenant requests resolve the organization from the `X-Organization`

    header (organization domain). Super-admin JWTs may operate across

    organizations; everyone else is scoped to their own.


    ## Errors

    Errors return `{ "error": "" }` (messages are in Lithuanian) and,

    where applicable, a stable machine-readable `code` such as

    `PLAN_LIMIT_REACHED`, `PLAN_FEATURE_REQUIRED` or `RATE_LIMIT_EXCEEDED`.


    ## Rate limiting

    API-key requests are rate limited per minute by the organization''s plan:

    STARTAS 30, VERSLAS 60, PAŽENGĘS 300, ĮMONĖ unlimited. Every response

    carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset`

    (seconds until the window resets). Exceeding the limit returns `429` with a

    `Retry-After` header and `code: RATE_LIMIT_EXCEEDED`. The admin dashboard

    (JWT) is not subject to these limits.


    ## Versioning

    The API is versioned in the path (`/v1`). Backwards-incompatible changes

    ship under a new version; additive changes may appear within `/v1`.'
servers:
- url: /v1
security:
- bearerAuth: []
tags:
- name: Auth
paths:
  /auth/login:
    post:
      tags:
      - Auth
      summary: Admin login
      security: []
      parameters:
      - $ref: '#/components/parameters/OrgHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - username
              - password
              properties:
                username:
                  type: string
                password:
                  type: string
                  format: password
      responses:
        '200':
          description: JWT + user info
          content:
            application/json:
              schema:
                type: object
                properties:
                  token:
                    type: string
                  user:
                    type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
      operationId: postAuthLogin
      x-operation-id-source: derived
  /auth/permissions:
    get:
      tags:
      - Auth
      summary: List the caller's effective permissions
      responses:
        '200':
          description: Permission names
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
      operationId: getAuthPermissions
      x-operation-id-source: derived
  /auth/org-info:
    get:
      tags:
      - Auth
      summary: Current organization info, plan and entitlements
      parameters:
      - $ref: '#/components/parameters/OrgHeader'
      responses:
        '200':
          description: Plan, features, limits and seat usage
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/Entitlements'
                - type: object
                  properties:
                    userCount:
                      type: integer
                    maxUserCount:
                      type: integer
      operationId: getAuthOrgInfo
      x-operation-id-source: derived
  /auth/me:
    get:
      tags:
      - Auth
      summary: Current user's profile
      responses:
        '200':
          description: Profile
      operationId: getAuthMe
      x-operation-id-source: derived
    put:
      tags:
      - Auth
      summary: Update own email or password
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                email:
                  type: string
                  format: email
                password:
                  type: string
                  format: password
                currentPassword:
                  type: string
                  format: password
      responses:
        '200':
          description: Updated
        '400':
          $ref: '#/components/responses/BadRequest'
      operationId: putAuthMe
      x-operation-id-source: derived
  /auth/admin:
    post:
      tags:
      - Auth
      summary: Create an admin user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - username
              - password
              properties:
                username:
                  type: string
                password:
                  type: string
                  format: password
                email:
                  type: string
                  format: email
                role:
                  type: string
                organizationId:
                  type: string
                  format: uuid
                organizationRole:
                  type: string
      responses:
        '201':
          description: Created
        '400':
          $ref: '#/components/responses/BadRequest'
      operationId: postAuthAdmin
      x-operation-id-source: derived
  /auth/admin/{id}:
    put:
      tags:
      - Auth
      summary: Update an admin user
      parameters:
      - $ref: '#/components/parameters/IdPath'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                role:
                  type: string
                password:
                  type: string
                  format: password
                email:
                  type: string
                  format: email
                organizationRole:
                  type: string
      responses:
        '200':
          description: Updated
      operationId: putAuthAdminById
      x-operation-id-source: derived
    delete:
      tags:
      - Auth
      summary: Deactivate an admin user
      parameters:
      - $ref: '#/components/parameters/IdPath'
      responses:
        '200':
          description: Deactivated
      operationId: deleteAuthAdminById
      x-operation-id-source: derived
  /auth/employee-login:
    post:
      tags:
      - Auth
      summary: Employee portal login (trusted browser required)
      description: Requires a valid trusted-browser cookie issued during kiosk setup.
      security: []
      parameters:
      - $ref: '#/components/parameters/OrgHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - employeeNumber
              properties:
                employeeNumber:
                  type: string
      responses:
        '200':
          description: Employee session token
        '401':
          $ref: '#/components/responses/Unauthorized'
      operationId: postAuthEmployeeLogin
      x-operation-id-source: derived
  /auth/trusted-browsers:
    get:
      tags:
      - Auth
      summary: List trusted browsers for the organization
      responses:
        '200':
          description: Trusted browsers
      operationId: getAuthTrustedBrowsers
      x-operation-id-source: derived
  /auth/trusted-browsers/{id}:
    delete:
      tags:
      - Auth
      summary: Revoke a trusted browser
      parameters:
      - $ref: '#/components/parameters/IdPath'
      responses:
        '200':
          description: Revoked
      operationId: deleteAuthTrustedBrowsersById
      x-operation-id-source: derived
  /auth/clock-settings:
    get:
      tags:
      - Auth
      summary: How employees may clock in (store terminals, and optionally their own phone…
      responses:
        '200':
          description: '{ mobileClockIn: boolean }'
      operationId: getAuthClockSettings
      x-operation-id-source: derived
    put:
      tags:
      - Auth
      summary: Allow or disallow clocking in from the employee's own phone (requires…
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - mobileClockIn
              properties:
                mobileClockIn:
                  type: boolean
      responses:
        '200':
          description: Saved
      operationId: putAuthClockSettings
      x-operation-id-source: derived
components:
  schemas:
    Error:
      type: object
      required:
      - error
      properties:
        error:
          type: string
          description: Human-readable message (Lithuanian)
        code:
          type: string
          description: Stable machine-readable code, present on plan/limit errors.
          enum:
          - PLAN_LIMIT_REACHED
          - PLAN_FEATURE_REQUIRED
        feature:
          type: string
        plan:
          $ref: '#/components/schemas/PlanId'
    PlanId:
      type: string
      enum:
      - startas
      - verslas
      - pazenges
      - imone
    Entitlements:
      type: object
      properties:
        plan:
          $ref: '#/components/schemas/PlanId'
        features:
          type: object
          additionalProperties:
            type: boolean
        limits:
          type: object
          properties:
            maxEmployees:
              type:
              - integer
              - 'null'
            maxStores:
              type:
              - integer
              - 'null'
  responses:
    BadRequest:
      description: Invalid input
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Missing or invalid credentials
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  parameters:
    IdPath:
      name: id
      in: path
      required: true
      schema:
        type: string
        format: uuid
    OrgHeader:
      name: X-Organization
      in: header
      required: false
      schema:
        type: string
      description: Organization domain used to resolve tenant context.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Admin JWT from POST /v1/auth/login, or a `klkn_…` API key.