Hakuna Time Entries API

Recorded blocks of worked time

OpenAPI Specification

hakuna-time-entries-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: hakuna Time Tracking Absences Time Entries API
  description: 'The hakuna REST API provides programmatic access to the hakuna time-tracking and personnel-management platform: the running timer, time entries, absences, projects, tasks, clients, users, and account-wide company settings. Personal endpoints act in the context of the authenticated user; management endpoints require an admin token and the organization endpoint requires an organization-level token. All requests and responses are JSON. Generated by the API Evangelist enrichment pipeline from the published API documentation; not an official hakuna machine-readable specification.'
  version: v1
  x-apievangelist-generated: '2026-07-19'
  x-apievangelist-method: generated
  x-apievangelist-source: https://app.hakuna.ch/api_docs
  contact:
    name: hakuna Support
    url: https://www.hakuna.ch/kontakt
  termsOfService: https://www.hakuna.ch/rechtliches/agb
servers:
- url: https://app.hakuna.ch/api/v1
  description: Production
security:
- AuthToken: []
tags:
- name: Time Entries
  description: Recorded blocks of worked time
paths:
  /time_entries:
    get:
      operationId: listTimeEntries
      summary: List time entries
      description: List recorded time entries for the authenticated user.
      tags:
      - Time Entries
      responses:
        '200':
          description: A list of time entries
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/TimeEntry'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '429':
          $ref: '#/components/responses/RateLimited'
    post:
      operationId: createTimeEntry
      summary: Create a time entry
      description: Create a new recorded block of worked time.
      tags:
      - Time Entries
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TimeEntryInput'
      responses:
        '201':
          description: Time entry created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimeEntry'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/RateLimited'
  /time_entries/{id}:
    parameters:
    - $ref: '#/components/parameters/Id'
    get:
      operationId: getTimeEntry
      summary: Get a time entry
      tags:
      - Time Entries
      responses:
        '200':
          description: The time entry
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimeEntry'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
    patch:
      operationId: updateTimeEntry
      summary: Update a time entry
      tags:
      - Time Entries
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TimeEntryInput'
      responses:
        '200':
          description: Time entry updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TimeEntry'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '429':
          $ref: '#/components/responses/RateLimited'
    delete:
      operationId: deleteTimeEntry
      summary: Delete a time entry
      tags:
      - Time Entries
      responses:
        '204':
          description: Time entry deleted
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    Id:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: The unique identifier of the resource.
  schemas:
    Error:
      type: object
      description: JSON error object with a descriptive message.
      properties:
        message:
          type: string
          description: Human-readable description of the error.
    Task:
      type: object
      description: A categorization task.
      properties:
        id:
          type: string
        name:
          type: string
        archived:
          type: boolean
    Client:
      type: object
      description: A client that projects belong to.
      properties:
        id:
          type: string
        name:
          type: string
        archived:
          type: boolean
    TimeEntry:
      type: object
      description: A recorded block of worked time.
      properties:
        id:
          type: string
        date:
          type: string
          format: date
        start_time:
          type: string
          format: date-time
        end_time:
          type: string
          format: date-time
        duration:
          type: string
        note:
          type: string
        task:
          $ref: '#/components/schemas/Task'
        project:
          $ref: '#/components/schemas/Project'
        user:
          $ref: '#/components/schemas/User'
    Project:
      type: object
      description: A project that time can be tracked against.
      properties:
        id:
          type: string
        name:
          type: string
        archived:
          type: boolean
        client:
          $ref: '#/components/schemas/Client'
    TimeEntryInput:
      type: object
      properties:
        date:
          type: string
          format: date
        start_time:
          type: string
          format: date-time
        end_time:
          type: string
          format: date-time
        task_id:
          type: string
        project_id:
          type: string
        note:
          type: string
    User:
      type: object
      description: A user of the account.
      properties:
        id:
          type: string
        name:
          type: string
        email:
          type: string
          format: email
        role:
          type: string
  responses:
    Unauthorized:
      description: The auth token is missing or invalid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: The requested resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Too many requests. Limited to 100 requests per minute per customer.
      headers:
        X-RateLimit-Limit:
          schema:
            type: integer
          description: Maximum requests allowed in the window.
        X-RateLimit-Remaining:
          schema:
            type: integer
          description: Requests remaining in the current window.
        X-RateLimit-Reset:
          schema:
            type: integer
          description: Seconds until the window resets.
        Retry-After:
          schema:
            type: integer
          description: Seconds to wait before retrying.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    UnprocessableEntity:
      description: The request payload failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    AuthToken:
      type: apiKey
      in: header
      name: X-Auth-Token
      description: Personal API token managed under "My Settings". Organization endpoints require a separate organization-level token; management endpoints require an admin token.