KLOKIN Employees API
The Employees API from KLOKIN — 8 operation(s) for employees.
The Employees API from KLOKIN — 8 operation(s) for employees.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
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.curl "https://apis.io/api/v1/apis/klokin-io:klokin-io-employees-api"
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.
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: 3.2.0
info:
title: Klokin Employees 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: Employees
paths:
/employees:
post:
tags:
- Employees
summary: Create an employee
description: Requires `users.create`. Fails with `PLAN_LIMIT_REACHED` when the plan's employee limit is full.
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- employeeNumber
- name
properties:
employeeNumber:
type: string
minLength: 4
name:
type: string
tabelioNr:
type: string
allStoresAccess:
type: boolean
storeIds:
type: array
items:
type: string
format: uuid
roleId:
type: string
format: uuid
description: Role (one of the organization's roles); defaults to the employee role. The caller must hold all of its permissions.
responses:
'201':
description: Created employee
content:
application/json:
schema:
$ref: '#/components/schemas/Employee'
'400':
$ref: '#/components/responses/BadRequest'
operationId: postEmployees
x-operation-id-source: derived
/employees/bulk-upload:
post:
tags:
- Employees
summary: Bulk import employees
description: Requires `users.create`. The whole batch is validated against the plan's employee limit.
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- employees
properties:
employees:
type: array
items:
type: object
required:
- employeeNumber
- name
properties:
employeeNumber:
type: string
name:
type: string
tabelioNr:
type: string
responses:
'200':
description: Import result
'400':
$ref: '#/components/responses/BadRequest'
operationId: postEmployeesBulkUpload
x-operation-id-source: derived
/employees/{id}:
put:
tags:
- Employees
summary: Update an employee
parameters:
- $ref: '#/components/parameters/IdPath'
requestBody:
content:
application/json:
schema:
type: object
properties:
employeeNumber:
type: string
name:
type: string
tabelioNr:
type: string
allStoresAccess:
type: boolean
storeIds:
type: array
description: 'Open-ended store assignments. Kept stores keep their type and priority, new ones become secondary, missing ones are removed; temporary (dated) assignments are not touched. Prefer PUT /employees/{id}/stores for full control.
'
items:
type: string
format: uuid
homeStoreId:
type: string
format: uuid
description: Home store; must be one of storeIds
roleId:
type: string
format: uuid
description: 'New role (one of the organization''s roles). The caller must hold every permission of both the new and the current role.
'
responses:
'200':
description: Updated
'400':
description: Unknown store or role
'403':
description: Role carries rights the caller lacks
'404':
$ref: '#/components/responses/NotFound'
operationId: putEmployeesById
x-operation-id-source: derived
delete:
tags:
- Employees
summary: Deactivate an employee (soft delete)
parameters:
- $ref: '#/components/parameters/IdPath'
responses:
'200':
description: Deactivated
operationId: deleteEmployeesById
x-operation-id-source: derived
/employees/{id}/stores:
get:
tags:
- Employees
summary: Store assignments of an employee
description: The single source of which stores an employee works in; store access (clock-in) is derived from the assignments in force.
parameters:
- $ref: '#/components/parameters/IdPath'
responses:
'200':
description: Assignments and the all-stores flag
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeStoreSetup'
'404':
$ref: '#/components/responses/NotFound'
operationId: getEmployeesByIdStores
x-operation-id-source: derived
put:
tags:
- Employees
summary: Replace store assignments of an employee
description: Exactly one open-ended home store is required when there are open-ended assignments. Changing priorities or validity periods needs the planning.manage permission.
parameters:
- $ref: '#/components/parameters/IdPath'
requestBody:
content:
application/json:
schema:
type: object
required:
- assignments
properties:
allStoresAccess:
type: boolean
assignments:
type: array
items:
$ref: '#/components/schemas/EmployeeStoreAssignment'
responses:
'200':
description: Saved; returns the new state
content:
application/json:
schema:
$ref: '#/components/schemas/EmployeeStoreSetup'
'400':
description: Validation error
'403':
description: Missing planning.manage for priority / period changes
'404':
$ref: '#/components/responses/NotFound'
operationId: putEmployeesByIdStores
x-operation-id-source: derived
/employees/status/{employeeNumber}:
get:
tags:
- Employees
summary: Employee clock-in status (portal)
parameters:
- name: employeeNumber
in: path
required: true
schema:
type: string
responses:
'200':
description: Current status and active entry
operationId: getEmployeesStatusByEmployeeNumber
x-operation-id-source: derived
/employees/{id}/reset-lockout:
post:
tags:
- Employees
summary: Reset an employee's login lockout
parameters:
- $ref: '#/components/parameters/IdPath'
responses:
'200':
description: Lockout cleared
operationId: postEmployeesByIdResetLockout
x-operation-id-source: derived
/employees/{id}/gdpr-export:
get:
tags:
- Employees
summary: Export all of an employee's personal data (GDPR SAR)
description: 'Requires `gdpr.export`. Streams a ZIP containing `data.json`
(machine-readable, Art. 20) and `README.txt` (human-readable summary).
Secrets (password/key hashes) are excluded. The export is audit-logged.'
parameters:
- $ref: '#/components/parameters/IdPath'
responses:
'200':
description: ZIP archive
content:
application/zip:
schema:
type: string
format: binary
'404':
$ref: '#/components/responses/NotFound'
operationId: getEmployeesByIdGdprExport
x-operation-id-source: derived
/employees/{id}/anonymize:
post:
tags:
- Employees
summary: Anonymize an employee (GDPR right to erasure)
description: 'Requires `gdpr.erase`. Scrubs personal identifiers and GPS points but
retains the row and time-entry totals for the legally required
retention period. Irreversible; audit-logged.'
parameters:
- $ref: '#/components/parameters/IdPath'
responses:
'200':
description: Anonymized
'400':
description: Already anonymized
'404':
$ref: '#/components/responses/NotFound'
operationId: postEmployeesByIdAnonymize
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
Employee:
type: object
properties:
id:
type: string
format: uuid
employeeNumber:
type: string
name:
type: string
description: Decrypted display name
tabelioNr:
type: string
allStoresAccess:
type: boolean
isActive:
type: boolean
createdAt:
type: string
format: date-time
stores:
type: array
items:
type: object
properties:
id:
type: string
format: uuid
name:
type: string
EmployeeStoreSetup:
type: object
properties:
allStoresAccess:
type: boolean
description: May clock in at every store of the organization
assignments:
type: array
items:
$ref: '#/components/schemas/EmployeeStoreAssignment'
EmployeeStoreAssignment:
type: object
required:
- storeId
properties:
storeId:
type: string
format: uuid
storeName:
type: string
readOnly: true
assignmentType:
type: string
enum:
- home
- secondary
default: secondary
priority:
type: integer
minimum: 1
nullable: true
validFrom:
type: string
format: date
nullable: true
validTo:
type: string
format: date
nullable: true
responses:
BadRequest:
description: Invalid input
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
NotFound:
description: Resource not found
content:
application/json:
schema:
$ref: '#/components/schemas/Error'
parameters:
IdPath:
name: id
in: path
required: true
schema:
type: string
format: uuid
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: Admin JWT from POST /v1/auth/login, or a `klkn_…` API key.