{
  "components": {
    "schemas": {
      "AbsenceDto": {
        "description": "An absence.",
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdBy": {
            "$ref": "#/components/schemas/CalendarUserRefDto"
          },
          "days": {
            "description": "Σ `deductionByYear`; for types that do not deduct, the planned workdays (information only).",
            "format": "double",
            "type": "number"
          },
          "decidedAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "decidedBy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CalendarUserRefDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "decisionNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "deductionByYear": {
            "description": "The balance deduction per year, e.g. `{\"2026\": 3.5}`; empty for types that do not deduct.",
            "type": "object"
          },
          "end": {
            "format": "date-time",
            "type": "string"
          },
          "endDate": {
            "format": "date",
            "type": "string"
          },
          "endTime": {
            "type": [
              "string",
              "null"
            ]
          },
          "half": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "permissions": {
            "$ref": "#/components/schemas/AbsencePermissionsDto"
          },
          "start": {
            "description": "UTC coverage start.",
            "format": "date-time",
            "type": "string"
          },
          "startDate": {
            "format": "date",
            "type": "string"
          },
          "startTime": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          },
          "type": {
            "$ref": "#/components/schemas/AbsenceTypeRefDto"
          },
          "unit": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/CalendarPersonDto"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id",
          "userId",
          "user",
          "type",
          "status",
          "unit",
          "startDate",
          "endDate",
          "timeZone",
          "start",
          "end",
          "days",
          "deductionByYear",
          "createdBy",
          "createdAt",
          "updatedAt",
          "permissions"
        ],
        "type": "object"
      },
      "AbsencePage": {
        "description": "`GET /v1/absences`.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AbsenceDto"
            },
            "type": "array"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "AbsencePermissionsDto": {
        "properties": {
          "canApprove": {
            "type": "boolean"
          },
          "canCancel": {
            "type": "boolean"
          },
          "canEdit": {
            "type": "boolean"
          }
        },
        "required": [
          "canEdit",
          "canCancel",
          "canApprove"
        ],
        "type": "object"
      },
      "AbsenceRequest": {
        "description": "`POST /v1/absences`, `PUT /v1/absences/{id}` (the user never changes).",
        "properties": {
          "endDate": {
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "endTime": {
            "type": [
              "string",
              "null"
            ]
          },
          "half": {
            "description": "`am` or `pm` for a half day.",
            "type": [
              "string",
              "null"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "startDate": {
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "startTime": {
            "description": "Local `HH:mm` for `hours`.",
            "type": [
              "string",
              "null"
            ]
          },
          "typeId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "unit": {
            "description": "`days`, `half_day` or `hours`.",
            "type": [
              "string",
              "null"
            ]
          },
          "userId": {
            "description": "`null` = the caller.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "AbsenceTypeRefDto": {
        "description": "The absence's type as the absence shows it; `name` translated for a built-in type that was not renamed.",
        "properties": {
          "color": {
            "type": "string"
          },
          "countsAsWorked": {
            "type": "boolean"
          },
          "deductsFromBalance": {
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "key": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "paid": {
            "type": "boolean"
          },
          "timeEffect": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "color",
          "timeEffect",
          "countsAsWorked",
          "paid",
          "deductsFromBalance"
        ],
        "type": "object"
      },
      "AcceptedDto": {
        "description": "`202 Accepted` of a queued job.",
        "properties": {
          "accepted": {
            "description": "Always `true`.",
            "type": "boolean"
          }
        },
        "required": [
          "accepted"
        ],
        "type": "object"
      },
      "AccessDto": {
        "description": "What the person may see and manage (FAZ1 `AccessDto`; `focus_contracts::access::policy`).",
        "properties": {
          "assignableRoles": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "canManageCompanySettings": {
            "type": "boolean"
          },
          "canManageTeams": {
            "type": "boolean"
          },
          "canManageUsers": {
            "type": "boolean"
          },
          "manageTeamIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "scope": {
            "description": "`company`, `teams` or `self`.",
            "type": "string"
          },
          "unassignedFallback": {
            "type": "boolean"
          },
          "viewTeamIds": {
            "items": {
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "scope",
          "viewTeamIds",
          "manageTeamIds",
          "canManageUsers",
          "canManageTeams",
          "canManageCompanySettings",
          "assignableRoles",
          "unassignedFallback"
        ],
        "type": "object"
      },
      "ActivityDayDto": {
        "description": "One user's local day. A day without activity is a 200 with zero totals, `null` arrival/leave and empty lists.",
        "properties": {
          "absenceCreditMs": {
            "description": "A `worked` absence tops the worked time up to the expected work.",
            "format": "int64",
            "type": "integer"
          },
          "activeMs": {
            "description": "Window time ∩ not AFK (computer time only).",
            "format": "int64",
            "type": "integer"
          },
          "afkCoverage": {
            "description": "False when no device reported AFK data (idle unknown).",
            "type": "boolean"
          },
          "apps": {
            "description": "Daily totals, largest first.",
            "items": {
              "$ref": "#/components/schemas/AppUsageDto"
            },
            "type": "array"
          },
          "arrivalAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "atWorkMs": {
            "format": "int64",
            "type": "integer"
          },
          "attendance": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DayAttendanceDto",
                "description": "`null` for a future day or a user missing from the directory."
              },
              {
                "type": "null"
              }
            ]
          },
          "categories": {
            "description": "Active time per category (`null` key = uncategorized); offline time is in no category.",
            "items": {
              "$ref": "#/components/schemas/CategoryUsageDto"
            },
            "type": "array"
          },
          "classified": {
            "description": "False for a day written before the Phase 2 classification (all neutral).",
            "type": "boolean"
          },
          "date": {
            "example": "2026-10-05",
            "format": "date",
            "type": "string"
          },
          "dayEnd": {
            "example": "2026-10-05T21:00:00.000Z",
            "format": "date-time",
            "type": "string"
          },
          "dayStart": {
            "description": "The day's window: local midnight, or the end of the previous day's night shift window.",
            "example": "2026-10-04T21:00:00.000Z",
            "format": "date-time",
            "type": "string"
          },
          "deletedMs": {
            "description": "Tracked time removed by approved deletions (part of idle).",
            "format": "int64",
            "type": "integer"
          },
          "domains": {
            "items": {
              "$ref": "#/components/schemas/DomainUsageDto"
            },
            "type": "array"
          },
          "hosts": {
            "description": "Hosts with a URL, at most 50, largest first.",
            "items": {
              "$ref": "#/components/schemas/HostUsageDto"
            },
            "type": "array"
          },
          "idleMs": {
            "format": "int64",
            "type": "integer"
          },
          "leftAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "meetingMs": {
            "description": "Active time the meeting apps exception turned from idle into active.",
            "format": "int64",
            "type": "integer"
          },
          "offlineMs": {
            "description": "Approved offline time outside the tracked active time.",
            "format": "int64",
            "type": "integer"
          },
          "pendingOfflineMs": {
            "description": "Pending offline entries of the day (information only).",
            "format": "int64",
            "type": "integer"
          },
          "plan": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DayPlanDto",
                "description": "`null` for a user missing from the directory."
              },
              {
                "type": "null"
              }
            ]
          },
          "privateIntervals": {
            "description": "Private intervals of the day, merged and clipped, without detail.",
            "items": {
              "$ref": "#/components/schemas/TimeIntervalDto"
            },
            "type": "array"
          },
          "privateMs": {
            "description": "Private time outside active and offline time.",
            "format": "int64",
            "type": "integer"
          },
          "productivity": {
            "$ref": "#/components/schemas/DayProductivityDto"
          },
          "recomputing": {
            "description": "The day waits in the recompute queue (the UI refetches every 15 s).",
            "type": "boolean"
          },
          "slots": {
            "description": "One entry per 5-minute UTC slot with activity, by time.",
            "items": {
              "$ref": "#/components/schemas/ActivitySlotDto"
            },
            "type": "array"
          },
          "teamId": {
            "description": "The user's current primary team (its rules classify the day).",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "timeEntries": {
            "description": "Offline and deletion entries of every status overlapping the day's window, by start; the caller's permissions.",
            "items": {
              "$ref": "#/components/schemas/TimeEntryDto"
            },
            "type": "array"
          },
          "timeZone": {
            "description": "The zone the day was computed in; the UI draws slots at their wall-clock time in it.",
            "example": "Europe/Istanbul",
            "type": "string"
          },
          "unverifiedMs": {
            "description": "Window time of devices that sent no AFK data: not counted as active (nothing shows the person was at the\ncomputer); the UI warns about it. 0 for days computed before aggregate version 5.",
            "format": "int64",
            "type": "integer"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          },
          "workedMs": {
            "description": "`activeMs + offlineMs`: the denominator of `productivity.productivityPct`.",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "userId",
          "date",
          "timeZone",
          "classified",
          "dayStart",
          "dayEnd",
          "activeMs",
          "idleMs",
          "atWorkMs",
          "afkCoverage",
          "unverifiedMs",
          "offlineMs",
          "privateMs",
          "deletedMs",
          "meetingMs",
          "workedMs",
          "pendingOfflineMs",
          "absenceCreditMs",
          "recomputing",
          "productivity",
          "slots",
          "apps",
          "domains",
          "hosts",
          "categories",
          "timeEntries",
          "privateIntervals"
        ],
        "type": "object"
      },
      "ActivitySlotDto": {
        "description": "Time in one 5-minute slot; `activeMs` includes approved offline time (`offlineMs`).",
        "properties": {
          "activeMs": {
            "format": "int64",
            "type": "integer"
          },
          "apps": {
            "description": "The slot's apps; time with a URL is one row per site (`host`), so the rows' levels add up to the slot's\nlevels.",
            "items": {
              "$ref": "#/components/schemas/AppUsageDto"
            },
            "type": "array"
          },
          "neutralMs": {
            "format": "int64",
            "type": "integer"
          },
          "offlineMs": {
            "format": "int64",
            "type": "integer"
          },
          "productiveMs": {
            "format": "int64",
            "type": "integer"
          },
          "slotStart": {
            "format": "date-time",
            "type": "string"
          },
          "unproductiveMs": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "slotStart",
          "activeMs",
          "offlineMs",
          "productiveMs",
          "unproductiveMs",
          "neutralMs",
          "apps"
        ],
        "type": "object"
      },
      "AffectedAllocationDto": {
        "description": "An allocation `replace` changed.",
        "properties": {
          "change": {
            "description": "`trimmed`, `split` or `deleted`.",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id",
          "change"
        ],
        "type": "object"
      },
      "AllocationCreateRequest": {
        "description": "`POST /v1/allocations` (`Idempotency-Key`).",
        "properties": {
          "endedAt": {
            "description": "At most 24 hours after `startedAt`, at most 5 minutes in the future.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "isBillable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "projectId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "replace": {
            "description": "Trim, split or delete the person's (unbilled) allocations it overlaps; otherwise an overlap is 409\n`allocation_overlaps`.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "source": {
            "description": "`manual` or `assignment` (`timer` only through the timer).",
            "type": [
              "string",
              "null"
            ]
          },
          "startedAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "taskId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "userId": {
            "description": "`null` = the caller; another person needs `allocations.write` and to be managed by the caller.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "AllocationCreatedDto": {
        "description": "`POST /v1/allocations` → 201.",
        "properties": {
          "affected": {
            "items": {
              "$ref": "#/components/schemas/AffectedAllocationDto"
            },
            "type": "array"
          },
          "allocation": {
            "$ref": "#/components/schemas/AllocationDto"
          }
        },
        "required": [
          "allocation",
          "affected"
        ],
        "type": "object"
      },
      "AllocationDto": {
        "description": "Time on a project.",
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdBy": {
            "$ref": "#/components/schemas/NamedRefDto"
          },
          "durationMs": {
            "format": "int64",
            "type": "integer"
          },
          "effectiveBillable": {
            "type": "boolean"
          },
          "endedAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "invoiceId": {
            "description": "Set once the time is on an invoice.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "isBillable": {
            "description": "`null` takes the task's, then the project's value.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "localDate": {
            "description": "The start's day in the person's zone (rates, reports).",
            "format": "date",
            "type": "string"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "permissions": {
            "$ref": "#/components/schemas/AllocationPermissionsDto"
          },
          "project": {
            "$ref": "#/components/schemas/ProjectRefDto"
          },
          "source": {
            "description": "`timer`, `manual` or `assignment`.",
            "type": "string"
          },
          "startedAt": {
            "format": "date-time",
            "type": "string"
          },
          "task": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NamedRefDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "timeZone": {
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          },
          "version": {
            "description": "The row version: `If-Match: \"v<version>\"` of a change (the same value as the resource's `ETag`).",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "userId",
          "project",
          "startedAt",
          "endedAt",
          "durationMs",
          "localDate",
          "timeZone",
          "source",
          "effectiveBillable",
          "createdBy",
          "permissions",
          "createdAt",
          "updatedAt",
          "version"
        ],
        "type": "object"
      },
      "AllocationPage": {
        "description": "`GET /v1/allocations`.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/AllocationDto"
            },
            "type": "array"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "AllocationPermissionsDto": {
        "description": "What the caller may do with an allocation (a billed one is locked).",
        "properties": {
          "delete": {
            "type": "boolean"
          },
          "edit": {
            "type": "boolean"
          }
        },
        "required": [
          "edit",
          "delete"
        ],
        "type": "object"
      },
      "AppLevelMixDto": {
        "description": "An app's time per level by site (`AppUsageDto.levelMix`): time with a URL takes its site's domain rule, else the\napp's rule, like the day's totals; the three sum to the app's time in the day's targets.",
        "properties": {
          "hosts": {
            "description": "The app's sites by time, at most 5; `level` is the level of that site's time in this app.",
            "items": {
              "$ref": "#/components/schemas/HostUsageDto"
            },
            "type": "array"
          },
          "neutralMs": {
            "format": "int64",
            "type": "integer"
          },
          "productiveMs": {
            "format": "int64",
            "type": "integer"
          },
          "unproductiveMs": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "productiveMs",
          "neutralMs",
          "unproductiveMs",
          "hosts"
        ],
        "type": "object"
      },
      "AppTotalDto": {
        "properties": {
          "activeMs": {
            "format": "int64",
            "type": "integer"
          },
          "appKey": {
            "type": "string"
          },
          "categoryKey": {
            "type": [
              "string",
              "null"
            ]
          },
          "level": {
            "description": "Level in the response's `levelContext`.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "percentage": {
            "description": "Share of the range's worked time (0–100, one decimal).",
            "format": "double",
            "type": "number"
          }
        },
        "required": [
          "appKey",
          "name",
          "activeMs",
          "percentage"
        ],
        "type": "object"
      },
      "AppUsageDto": {
        "description": "An app's time; offline rows use the reserved keys `_offline_<level>` with `name: \"Offline time\"` and\n`levelSource: \"offline\"`.\n\nIn a slot's `apps`, time with a URL (a browser) is split per site: one row per (app, host) with `host` set and\nthe level of that time (a matching domain rule wins over the app's rule). In the day's `apps`, an app with time on\nsites carries `levelMix`; when a domain rule classified part of that time, `levelSource` is `byHost` (`level`\nstays the app's own rule).",
        "properties": {
          "activeMs": {
            "format": "int64",
            "type": "integer"
          },
          "appKey": {
            "example": "vscode",
            "type": "string"
          },
          "categoryKey": {
            "type": [
              "string",
              "null"
            ]
          },
          "host": {
            "description": "A slot row's site (`bo.focus.workify360.com`); absent on a row of the app's time without a URL and on the\nday's apps.",
            "example": "bo.focus.workify360.com",
            "type": [
              "string",
              "null"
            ]
          },
          "level": {
            "description": "The app's own rule (`productive`, `unproductive`, `neutral`); on a row with `host`, the level of that site's\ntime.",
            "type": [
              "string",
              "null"
            ]
          },
          "levelMix": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AppLevelMixDto",
                "description": "The day's apps only, for an app with time on sites: its time per level with the domain rules applied, and its\ntop sites."
              },
              {
                "type": "null"
              }
            ]
          },
          "levelSource": {
            "description": "`team`, `company`, `default` or `offline`; `byHost` on a day's app whose time domain rules split.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "example": "Visual Studio Code",
            "type": "string"
          }
        },
        "required": [
          "appKey",
          "name",
          "activeMs"
        ],
        "type": "object"
      },
      "BudgetDto": {
        "description": "A project's budget: hours (`minutes`) or an amount in the project's currency (`amountMinor`).",
        "properties": {
          "amountMinor": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "kind": {
            "description": "`hours` or `amount`.",
            "type": [
              "string",
              "null"
            ]
          },
          "minutes": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "BudgetRequest": {
        "description": "The budget of a project request (`kind` `hours` with `minutes`, or `amount` with `amountMinor`).",
        "properties": {
          "amountMinor": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "kind": {
            "type": [
              "string",
              "null"
            ]
          },
          "minutes": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "CalendarDecisionRequest": {
        "description": "`{decision, note?}` of the decision endpoints (`approve` or `reject`; the note at most 500 characters).",
        "properties": {
          "decision": {
            "example": "approve",
            "type": [
              "string",
              "null"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "CalendarPersonDto": {
        "description": "A user with the current team.",
        "properties": {
          "fullName": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "teamId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "teamName": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "CalendarUserRefDto": {
        "description": "A user reference (names from the directory; `null` when unknown).",
        "properties": {
          "fullName": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "CapabilitiesDto": {
        "description": "Subscription capabilities.",
        "properties": {
          "features": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "readOnly": {
            "type": "boolean"
          }
        },
        "required": [
          "readOnly",
          "features"
        ],
        "type": "object"
      },
      "CategoryUsageDto": {
        "properties": {
          "activeMs": {
            "format": "int64",
            "type": "integer"
          },
          "categoryKey": {
            "description": "`null` = uncategorized.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "activeMs"
        ],
        "type": "object"
      },
      "CreateExportRequest": {
        "description": "`POST /v1/exports`: `definition` is the full definition the dialog shows; without it the saved template\n(`templateId`) or the built-in one (`templateKey`) gives it.",
        "properties": {
          "definition": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExportDefinitionDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "from": {
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "locale": {
            "description": "Content language of the file: `tr` or `en`. An interface language (`UiLocale`) is accepted too: `tr` stays\nTurkish, every other code gives English; anything else (or nothing) is Turkish.",
            "type": [
              "string",
              "null"
            ]
          },
          "templateId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "templateKey": {
            "type": [
              "string",
              "null"
            ]
          },
          "to": {
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "CreateInvitation": {
        "additionalProperties": false,
        "description": "`POST /v1/invitations`.",
        "properties": {
          "email": {
            "type": "string"
          },
          "fullName": {
            "type": "string"
          },
          "locale": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/UiLocale",
                "description": "Interface language of the invitee (one of the twenty `UiLocale` codes, case-insensitive); the organization's\ndefault otherwise. The e-mail and the acceptance page are Turkish for `tr`, English for every other code."
              },
              {
                "type": "null"
              }
            ]
          },
          "role": {
            "description": "`admin`, `team_admin`, `manager` or `employee`.",
            "type": "string"
          },
          "teamId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "timeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "viewerTeamIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "email",
          "fullName",
          "role"
        ],
        "type": "object"
      },
      "CreateTeam": {
        "additionalProperties": false,
        "description": "`POST /v1/teams`.",
        "properties": {
          "description": {
            "description": "At most 500 characters.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "description": "1–100 characters, unique among active teams (Turkish case folding).",
            "type": "string"
          }
        },
        "required": [
          "name"
        ],
        "type": "object"
      },
      "CreateTimeEntryRequest": {
        "description": "`POST /v1/time-entries` (the .NET `CreateTimeEntryRequest`).",
        "properties": {
          "description": {
            "description": "Offline: 1–500 characters; deletion: optional reason (at most 500).",
            "type": [
              "string",
              "null"
            ]
          },
          "end": {
            "example": "2026-10-05T08:30:00Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "description": "`offline` or `deletion`.",
            "type": [
              "string",
              "null"
            ]
          },
          "level": {
            "description": "Offline only (default `productive`).",
            "type": [
              "string",
              "null"
            ]
          },
          "projectId": {
            "description": "Must be `null` (400 `project_not_supported`).",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "start": {
            "example": "2026-10-05T07:00:00Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "userId": {
            "description": "`null` = the caller; a manager may add time for a user it manages.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "CreateWebhookEndpointRequest": {
        "additionalProperties": false,
        "description": "`POST /v1/webhook-endpoints`.",
        "properties": {
          "description": {
            "description": "≤ 200 characters.",
            "type": [
              "string",
              "null"
            ]
          },
          "eventTypes": {
            "description": "1–50 catalog event types of the tenant's plan.",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "url": {
            "description": "`https://…` (≤ 2048; no user info, no fragment; every resolved address public).",
            "type": "string"
          }
        },
        "required": [
          "url",
          "eventTypes"
        ],
        "type": "object"
      },
      "CreatedWebhookEndpointDto": {
        "description": "`CreatedWebhookEndpointDto`: the endpoint and its signing secret, shown once.",
        "properties": {
          "endpoint": {
            "$ref": "#/components/schemas/WebhookEndpointDto"
          },
          "secret": {
            "description": "`whsec_<base64>`: shown once, never again.",
            "type": "string"
          }
        },
        "required": [
          "endpoint",
          "secret"
        ],
        "type": "object"
      },
      "DailyHolidayDto": {
        "description": "A holiday of a daily report day.",
        "properties": {
          "half": {
            "type": [
              "string",
              "null"
            ]
          },
          "key": {
            "type": "string"
          },
          "name": {
            "description": "English name; `nameTr` is the Turkish one.",
            "type": "string"
          },
          "nameTr": {
            "type": "string"
          }
        },
        "required": [
          "key",
          "name",
          "nameTr"
        ],
        "type": "object"
      },
      "DayAbsenceDto": {
        "description": "The dominant absence of a day (`/v1/reports/users/{userId}/daily` `days[].absence`).",
        "properties": {
          "color": {
            "type": "string"
          },
          "fraction": {
            "description": "The day's approved absence coverage (0–1).",
            "format": "double",
            "type": "number"
          },
          "half": {
            "type": [
              "string",
              "null"
            ]
          },
          "typeKey": {
            "type": [
              "string",
              "null"
            ]
          },
          "typeName": {
            "type": [
              "string",
              "null"
            ]
          },
          "unit": {
            "type": "string"
          }
        },
        "required": [
          "color",
          "unit",
          "fraction"
        ],
        "type": "object"
      },
      "DayAttendanceDto": {
        "description": "Attendance of the day on the day plan.",
        "properties": {
          "expectedEnd": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "expectedStart": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "flexible": {
            "type": "boolean"
          },
          "lateByMs": {
            "format": "int64",
            "type": "integer"
          },
          "lateToleranceMinutes": {
            "format": "int32",
            "type": "integer"
          },
          "leftEarly": {
            "type": "boolean"
          },
          "leftEarlyByMs": {
            "format": "int64",
            "type": "integer"
          },
          "status": {
            "description": "`onTime`, `late`, `absent`, `notStarted`, `dayOff`, `onLeave`, `holiday`.",
            "example": "late",
            "type": "string"
          },
          "targetMs": {
            "description": "The plan's target (the Effectiveness % denominator).",
            "format": "int64",
            "type": "integer"
          },
          "workday": {
            "type": "boolean"
          }
        },
        "required": [
          "status",
          "workday",
          "flexible",
          "lateToleranceMinutes",
          "lateByMs",
          "leftEarly",
          "leftEarlyByMs",
          "targetMs"
        ],
        "type": "object"
      },
      "DayPlanDto": {
        "description": "The day plan of one user's day.",
        "properties": {
          "absences": {
            "description": "Approved and pending absences covering the day (only approved ones change the numbers).",
            "items": {
              "$ref": "#/components/schemas/PlanAbsenceDto"
            },
            "type": "array"
          },
          "expectedEnd": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "expectedStart": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "expectedWorkMs": {
            "description": "Overtime target (`base × (1 − fLeave)`).",
            "format": "int64",
            "type": "integer"
          },
          "holiday": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/HolidayRefDto",
                "description": "The day's holiday, also when a shift overrides it."
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "description": "`schedule`, `shift`, `dayOff` or `holiday`.",
            "type": "string"
          },
          "leaveFraction": {
            "description": "The approved absence coverage `f` (0–1).",
            "format": "double",
            "type": "number"
          },
          "shifts": {
            "description": "Shifts starting on the day, by start.",
            "items": {
              "$ref": "#/components/schemas/PlanShiftDto"
            },
            "type": "array"
          },
          "targetMs": {
            "description": "Effectiveness % denominator (`base × (1 − f)`).",
            "format": "int64",
            "type": "integer"
          },
          "workday": {
            "type": "boolean"
          }
        },
        "required": [
          "kind",
          "workday",
          "targetMs",
          "expectedWorkMs",
          "leaveFraction",
          "shifts",
          "absences"
        ],
        "type": "object"
      },
      "DayProductivityDto": {
        "description": "A day's time by productivity level (`productive + unproductive + neutral = workedMs`).",
        "properties": {
          "effectivenessPct": {
            "description": "productive ÷ target × 100 (not capped); `null` without a target.",
            "example": 62.5,
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "neutralMs": {
            "format": "int64",
            "type": "integer"
          },
          "productiveMs": {
            "format": "int64",
            "type": "integer"
          },
          "productivityPct": {
            "description": "productive ÷ worked × 100, one decimal; `null` without worked time.",
            "example": 58.8,
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "targetMs": {
            "format": "int64",
            "type": "integer"
          },
          "unproductiveMs": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "productiveMs",
          "unproductiveMs",
          "neutralMs",
          "targetMs"
        ],
        "type": "object"
      },
      "DayTotalDto": {
        "description": "One local day of a summary.",
        "properties": {
          "activeMs": {
            "format": "int64",
            "type": "integer"
          },
          "activeUserCount": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "atWorkMs": {
            "format": "int64",
            "type": "integer"
          },
          "date": {
            "format": "date",
            "type": "string"
          },
          "idleMs": {
            "format": "int64",
            "type": "integer"
          },
          "neutralMs": {
            "format": "int64",
            "type": "integer"
          },
          "offlineMs": {
            "format": "int64",
            "type": "integer"
          },
          "privateMs": {
            "format": "int64",
            "type": "integer"
          },
          "productiveMs": {
            "format": "int64",
            "type": "integer"
          },
          "productivityPct": {
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "unproductiveMs": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "date",
          "activeMs",
          "idleMs",
          "atWorkMs",
          "activeUserCount",
          "productiveMs",
          "unproductiveMs",
          "neutralMs",
          "offlineMs",
          "privateMs"
        ],
        "type": "object"
      },
      "DevCoverageDto": {
        "description": "How many people the numbers cover.",
        "properties": {
          "mapped": {
            "description": "Members with at least one mapped account.",
            "format": "int64",
            "type": "integer"
          },
          "members": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "members",
          "mapped"
        ],
        "type": "object"
      },
      "DevItemDto": {
        "description": "One item of `GET /v1/dev-metrics/members/{userId}/items` (§7.2): no title, message or summary.",
        "properties": {
          "at": {
            "description": "The fact's time (RFC 3339).",
            "type": "string"
          },
          "large": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "linesAdded": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "linesDeleted": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "ref": {
            "description": "`#123` (pull request), `PROJ-12` (issue), `a1b2c3d` (commit).",
            "type": "string"
          },
          "repo": {
            "$ref": "#/components/schemas/DevRepoDto"
          },
          "state": {
            "description": "`open` / `merged` / `closed`, a review's state, an issue's status category; `null` for a commit.",
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "repo",
          "ref",
          "url",
          "at"
        ],
        "type": "object"
      },
      "DevItemPage": {
        "description": "`GET /v1/dev-metrics/members/{userId}/items`.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DevItemDto"
            },
            "type": "array"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "DevMediansDto": {
        "description": "The medians of a period (§5.5, §5.6): `null` below 3 samples (\"not enough data\").",
        "properties": {
          "mergeSamples": {
            "format": "int64",
            "type": "integer"
          },
          "resolutionSamples": {
            "format": "int64",
            "type": "integer"
          },
          "resolutionSeconds": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "timeToMergeSeconds": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "mergeSamples",
          "resolutionSamples"
        ],
        "type": "object"
      },
      "DevMemberDetailDto": {
        "description": "`GET /v1/dev-metrics/members/{userId}` (§7.2).",
        "properties": {
          "mapped": {
            "description": "The person has no mapped account (the card says so).",
            "type": "boolean"
          },
          "medians": {
            "$ref": "#/components/schemas/DevMediansDto"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "perActiveHour": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DevPerActiveHourDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "period": {
            "$ref": "#/components/schemas/DevPeriodDto"
          },
          "series": {
            "items": {
              "$ref": "#/components/schemas/DevSeriesPointDto"
            },
            "type": "array"
          },
          "totals": {
            "$ref": "#/components/schemas/DevMetricsDto"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "userId",
          "period",
          "totals",
          "series",
          "medians",
          "mapped"
        ],
        "type": "object"
      },
      "DevMemberPage": {
        "description": "`GET /v1/dev-metrics/members`: sorted by name unless `teamComparison` allows a metric.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/DevMemberRowDto"
            },
            "type": "array"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "DevMemberRowDto": {
        "description": "One person of `GET /v1/dev-metrics/members` (lines never, V1).",
        "properties": {
          "metrics": {
            "$ref": "#/components/schemas/DevMetricsDto"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "perActiveHour": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DevPerActiveHourDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "team": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DevTeamDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "userId",
          "metrics"
        ],
        "type": "object"
      },
      "DevMetricsDto": {
        "description": "`Metrics` of §7.2: the counts of a period. Story points are a decimal string (`\"5.5\"`).",
        "properties": {
          "commits": {
            "format": "int64",
            "type": "integer"
          },
          "issuesAssignedOpen": {
            "format": "int64",
            "type": "integer"
          },
          "issuesResolved": {
            "format": "int64",
            "type": "integer"
          },
          "largeCommits": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "linesAdded": {
            "description": "Only where lines may be shown (V1); absent otherwise.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "linesDeleted": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "prsClosed": {
            "format": "int64",
            "type": "integer"
          },
          "prsMerged": {
            "format": "int64",
            "type": "integer"
          },
          "prsOpened": {
            "format": "int64",
            "type": "integer"
          },
          "reviewComments": {
            "format": "int64",
            "type": "integer"
          },
          "reviewedPrs": {
            "format": "int64",
            "type": "integer"
          },
          "reviews": {
            "format": "int64",
            "type": "integer"
          },
          "storyPoints": {
            "example": "5.5",
            "type": "string"
          },
          "unpointedResolved": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "commits",
          "prsOpened",
          "prsMerged",
          "prsClosed",
          "reviewedPrs",
          "reviews",
          "reviewComments",
          "issuesResolved",
          "storyPoints",
          "unpointedResolved",
          "issuesAssignedOpen"
        ],
        "type": "object"
      },
      "DevPerActiveHourDto": {
        "description": "The per-active-hour values (§5.7): only for a week or a month with at least 5 active hours; `null` otherwise.",
        "properties": {
          "issuesResolved": {
            "format": "double",
            "type": "number"
          },
          "prsMerged": {
            "format": "double",
            "type": "number"
          },
          "reviewedPrs": {
            "format": "double",
            "type": "number"
          }
        },
        "required": [
          "issuesResolved",
          "prsMerged",
          "reviewedPrs"
        ],
        "type": "object"
      },
      "DevPeriodDto": {
        "description": "The period of a read.",
        "properties": {
          "from": {
            "description": "`YYYY-MM-DD` (the person's or the viewer's local day).",
            "type": "string"
          },
          "groupBy": {
            "description": "`day`, `week` or `month`.",
            "type": "string"
          },
          "to": {
            "type": "string"
          }
        },
        "required": [
          "from",
          "to",
          "groupBy"
        ],
        "type": "object"
      },
      "DevRepoDto": {
        "description": "A repository or project as a reference.",
        "properties": {
          "name": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        },
        "required": [
          "name",
          "url"
        ],
        "type": "object"
      },
      "DevSeriesPointDto": {
        "description": "One point of a series.",
        "properties": {
          "end": {
            "type": "string"
          },
          "metrics": {
            "$ref": "#/components/schemas/DevMetricsDto"
          },
          "start": {
            "type": "string"
          }
        },
        "required": [
          "start",
          "end",
          "metrics"
        ],
        "type": "object"
      },
      "DevSummaryDto": {
        "description": "`GET /v1/dev-metrics/summary` (§7.2).",
        "properties": {
          "activeMinutes": {
            "description": "The period's active minutes (time tracking) of the people covered.",
            "format": "int64",
            "type": "integer"
          },
          "coverage": {
            "$ref": "#/components/schemas/DevCoverageDto"
          },
          "period": {
            "$ref": "#/components/schemas/DevPeriodDto"
          },
          "series": {
            "items": {
              "$ref": "#/components/schemas/DevSeriesPointDto"
            },
            "type": "array"
          },
          "totals": {
            "$ref": "#/components/schemas/DevMetricsDto"
          }
        },
        "required": [
          "period",
          "totals",
          "series",
          "coverage",
          "activeMinutes"
        ],
        "type": "object"
      },
      "DevTeamDto": {
        "description": "A team as a reference.",
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "DomainTotalDto": {
        "properties": {
          "activeMs": {
            "format": "int64",
            "type": "integer"
          },
          "categoryKey": {
            "type": [
              "string",
              "null"
            ]
          },
          "domain": {
            "type": "string"
          },
          "level": {
            "type": [
              "string",
              "null"
            ]
          },
          "percentage": {
            "format": "double",
            "type": "number"
          }
        },
        "required": [
          "domain",
          "activeMs",
          "percentage"
        ],
        "type": "object"
      },
      "DomainUsageDto": {
        "properties": {
          "activeMs": {
            "format": "int64",
            "type": "integer"
          },
          "categoryKey": {
            "type": [
              "string",
              "null"
            ]
          },
          "domain": {
            "example": "google.com",
            "type": "string"
          },
          "level": {
            "type": [
              "string",
              "null"
            ]
          },
          "levelSource": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "domain",
          "activeMs"
        ],
        "type": "object"
      },
      "EmailVerificationDto": {
        "description": "Where the person stands with the e-mail verification (owner decision 3 Oct 2026, `focus_auth::email_gate`).",
        "properties": {
          "dueAt": {
            "description": "The deadline of an unverified account (`Identity__EmailVerificationGraceHours` after its creation).",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "description": "`verified`, `not_required` (an account that never has to verify: invited, imported, SCIM, IdP-verified),\n`pending` (unverified, before `dueAt`) or `overdue` (after `dueAt`: every request but a few answers 403\n`email_verification_required`).",
            "example": "pending",
            "type": "string"
          }
        },
        "required": [
          "state"
        ],
        "type": "object"
      },
      "ExportDefinitionDto": {
        "description": "What an export contains (FAZ4 §6.1; `focus_contracts::reports::export::ExportDefinition` on the wire); a saved\ntemplate stores it without the date range. Every field is optional so that the validator reports what is wrong\n(422 `validation_failed` with `errors[{field, code}]`).",
        "properties": {
          "columns": {
            "description": "Column keys of the dataset in file order (1–40; a PDF at most 12).",
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "csvDialect": {
            "description": "`standard` (default) or `excel-tr` (csv only).",
            "type": [
              "string",
              "null"
            ]
          },
          "dataset": {
            "example": "employees",
            "type": [
              "string",
              "null"
            ]
          },
          "durationFormat": {
            "description": "`hms` (default), `hours` or `minutes`.",
            "type": [
              "string",
              "null"
            ]
          },
          "filters": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExportFiltersDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "format": {
            "description": "`xlsx`, `csv` or `pdf`.",
            "type": [
              "string",
              "null"
            ]
          },
          "groupBy": {
            "description": "`day`, `week`, `month`, `range` or `none` (the dataset decides).",
            "type": [
              "string",
              "null"
            ]
          },
          "options": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/ExportOptionsDto"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object"
      },
      "ExportFiltersDto": {
        "description": "Who is exported: a team, some users, or (neither) everyone the requester can see.",
        "properties": {
          "includeInactiveUsers": {
            "type": "boolean"
          },
          "teamId": {
            "type": [
              "string",
              "null"
            ]
          },
          "userIds": {
            "items": {
              "type": [
                "string",
                "null"
              ]
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ExportJobDto": {
        "description": "An export job as the panel lists and polls it.",
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "dataset": {
            "type": "string"
          },
          "errorCode": {
            "description": "`too_many_rows`, `too_many_rows_for_pdf`, `access_lost`, `feature_not_in_plan`, `canceled`, `internal_error`.",
            "type": [
              "string",
              "null"
            ]
          },
          "expiresAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "fileName": {
            "type": [
              "string",
              "null"
            ]
          },
          "fileSize": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "finishedAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "format": {
            "type": "string"
          },
          "from": {
            "format": "date",
            "type": "string"
          },
          "groupBy": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "locale": {
            "type": "string"
          },
          "progress": {
            "description": "0–100.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "rowCount": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "startedAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "`queued`, `running`, `succeeded`, `failed`, `canceled`, `expired`.",
            "example": "running",
            "type": "string"
          },
          "templateId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "templateKey": {
            "type": [
              "string",
              "null"
            ]
          },
          "templateName": {
            "description": "The saved template's name, while it still exists.",
            "type": [
              "string",
              "null"
            ]
          },
          "to": {
            "format": "date",
            "type": "string"
          }
        },
        "required": [
          "id",
          "status",
          "progress",
          "dataset",
          "format",
          "from",
          "to",
          "locale",
          "createdAt"
        ],
        "type": "object"
      },
      "ExportOptionsDto": {
        "description": "Dataset options; each applies to one dataset and is ignored by the others.",
        "properties": {
          "include": {
            "description": "`titles`: `titles`, `urls` or `both` (default).",
            "type": [
              "string",
              "null"
            ]
          },
          "includeCosts": {
            "description": "`projects` (Faz 6): fill the rate, amount and currency columns (needs `projects.costs.read`, else 403).",
            "type": [
              "boolean",
              "null"
            ]
          },
          "includeOpen": {
            "description": "`shifts`: also open shifts.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "splitByUser": {
            "description": "`applications`: one row per user and target.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "statuses": {
            "description": "`offline_time` / `absence`: status filter (default `approved`).",
            "items": {
              "type": [
                "string",
                "null"
              ]
            },
            "type": [
              "array",
              "null"
            ]
          },
          "targetType": {
            "description": "`applications`: `app` (default), `domain` or `host`.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "FieldError": {
        "description": "One field error of a 400/422 body.",
        "properties": {
          "code": {
            "description": "Stable snake_case code (`required`, `too_long`, `invalid`, ...).",
            "type": "string"
          },
          "field": {
            "description": "JSON path of the field in camelCase (`name`, `items[2].start`), or the parameter/header name.",
            "type": "string"
          },
          "message": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "field",
          "code"
        ],
        "type": "object"
      },
      "HolidayRefDto": {
        "description": "A holiday of a day (both names; `name` is the English one).",
        "properties": {
          "half": {
            "type": [
              "string",
              "null"
            ]
          },
          "key": {
            "description": "Built-in key (`republic_day`, …) or `custom`.",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "nameEn": {
            "type": "string"
          },
          "nameTr": {
            "type": "string"
          },
          "source": {
            "description": "`builtin` or `tenant`.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "key",
          "name",
          "nameTr",
          "nameEn"
        ],
        "type": "object"
      },
      "HostUsageDto": {
        "properties": {
          "activeMs": {
            "format": "int64",
            "type": "integer"
          },
          "domain": {
            "type": [
              "string",
              "null"
            ]
          },
          "host": {
            "example": "mail.google.com",
            "type": "string"
          },
          "level": {
            "type": "string"
          },
          "levelSource": {
            "type": "string"
          },
          "matchedKey": {
            "description": "Key of the matching domain rule; `null` for the default.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "host",
          "activeMs",
          "level",
          "levelSource"
        ],
        "type": "object"
      },
      "InvitationEmail": {
        "description": "What happened to the invitation e-mail.",
        "properties": {
          "acceptUrl": {
            "description": "The acceptance link, only when no e-mail is sent (`not_configured`, `suppressed_reserved`) and only in the\nfresh answer (share it by hand).",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "`queued`; `not_configured` when no e-mail provider is set up; `suppressed_reserved` when the address is an\nRFC 2606 / RFC 6761 reserved name (`example.com`, `*.test`, …) that is never e-mailed. Clients treat\n`suppressed_reserved` like `not_configured`: nothing arrives, share `acceptUrl` by hand.",
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "InvitationRef": {
        "description": "`{\"id\",\"expiresAt\"}` of a created or re-sent invitation.",
        "properties": {
          "expiresAt": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id",
          "expiresAt"
        ],
        "type": "object"
      },
      "InvitationResult": {
        "description": "The answer of `POST /v1/invitations` and `POST /v1/invitations/{id}/resend`.",
        "properties": {
          "email": {
            "$ref": "#/components/schemas/InvitationEmail"
          },
          "invitation": {
            "$ref": "#/components/schemas/InvitationRef"
          },
          "member": {
            "$ref": "#/components/schemas/MemberDto"
          }
        },
        "required": [
          "member",
          "invitation",
          "email"
        ],
        "type": "object"
      },
      "LevelContextDto": {
        "description": "Which rules the single `level` of an aggregate list follows (FAZ2 §5 \"Listelerde hangi kural\").",
        "properties": {
          "kind": {
            "description": "`user` (a `userId` filter: that user's current team), `team` (a `teamId` filter) or `company`.",
            "example": "company",
            "type": "string"
          },
          "teamId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "kind"
        ],
        "type": "object"
      },
      "MeDto": {
        "description": "`GET /v1/me`.",
        "properties": {
          "access": {
            "$ref": "#/components/schemas/AccessDto"
          },
          "capabilities": {
            "$ref": "#/components/schemas/CapabilitiesDto"
          },
          "effectiveTimeZone": {
            "type": "string"
          },
          "membership": {
            "$ref": "#/components/schemas/MeMembership"
          },
          "organization": {
            "$ref": "#/components/schemas/MeOrganization"
          },
          "organizations": {
            "items": {
              "$ref": "#/components/schemas/OrganizationChoice"
            },
            "type": "array"
          },
          "session": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MeSession"
              },
              {
                "type": "null"
              }
            ]
          },
          "user": {
            "$ref": "#/components/schemas/MeUser"
          }
        },
        "required": [
          "user",
          "membership",
          "organization",
          "effectiveTimeZone",
          "access",
          "capabilities",
          "organizations"
        ],
        "type": "object"
      },
      "MeMembership": {
        "description": "The membership in the current organization.",
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isTracked": {
            "type": "boolean"
          },
          "joinedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "teamId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "teamName": {
            "type": [
              "string",
              "null"
            ]
          },
          "timeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "viewerTeamIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "role",
          "status",
          "viewerTeamIds",
          "isTracked"
        ],
        "type": "object"
      },
      "MeOrganization": {
        "description": "The current organization.",
        "properties": {
          "defaultLocale": {
            "$ref": "#/components/schemas/UiLocale",
            "description": "Default interface language of the organization (`UiLocale`)."
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "timeZone": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "timeZone",
          "defaultLocale",
          "status"
        ],
        "type": "object"
      },
      "MeSession": {
        "description": "The current session.",
        "properties": {
          "absoluteExpiresAt": {
            "type": "string"
          },
          "amr": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "authTime": {
            "type": "string"
          },
          "clientId": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "idleExpiresAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "clientId",
          "authTime",
          "amr",
          "idleExpiresAt",
          "absoluteExpiresAt"
        ],
        "type": "object"
      },
      "MeUser": {
        "description": "The person (`GET /v1/me` → `user`).",
        "properties": {
          "email": {
            "type": "string"
          },
          "emailVerification": {
            "$ref": "#/components/schemas/EmailVerificationDto",
            "description": "The e-mail verification gate (owner decision 3 Oct 2026)."
          },
          "emailVerified": {
            "type": "boolean"
          },
          "fullName": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "locale": {
            "$ref": "#/components/schemas/UiLocale",
            "description": "Interface language of the person (`UiLocale`)."
          },
          "phone": {
            "description": "Mobile phone in E.164 (`+905321234567`), or `null` (accounts created before 4 Oct 2026, invited, SSO and SCIM\naccounts need not have one).",
            "example": "+905321234567",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "email",
          "emailVerified",
          "emailVerification",
          "locale"
        ],
        "type": "object"
      },
      "MemberDto": {
        "description": "A membership with its person (`MemberDto`).",
        "properties": {
          "createdAt": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "emailVerified": {
            "type": "boolean"
          },
          "fullName": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "invitation": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/MemberInvitationDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "isTracked": {
            "type": "boolean"
          },
          "joinedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "locale": {
            "$ref": "#/components/schemas/UiLocale",
            "description": "Interface language of the person (`UiLocale`)."
          },
          "phone": {
            "description": "The person's mobile phone in E.164 (`+905321234567`): only in `GET` and `PATCH /v1/members/{id}`, only for\nthe member themself and the Owner and Admins (their current role) in a panel or desktop session (never for API\nkeys), and only when one is set. Never in lists.",
            "example": "+905321234567",
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "description": "`owner`, `admin`, `team_admin`, `manager`, `employee`.",
            "type": "string"
          },
          "status": {
            "description": "`invited`, `active`, `suspended`, `left`.",
            "type": "string"
          },
          "teamId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "teamName": {
            "type": [
              "string",
              "null"
            ]
          },
          "timeZone": {
            "type": [
              "string",
              "null"
            ]
          },
          "unassignedManager": {
            "description": "A Manager with neither a team nor viewer teams (sees the whole company until assigned).",
            "type": "boolean"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          },
          "viewerTeamIds": {
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "userId",
          "email",
          "role",
          "status",
          "viewerTeamIds",
          "isTracked",
          "emailVerified",
          "locale",
          "createdAt",
          "unassignedManager"
        ],
        "type": "object"
      },
      "MemberInvitationDto": {
        "description": "The invitation of an `invited` member.",
        "properties": {
          "emailStatus": {
            "description": "`queued`, `sending`, `sent`, `failed`, `suppressed`, `not_configured`, `suppressed_reserved` (an RFC 2606 /\nRFC 6761 reserved domain, never e-mailed), or `null` before the first e-mail.",
            "type": [
              "string",
              "null"
            ]
          },
          "expiresAt": {
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "lastSentAt": {
            "type": "string"
          },
          "sentCount": {
            "format": "int32",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "expiresAt",
          "lastSentAt",
          "sentCount"
        ],
        "type": "object"
      },
      "MemberPage": {
        "description": "A page of members (OpenAPI).",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/MemberDto"
            },
            "type": "array"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "MemberRefDto": {
        "description": "A member as a reference (current row): the connecting Admin of a connection, the owner of a webhook endpoint.",
        "properties": {
          "active": {
            "description": "The membership is active and (for an endpoint or a tenant connection) still an Owner or Admin.",
            "type": "boolean"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "userId",
          "active"
        ],
        "type": "object"
      },
      "NamedRefDto": {
        "description": "A reference by id and display name (a client, a person, a task).",
        "properties": {
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "OrganizationChoice": {
        "description": "One organization of the person (`sec.user_memberships`).",
        "properties": {
          "current": {
            "type": "boolean"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "role": {
            "type": "string"
          },
          "selectable": {
            "description": "Can this session's sign-in method open it (design §4.5.3)?",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "name",
          "role",
          "current",
          "selectable"
        ],
        "type": "object"
      },
      "PatchMember": {
        "additionalProperties": false,
        "description": "`PATCH /v1/members/{id}`.",
        "properties": {
          "isTracked": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "role": {
            "description": "`admin`, `team_admin`, `manager` or `employee` (the Owner is only transferred).",
            "type": [
              "string",
              "null"
            ]
          },
          "teamId": {
            "description": "Primary team; `null` removes it.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "timeZone": {
            "description": "IANA zone of the membership; `null` follows the organization.",
            "type": [
              "string",
              "null"
            ]
          },
          "viewerTeamIds": {
            "description": "Extra read-only teams (Manager and TeamAdmin only).",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "PatchTeam": {
        "additionalProperties": false,
        "description": "`PATCH /v1/teams/{id}`.",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "PeriodReportDto": {
        "description": "`GET /v1/reports/productivity`.",
        "properties": {
          "from": {
            "format": "date",
            "type": "string"
          },
          "groupBy": {
            "type": "string"
          },
          "levelContext": {
            "$ref": "#/components/schemas/LevelContextDto"
          },
          "periods": {
            "items": {
              "$ref": "#/components/schemas/ReportPeriodDto"
            },
            "type": "array"
          },
          "subject": {
            "$ref": "#/components/schemas/ReportSubjectDto"
          },
          "teams": {
            "description": "Only for the company subject: every visible team over its current members.",
            "items": {
              "$ref": "#/components/schemas/TeamPeriodsDto"
            },
            "type": "array"
          },
          "to": {
            "format": "date",
            "type": "string"
          },
          "totals": {
            "$ref": "#/components/schemas/ReportFiguresDto"
          }
        },
        "required": [
          "from",
          "to",
          "groupBy",
          "subject",
          "levelContext",
          "periods",
          "totals",
          "teams"
        ],
        "type": "object"
      },
      "PlanAbsenceDto": {
        "properties": {
          "color": {
            "type": "string"
          },
          "countsAsWorked": {
            "description": "`timeEffect == worked`.",
            "type": "boolean"
          },
          "endTime": {
            "type": [
              "string",
              "null"
            ]
          },
          "half": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "startTime": {
            "description": "Local start and end of an `hours` absence.",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "`approved` or `pending`.",
            "type": "string"
          },
          "timeEffect": {
            "description": "`leave`, `worked` or `none`.",
            "type": "string"
          },
          "typeKey": {
            "type": [
              "string",
              "null"
            ]
          },
          "typeName": {
            "description": "`null` for a built-in type that was not renamed (the UI translates `typeKey`).",
            "type": [
              "string",
              "null"
            ]
          },
          "unit": {
            "description": "`days`, `half_day` or `hours`.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "color",
          "status",
          "unit",
          "timeEffect",
          "countsAsWorked"
        ],
        "type": "object"
      },
      "PlanShiftDto": {
        "properties": {
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "end": {
            "format": "date-time",
            "type": "string"
          },
          "endTime": {
            "description": "Local end; before the start for a night shift.",
            "example": "06:00",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "minMinutes": {
            "format": "int32",
            "type": "integer"
          },
          "start": {
            "format": "date-time",
            "type": "string"
          },
          "startTime": {
            "description": "Local start (`HH:mm`, the shift's zone).",
            "example": "22:00",
            "type": "string"
          }
        },
        "required": [
          "id",
          "start",
          "end",
          "startTime",
          "endTime",
          "minMinutes",
          "location"
        ],
        "type": "object"
      },
      "Problem": {
        "description": "RFC 9457 problem details (`application/problem+json`).",
        "properties": {
          "action": {
            "description": "Permission key of a 403 (`teams.create`).",
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "description": "Stable snake_case error code (catalog `error-codes.json`).",
            "example": "forbidden",
            "type": "string"
          },
          "detail": {
            "type": [
              "string",
              "null"
            ]
          },
          "errors": {
            "items": {
              "$ref": "#/components/schemas/FieldError"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "requiredPlan": {
            "description": "Lowest plan that includes the feature (402 `feature_not_in_plan`).",
            "type": [
              "string",
              "null"
            ]
          },
          "retryAfterSeconds": {
            "description": "Seconds to wait (429, 503; also the `Retry-After` header).",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "example": 403,
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "title": {
            "description": "English title of the code (clients translate `code`).",
            "example": "Forbidden",
            "type": "string"
          },
          "traceId": {
            "description": "W3C trace id of the request.",
            "type": [
              "string",
              "null"
            ]
          },
          "type": {
            "description": "Help page of the error code: `https://workify360.com/help/errors/<code>/`.",
            "example": "https://workify360.com/help/errors/forbidden/",
            "type": "string"
          }
        },
        "required": [
          "type",
          "title",
          "status",
          "code"
        ],
        "type": "object"
      },
      "ProjectAmountDto": {
        "description": "The amounts of one currency (rates are applied per allocation day and layer).",
        "properties": {
          "billableMinor": {
            "description": "The billable hours at their rate.",
            "format": "int64",
            "type": "integer"
          },
          "costMinor": {
            "description": "Every allocated hour at its rate.",
            "format": "int64",
            "type": "integer"
          },
          "currency": {
            "type": "string"
          }
        },
        "required": [
          "currency",
          "costMinor",
          "billableMinor"
        ],
        "type": "object"
      },
      "ProjectBudgetUsageDto": {
        "description": "The use of a project's budget, all time.",
        "properties": {
          "budgetMinor": {
            "description": "`null` unless `costsIncluded`.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "budgetMinutes": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "kind": {
            "description": "`hours` or `amount`.",
            "type": "string"
          },
          "projectId": {
            "format": "uuid",
            "type": "string"
          },
          "usedMinor": {
            "description": "The cost in the project's currency; `null` unless `costsIncluded`.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "usedMs": {
            "format": "int64",
            "type": "integer"
          },
          "usedRatio": {
            "description": "Used / budget, 4 decimals (`null` for an amount budget without `costsIncluded`).",
            "example": "0.1128",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "projectId",
          "kind",
          "usedMs"
        ],
        "type": "object"
      },
      "ProjectDto": {
        "description": "A project.",
        "properties": {
          "access": {
            "description": "`everyone` or `members`.",
            "type": "string"
          },
          "archived": {
            "type": "boolean"
          },
          "budget": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BudgetDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "client": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NamedRefDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "code": {
            "example": "WEB",
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "example": "#3B82F6",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "currency": {
            "description": "The currency of the project's rates and amount budget.",
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "endDate": {
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isBillable": {
            "type": "boolean"
          },
          "memberCount": {
            "format": "int64",
            "type": "integer"
          },
          "myRole": {
            "description": "The caller's role in the project team (`member`, `manager`), `null` outside it.",
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "example": "Web sitesi yenileme",
            "type": "string"
          },
          "permissions": {
            "$ref": "#/components/schemas/ProjectPermissionsDto"
          },
          "spentMs": {
            "description": "Every allocation of the project, all time.",
            "format": "int64",
            "type": "integer"
          },
          "startDate": {
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "`active`, `on_hold` or `completed`.",
            "type": "string"
          },
          "taskCount": {
            "format": "int64",
            "type": "integer"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "status",
          "archived",
          "access",
          "isBillable",
          "currency",
          "spentMs",
          "taskCount",
          "memberCount",
          "permissions",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "ProjectPage": {
        "description": "`GET /v1/projects`.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ProjectDto"
            },
            "type": "array"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "ProjectPermissionsDto": {
        "description": "What the caller may do with a project (decided from the current rows, §5.3).",
        "properties": {
          "archive": {
            "type": "boolean"
          },
          "delete": {
            "description": "Only a project without time.",
            "type": "boolean"
          },
          "edit": {
            "description": "The project's fields (Owners and Admins).",
            "type": "boolean"
          },
          "manageMembers": {
            "description": "The team (an Admin or the project's manager; only an Admin changes managers).",
            "type": "boolean"
          },
          "manageTasks": {
            "description": "Tasks (an Admin or the project's manager).",
            "type": "boolean"
          },
          "track": {
            "description": "The caller may track time on it now.",
            "type": "boolean"
          }
        },
        "required": [
          "edit",
          "manageTasks",
          "manageMembers",
          "archive",
          "delete",
          "track"
        ],
        "type": "object"
      },
      "ProjectRefDto": {
        "description": "A project reference of an allocation.",
        "properties": {
          "color": {
            "description": "`#RRGGBB`.",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "ProjectReportDto": {
        "description": "`GET /v1/reports/projects`.",
        "properties": {
          "budgets": {
            "items": {
              "$ref": "#/components/schemas/ProjectBudgetUsageDto"
            },
            "type": "array"
          },
          "costsIncluded": {
            "description": "The caller sees rates and amounts (`projects.costs.read`).",
            "type": "boolean"
          },
          "from": {
            "format": "date",
            "type": "string"
          },
          "groupBy": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "rows": {
            "items": {
              "$ref": "#/components/schemas/ProjectReportRowDto"
            },
            "type": "array"
          },
          "to": {
            "format": "date",
            "type": "string"
          },
          "totals": {
            "$ref": "#/components/schemas/ProjectReportTotalsDto"
          }
        },
        "required": [
          "from",
          "to",
          "groupBy",
          "costsIncluded",
          "rows",
          "totals",
          "budgets"
        ],
        "type": "object"
      },
      "ProjectReportKeysDto": {
        "description": "The dimensions of a row (the ones not grouped by are `null`).",
        "properties": {
          "clientId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "clientName": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "description": "The allocation's local day (`groupBy` `day`).",
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "projectId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "projectName": {
            "type": [
              "string",
              "null"
            ]
          },
          "taskId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "taskName": {
            "type": [
              "string",
              "null"
            ]
          },
          "userId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "userName": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ProjectReportRowDto": {
        "description": "One row of the project report.",
        "properties": {
          "allocatedMs": {
            "format": "int64",
            "type": "integer"
          },
          "amounts": {
            "description": "`null` unless `costsIncluded`.",
            "items": {
              "$ref": "#/components/schemas/ProjectAmountDto"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "billableMs": {
            "format": "int64",
            "type": "integer"
          },
          "keys": {
            "$ref": "#/components/schemas/ProjectReportKeysDto"
          },
          "nonBillableMs": {
            "format": "int64",
            "type": "integer"
          },
          "productiveMs": {
            "description": "With `includeProductive` only.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "unratedMs": {
            "description": "Time without any rate (it is left out of the amounts).",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "keys",
          "allocatedMs",
          "billableMs",
          "nonBillableMs",
          "unratedMs"
        ],
        "type": "object"
      },
      "ProjectReportTotalsDto": {
        "description": "The totals of the report.",
        "properties": {
          "allocatedMs": {
            "format": "int64",
            "type": "integer"
          },
          "amounts": {
            "items": {
              "$ref": "#/components/schemas/ProjectAmountDto"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "billableMs": {
            "format": "int64",
            "type": "integer"
          },
          "nonBillableMs": {
            "format": "int64",
            "type": "integer"
          },
          "productiveMs": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "unratedMs": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "allocatedMs",
          "billableMs",
          "nonBillableMs",
          "unratedMs"
        ],
        "type": "object"
      },
      "ProjectRequest": {
        "description": "`POST /v1/projects`; `PUT /v1/projects/{id}` sends the whole body.",
        "properties": {
          "access": {
            "description": "`everyone` (default) or `members`.",
            "type": [
              "string",
              "null"
            ]
          },
          "budget": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BudgetRequest"
              },
              {
                "type": "null"
              }
            ]
          },
          "clientId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "code": {
            "description": "`[A-Za-z0-9._-]{1,32}`, unique among active projects.",
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "description": "`#RRGGBB`.",
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "description": "`TRY`, `USD` or `EUR`; locked once the project has rates or invoice lines (409 `project_currency_locked`).",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "endDate": {
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "isBillable": {
            "description": "Default true.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "startDate": {
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "`active` (default), `on_hold` or `completed`.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ReportFiguresDto": {
        "description": "Figures of a group of users over a period (sums raw, percentages the users' average, counters user-days).",
        "properties": {
          "absenceCreditMs": {
            "format": "int64",
            "type": "integer"
          },
          "absentDays": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "activeMs": {
            "format": "int64",
            "type": "integer"
          },
          "activeUserCount": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "effectivenessPct": {
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "idleMs": {
            "format": "int64",
            "type": "integer"
          },
          "lateDays": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "leaveDays": {
            "format": "double",
            "type": "number"
          },
          "leftEarlyDays": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "neutralMs": {
            "format": "int64",
            "type": "integer"
          },
          "offlineMs": {
            "format": "int64",
            "type": "integer"
          },
          "overtimeDays": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "overtimeMs": {
            "format": "int64",
            "type": "integer"
          },
          "productiveMs": {
            "format": "int64",
            "type": "integer"
          },
          "productivityPct": {
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "targetMs": {
            "format": "int64",
            "type": "integer"
          },
          "unproductiveMs": {
            "format": "int64",
            "type": "integer"
          },
          "userCount": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "workedMs": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "userCount",
          "activeUserCount",
          "workedMs",
          "activeMs",
          "idleMs",
          "offlineMs",
          "productiveMs",
          "unproductiveMs",
          "neutralMs",
          "targetMs",
          "lateDays",
          "absentDays",
          "leftEarlyDays",
          "overtimeMs",
          "overtimeDays",
          "leaveDays",
          "absenceCreditMs"
        ],
        "type": "object"
      },
      "ReportPeriodDto": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ReportFiguresDto"
          },
          {
            "properties": {
              "from": {
                "format": "date",
                "type": "string"
              },
              "key": {
                "description": "`2026-10-05`, `2026-W41`, `2026-10` or `2026-10-01..2026-10-31`.",
                "type": "string"
              },
              "partial": {
                "description": "The period is clipped by the range.",
                "type": "boolean"
              },
              "to": {
                "format": "date",
                "type": "string"
              }
            },
            "required": [
              "key",
              "from",
              "to",
              "partial"
            ],
            "type": "object"
          }
        ],
        "description": "One period of a grouped report: its key and bounds, then the figures."
      },
      "ReportScopeDto": {
        "description": "What the caller can see (FAZ1 `AccessPolicy.ScopeOf`).",
        "properties": {
          "kind": {
            "description": "`company`, `teams` or `self`.",
            "example": "teams",
            "type": "string"
          },
          "teamIds": {
            "description": "The visible teams of a `teams` scope, sorted; empty otherwise (company = all).",
            "items": {
              "format": "uuid",
              "type": "string"
            },
            "type": "array"
          },
          "unassignedFallback": {
            "description": "A Manager without teams who sees the whole company until assigned.",
            "type": "boolean"
          }
        },
        "required": [
          "kind",
          "teamIds",
          "unassignedFallback"
        ],
        "type": "object"
      },
      "ReportSubjectDto": {
        "description": "Whom a report is about.",
        "properties": {
          "id": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "kind": {
            "description": "`company`, `team` or `user`.",
            "type": "string"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "kind"
        ],
        "type": "object"
      },
      "RotatedWebhookSecretDto": {
        "description": "`RotatedWebhookSecretDto`: the new signing secret, shown once.",
        "properties": {
          "previousSecretExpiresAt": {
            "description": "Until then deliveries carry both signatures.",
            "type": "string"
          },
          "secret": {
            "description": "`whsec_<base64>`: shown once, never again.",
            "type": "string"
          }
        },
        "required": [
          "secret",
          "previousSecretExpiresAt"
        ],
        "type": "object"
      },
      "ShiftBody": {
        "description": "`ShiftBody` of `POST /v1/shifts`, the bulk items and `PUT /v1/shifts/{id}` (the whole body). Fields left `null` are\nfilled from `templateId`.",
        "properties": {
          "breakMinutes": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "date": {
            "example": "2026-10-05",
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "endTime": {
            "example": "06:00",
            "type": [
              "string",
              "null"
            ]
          },
          "location": {
            "type": [
              "string",
              "null"
            ]
          },
          "minMinutes": {
            "description": "`null` = the template's, else duration − break.",
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "startTime": {
            "example": "22:00",
            "type": [
              "string",
              "null"
            ]
          },
          "teamId": {
            "description": "Required for an open shift; ignored for an assigned one (the user's current team is written).",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "templateId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "userId": {
            "description": "`null` = an open shift.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "ShiftDto": {
        "description": "A shift: local fields, UTC instants, the caller's permissions.",
        "properties": {
          "breakMinutes": {
            "format": "int32",
            "type": "integer"
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdBy": {
            "$ref": "#/components/schemas/CalendarUserRefDto"
          },
          "crossesMidnight": {
            "type": "boolean"
          },
          "date": {
            "example": "2026-10-05",
            "format": "date",
            "type": "string"
          },
          "durationMinutes": {
            "format": "int32",
            "type": "integer"
          },
          "end": {
            "example": "2026-10-06T03:00:00.000Z",
            "format": "date-time",
            "type": "string"
          },
          "endTime": {
            "example": "06:00",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "location": {
            "type": "string"
          },
          "minMinutes": {
            "format": "int32",
            "type": "integer"
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "open": {
            "description": "No user assigned.",
            "type": "boolean"
          },
          "permissions": {
            "$ref": "#/components/schemas/ShiftPermissionsDto"
          },
          "source": {
            "description": "`manual`, `template`, `copy` or `request`.",
            "type": "string"
          },
          "start": {
            "example": "2026-10-05T19:00:00.000Z",
            "format": "date-time",
            "type": "string"
          },
          "startTime": {
            "example": "22:00",
            "type": "string"
          },
          "teamId": {
            "description": "Open shift: its team; assigned: the user's team when it was written.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "teamName": {
            "type": [
              "string",
              "null"
            ]
          },
          "templateId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "templateName": {
            "type": [
              "string",
              "null"
            ]
          },
          "timeZone": {
            "example": "Europe/Istanbul",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "user": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/CalendarUserRefDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "userId": {
            "description": "`null` for an open shift.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "date",
          "timeZone",
          "startTime",
          "endTime",
          "start",
          "end",
          "crossesMidnight",
          "durationMinutes",
          "breakMinutes",
          "minMinutes",
          "location",
          "source",
          "open",
          "createdBy",
          "createdAt",
          "updatedAt",
          "permissions"
        ],
        "type": "object"
      },
      "ShiftListDto": {
        "description": "`GET /v1/shifts` (the shifts **starting** in the range).",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ShiftDto"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "ShiftPermissionsDto": {
        "properties": {
          "canDelete": {
            "type": "boolean"
          },
          "canEdit": {
            "type": "boolean"
          },
          "canPickUp": {
            "type": "boolean"
          },
          "canRequestSwap": {
            "type": "boolean"
          }
        },
        "required": [
          "canEdit",
          "canDelete",
          "canPickUp",
          "canRequestSwap"
        ],
        "type": "object"
      },
      "SummaryDto": {
        "description": "The summary of the visible users over a range.",
        "properties": {
          "absenceCreditMs": {
            "format": "int64",
            "type": "integer"
          },
          "absentDays": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "activeMs": {
            "format": "int64",
            "type": "integer"
          },
          "activeUserCount": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "atWorkMs": {
            "format": "int64",
            "type": "integer"
          },
          "days": {
            "items": {
              "$ref": "#/components/schemas/DayTotalDto"
            },
            "type": "array"
          },
          "deletedMs": {
            "format": "int64",
            "type": "integer"
          },
          "domains": {
            "description": "Top 10.",
            "items": {
              "$ref": "#/components/schemas/DomainTotalDto"
            },
            "type": "array"
          },
          "effectivenessPct": {
            "description": "Average of the users' range Effectiveness % (inactive tracked users included).",
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "from": {
            "format": "date",
            "type": "string"
          },
          "holidayDays": {
            "format": "double",
            "type": "number"
          },
          "idleMs": {
            "format": "int64",
            "type": "integer"
          },
          "inactiveUsers": {
            "description": "Tracked users without activity in the range (zero totals, attendance fields), by user id.",
            "items": {
              "$ref": "#/components/schemas/UserTotalDto"
            },
            "type": "array"
          },
          "lateDays": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "leaveDays": {
            "format": "double",
            "type": "number"
          },
          "leftEarlyDays": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "levelContext": {
            "$ref": "#/components/schemas/LevelContextDto"
          },
          "meetingMs": {
            "format": "int64",
            "type": "integer"
          },
          "neutralMs": {
            "format": "int64",
            "type": "integer"
          },
          "offlineMs": {
            "format": "int64",
            "type": "integer"
          },
          "overtimeMs": {
            "format": "int64",
            "type": "integer"
          },
          "privateMs": {
            "format": "int64",
            "type": "integer"
          },
          "productiveMs": {
            "format": "int64",
            "type": "integer"
          },
          "productivityPct": {
            "description": "Average of the users' range Productivity %.",
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "scope": {
            "$ref": "#/components/schemas/ReportScopeDto"
          },
          "shiftDays": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "teams": {
            "description": "By current team: named teams by name, the `teamId: null` row last.",
            "items": {
              "$ref": "#/components/schemas/TeamTotalDto"
            },
            "type": "array"
          },
          "to": {
            "format": "date",
            "type": "string"
          },
          "topApps": {
            "description": "Top 10; `name` is \"Offline time\" for the reserved offline keys.",
            "items": {
              "$ref": "#/components/schemas/AppTotalDto"
            },
            "type": "array"
          },
          "unproductiveMs": {
            "format": "int64",
            "type": "integer"
          },
          "users": {
            "description": "One row per user with a computed day in the range, by `activeMs`.",
            "items": {
              "$ref": "#/components/schemas/UserTotalDto"
            },
            "type": "array"
          },
          "workedMs": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "from",
          "to",
          "activeMs",
          "idleMs",
          "atWorkMs",
          "activeUserCount",
          "scope",
          "productiveMs",
          "unproductiveMs",
          "neutralMs",
          "levelContext",
          "offlineMs",
          "privateMs",
          "deletedMs",
          "meetingMs",
          "workedMs",
          "overtimeMs",
          "lateDays",
          "absentDays",
          "leftEarlyDays",
          "leaveDays",
          "holidayDays",
          "shiftDays",
          "absenceCreditMs",
          "users",
          "inactiveUsers",
          "days",
          "topApps",
          "domains",
          "teams"
        ],
        "type": "object"
      },
      "TargetItemDto": {
        "properties": {
          "activeMs": {
            "format": "int64",
            "type": "integer"
          },
          "categoryKey": {
            "type": [
              "string",
              "null"
            ]
          },
          "categorySource": {
            "description": "`tenant`, `builtin` or `none`.",
            "type": "string"
          },
          "domain": {
            "type": [
              "string",
              "null"
            ]
          },
          "level": {
            "type": "string"
          },
          "levelSource": {
            "description": "`team`, `company` or `default`.",
            "type": "string"
          },
          "matchedKey": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "percentage": {
            "format": "double",
            "type": "number"
          },
          "targetKey": {
            "type": "string"
          },
          "targetType": {
            "description": "`app` for apps, `domain` for domains and hosts.",
            "type": "string"
          },
          "userCount": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "targetType",
          "targetKey",
          "name",
          "activeMs",
          "percentage",
          "userCount",
          "level",
          "levelSource",
          "categorySource"
        ],
        "type": "object"
      },
      "TargetListDto": {
        "description": "The \"Apps & URLs\" list.",
        "properties": {
          "from": {
            "format": "date",
            "type": "string"
          },
          "items": {
            "description": "By active time descending, then key.",
            "items": {
              "$ref": "#/components/schemas/TargetItemDto"
            },
            "type": "array"
          },
          "levelContext": {
            "$ref": "#/components/schemas/LevelContextDto"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "to": {
            "format": "date",
            "type": "string"
          },
          "total": {
            "description": "Targets matching the filters (before paging).",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "totalActiveMs": {
            "description": "Active time over every target of the type before the filters (the percentage base).",
            "format": "int64",
            "type": "integer"
          },
          "type": {
            "description": "`app`, `domain` or `host`.",
            "type": "string"
          }
        },
        "required": [
          "from",
          "to",
          "type",
          "levelContext",
          "totalActiveMs",
          "total",
          "items"
        ],
        "type": "object"
      },
      "TaskDto": {
        "description": "A task.",
        "properties": {
          "archived": {
            "type": "boolean"
          },
          "assignee": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NamedRefDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "dueDate": {
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "effectiveBillable": {
            "type": "boolean"
          },
          "estimateMinutes": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "isBillable": {
            "description": "`null` takes the project's value.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "name": {
            "example": "Ana sayfa",
            "type": "string"
          },
          "permissions": {
            "$ref": "#/components/schemas/TaskPermissionsDto"
          },
          "projectId": {
            "format": "uuid",
            "type": "string"
          },
          "sortOrder": {
            "format": "int64",
            "type": "integer"
          },
          "spentMs": {
            "format": "int64",
            "type": "integer"
          },
          "status": {
            "description": "`open`, `in_progress` or `done`.",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "projectId",
          "name",
          "status",
          "archived",
          "spentMs",
          "effectiveBillable",
          "sortOrder",
          "permissions",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "TaskPage": {
        "description": "`GET /v1/projects/{id}/tasks`.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TaskDto"
            },
            "type": "array"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "TaskPermissionsDto": {
        "description": "What the caller may do with a task.",
        "properties": {
          "delete": {
            "description": "Only a task without time.",
            "type": "boolean"
          },
          "edit": {
            "type": "boolean"
          }
        },
        "required": [
          "edit",
          "delete"
        ],
        "type": "object"
      },
      "TaskRequest": {
        "description": "`POST /v1/projects/{id}/tasks`; `PUT /v1/tasks/{id}` sends the whole body.",
        "properties": {
          "assigneeUserId": {
            "description": "Must be able to track time on the project (422 `project_not_trackable`).",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "dueDate": {
            "format": "date",
            "type": [
              "string",
              "null"
            ]
          },
          "estimateMinutes": {
            "description": "1–1 000 000.",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "isBillable": {
            "description": "`null` takes the project's value.",
            "type": [
              "boolean",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "sortOrder": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "status": {
            "description": "`open` (default), `in_progress` or `done`.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "TeamDto": {
        "description": "A team with its size and leads (`TeamDto`).",
        "properties": {
          "archivedAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "leads": {
            "description": "TeamAdmins and Managers of the team: `[{membershipId, userId, fullName, role}]`.",
            "items": {
              "type": "object"
            },
            "type": "array"
          },
          "memberCount": {
            "description": "Members whose primary team this is (left members excluded).",
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "memberCount",
          "leads",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "TeamPage": {
        "description": "A page of teams (OpenAPI).",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TeamDto"
            },
            "type": "array"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "TeamPeriodsDto": {
        "properties": {
          "periods": {
            "items": {
              "$ref": "#/components/schemas/ReportPeriodDto"
            },
            "type": "array"
          },
          "teamId": {
            "format": "uuid",
            "type": "string"
          },
          "teamName": {
            "type": [
              "string",
              "null"
            ]
          },
          "totals": {
            "$ref": "#/components/schemas/ReportFiguresDto"
          }
        },
        "required": [
          "teamId",
          "periods",
          "totals"
        ],
        "type": "object"
      },
      "TeamTotalDto": {
        "description": "One team row of a summary (current teams; percentages the members' average).",
        "properties": {
          "absenceCreditMs": {
            "format": "int64",
            "type": "integer"
          },
          "absentDays": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "activeMs": {
            "format": "int64",
            "type": "integer"
          },
          "activeUserCount": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "effectivenessPct": {
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "holidayDays": {
            "format": "double",
            "type": "number"
          },
          "idleMs": {
            "format": "int64",
            "type": "integer"
          },
          "lateDays": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "leaveDays": {
            "format": "double",
            "type": "number"
          },
          "leftEarlyDays": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "memberCount": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "neutralMs": {
            "format": "int64",
            "type": "integer"
          },
          "offlineMs": {
            "format": "int64",
            "type": "integer"
          },
          "overtimeMs": {
            "format": "int64",
            "type": "integer"
          },
          "productiveMs": {
            "format": "int64",
            "type": "integer"
          },
          "productivityPct": {
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "shiftDays": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "teamId": {
            "description": "`null` for the users without a team.",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "teamName": {
            "type": [
              "string",
              "null"
            ]
          },
          "unproductiveMs": {
            "format": "int64",
            "type": "integer"
          },
          "workedMs": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "memberCount",
          "activeUserCount",
          "workedMs",
          "activeMs",
          "idleMs",
          "offlineMs",
          "productiveMs",
          "unproductiveMs",
          "neutralMs",
          "lateDays",
          "absentDays",
          "leftEarlyDays",
          "overtimeMs",
          "leaveDays",
          "holidayDays",
          "shiftDays",
          "absenceCreditMs"
        ],
        "type": "object"
      },
      "TimeEntryDecisionRequest": {
        "description": "`POST /v1/time-entries/{id}/decision`.",
        "properties": {
          "decision": {
            "description": "`approve` or `reject`.",
            "example": "approve",
            "type": [
              "string",
              "null"
            ]
          },
          "note": {
            "description": "At most 500 characters.",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "TimeEntryDto": {
        "description": "An offline entry or a deletion (design §8.2).",
        "properties": {
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "createdBy": {
            "$ref": "#/components/schemas/TimeEntryUserRefDto"
          },
          "date": {
            "description": "The user's local day of the entry, in the zone effective when it was written.",
            "example": "2026-10-05",
            "format": "date",
            "type": "string"
          },
          "decidedAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "decidedBy": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimeEntryUserRefDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "decisionNote": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "durationMs": {
            "example": 5400000,
            "format": "int64",
            "type": "integer"
          },
          "end": {
            "example": "2026-10-05T08:30:00.000Z",
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "kind": {
            "description": "`offline` or `deletion`.",
            "example": "offline",
            "type": "string"
          },
          "level": {
            "description": "Offline: `productive`, `neutral` or `unproductive`; deletion: `null`.",
            "type": [
              "string",
              "null"
            ]
          },
          "permissions": {
            "$ref": "#/components/schemas/TimeEntryPermissionsDto"
          },
          "projectId": {
            "description": "Always `null` until projects (Phase 6).",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "description": "`manual` (Phase 8 adds `calendar`).",
            "type": "string"
          },
          "start": {
            "example": "2026-10-05T07:00:00.000Z",
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "description": "`pending`, `approved` or `rejected`.",
            "example": "pending",
            "type": "string"
          },
          "timeZone": {
            "example": "Europe/Istanbul",
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id",
          "userId",
          "kind",
          "status",
          "date",
          "timeZone",
          "start",
          "end",
          "durationMs",
          "source",
          "createdBy",
          "createdAt",
          "updatedAt",
          "permissions"
        ],
        "type": "object"
      },
      "TimeEntryPage": {
        "description": "`GET /v1/time-entries`: by start.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/TimeEntryDto"
            },
            "type": "array"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "TimeEntryPermissionsDto": {
        "description": "What the caller may do with the entry (`TimeEntryPolicy.PermissionsFor`), the same on every endpoint.",
        "properties": {
          "canApprove": {
            "type": "boolean"
          },
          "canDelete": {
            "type": "boolean"
          },
          "canEdit": {
            "type": "boolean"
          }
        },
        "required": [
          "canEdit",
          "canDelete",
          "canApprove"
        ],
        "type": "object"
      },
      "TimeEntryUserRefDto": {
        "description": "A user reference of an entry (`fullName` from the directory; `null` when unknown).",
        "properties": {
          "fullName": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "object"
      },
      "TimeIntervalDto": {
        "description": "A UTC interval without any detail (e.g. a private interval).",
        "properties": {
          "end": {
            "example": "2026-10-05T07:15:00.000Z",
            "format": "date-time",
            "type": "string"
          },
          "start": {
            "example": "2026-10-05T06:30:00.000Z",
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "start",
          "end"
        ],
        "type": "object"
      },
      "TimerAtRequest": {
        "description": "`POST /v1/me/timer/stop` and `/discard`.",
        "properties": {
          "at": {
            "example": "2026-10-05T09:30:00.000Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "TimerCommandResultDto": {
        "description": "The result of a command (200 also when it did not apply).",
        "properties": {
          "applied": {
            "type": "boolean"
          },
          "closed": {
            "description": "The allocations written from the segment this command closed (may be empty).",
            "items": {
              "$ref": "#/components/schemas/AllocationDto"
            },
            "type": "array"
          },
          "reason": {
            "description": "`stale`, `not_running` or `unchanged`; `null` when applied.",
            "type": [
              "string",
              "null"
            ]
          },
          "timer": {
            "$ref": "#/components/schemas/TimerDto"
          }
        },
        "required": [
          "applied",
          "timer",
          "closed"
        ],
        "type": "object"
      },
      "TimerDto": {
        "description": "`GET /v1/me/timer` (`ETag: \"v<rowVersion>\"`, `\"v0\"` before the first command).",
        "properties": {
          "autoStopAt": {
            "description": "`startedAt` + 24 hours.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "effectiveBillable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "isBillable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "last": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimerLastDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "project": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/TimerProjectDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "segmentId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "serverTime": {
            "description": "The server's clock (clients compute the elapsed time against it).",
            "format": "date-time",
            "type": "string"
          },
          "source": {
            "description": "`web`, `desktop` or `api`.",
            "type": [
              "string",
              "null"
            ]
          },
          "startedAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "state": {
            "description": "`running` or `stopped`.",
            "example": "running",
            "type": "string"
          },
          "task": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/NamedRefDto"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "state",
          "serverTime"
        ],
        "type": "object"
      },
      "TimerLastDto": {
        "description": "The segment that ended last.",
        "properties": {
          "endReason": {
            "description": "`stop`, `switch`, `autostop` or `discard`.",
            "type": "string"
          },
          "endedAt": {
            "format": "date-time",
            "type": "string"
          },
          "segmentId": {
            "format": "uuid",
            "type": "string"
          },
          "startedAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "segmentId",
          "startedAt",
          "endedAt",
          "endReason"
        ],
        "type": "object"
      },
      "TimerProjectDto": {
        "description": "The project of the running segment.",
        "properties": {
          "clientName": {
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name"
        ],
        "type": "object"
      },
      "TimerStartRequest": {
        "description": "`POST /v1/me/timer/start` (`Idempotency-Key`: the client's command id): start, or switch while running.",
        "properties": {
          "at": {
            "description": "The client's clock when the command was given (default: the server's now; at most 5 minutes ahead, at most 7\ndays back).",
            "example": "2026-10-05T06:00:00.000Z",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "isBillable": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "note": {
            "type": [
              "string",
              "null"
            ]
          },
          "projectId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "source": {
            "description": "`web` (default), `desktop` or `api`.",
            "type": [
              "string",
              "null"
            ]
          },
          "taskId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "UiLocale": {
        "description": "Interface language (BCP 47), one of twenty in menu order. Input is case-insensitive (`pt-br` is stored as `pt-BR`); responses carry the canonical form. Server content (e-mails, sign-in pages, exports) is Turkish for `tr` and English for every other code.",
        "enum": [
          "en",
          "tr",
          "de",
          "fr",
          "es",
          "pt-BR",
          "it",
          "nl",
          "pl",
          "ru",
          "ja",
          "ko",
          "zh-CN",
          "ar",
          "id",
          "vi",
          "hi",
          "bn",
          "ur",
          "fa"
        ],
        "examples": [
          "tr"
        ],
        "type": "string"
      },
      "UpdateTimeEntryRequest": {
        "description": "`PUT /v1/time-entries/{id}`: the whole editable body (kind and user never change; `If-Match` instead of `version`).",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "end": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "level": {
            "type": [
              "string",
              "null"
            ]
          },
          "projectId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "start": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "UpdateWebhookEndpointRequest": {
        "additionalProperties": false,
        "description": "`PATCH /v1/webhook-endpoints/{id}` (`If-Match`).",
        "properties": {
          "description": {
            "description": "`null` clears it.",
            "type": [
              "string",
              "null"
            ]
          },
          "eventTypes": {
            "items": {
              "type": "string"
            },
            "type": [
              "array",
              "null"
            ]
          },
          "status": {
            "description": "`active` (also opens a `disabled` endpoint and resets its failure counters) or `paused`.",
            "type": [
              "string",
              "null"
            ]
          },
          "takeOver": {
            "description": "`true`: the caller becomes the endpoint's owner (lifts an `owner_inactive` pause).",
            "type": [
              "boolean",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "type": "object"
      },
      "UserDailyDto": {
        "description": "A user's days: computed days plus the workdays without activity up to the user's today.",
        "properties": {
          "days": {
            "items": {
              "$ref": "#/components/schemas/UserDayDto"
            },
            "type": "array"
          },
          "from": {
            "format": "date",
            "type": "string"
          },
          "teamId": {
            "description": "The user's current primary team (its rules classify every day).",
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "timeZone": {
            "type": "string"
          },
          "to": {
            "format": "date",
            "type": "string"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "userId",
          "timeZone",
          "from",
          "to",
          "days"
        ],
        "type": "object"
      },
      "UserDayDto": {
        "properties": {
          "absence": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DayAbsenceDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "absenceCreditMs": {
            "format": "int64",
            "type": "integer"
          },
          "activeMs": {
            "format": "int64",
            "type": "integer"
          },
          "afkCoverage": {
            "type": "boolean"
          },
          "arrivalAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "atWorkMs": {
            "format": "int64",
            "type": "integer"
          },
          "attendanceStatus": {
            "description": "`onTime`, `late`, `absent`, `notStarted`, `dayOff`, `onLeave`, `holiday`; `null` outside the directory.",
            "type": [
              "string",
              "null"
            ]
          },
          "classified": {
            "type": "boolean"
          },
          "date": {
            "format": "date",
            "type": "string"
          },
          "dayOffWorkedMs": {
            "format": "int64",
            "type": "integer"
          },
          "deletedMs": {
            "format": "int64",
            "type": "integer"
          },
          "effectivenessPct": {
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "eventCount": {
            "format": "int64",
            "type": "integer"
          },
          "expectedWorkMs": {
            "format": "int64",
            "type": "integer"
          },
          "holiday": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/DailyHolidayDto"
              },
              {
                "type": "null"
              }
            ]
          },
          "idleMs": {
            "format": "int64",
            "type": "integer"
          },
          "lateByMs": {
            "format": "int64",
            "type": "integer"
          },
          "leftAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "leftEarly": {
            "type": "boolean"
          },
          "leftEarlyByMs": {
            "format": "int64",
            "type": "integer"
          },
          "meetingMs": {
            "format": "int64",
            "type": "integer"
          },
          "neutralMs": {
            "format": "int64",
            "type": "integer"
          },
          "offlineMs": {
            "format": "int64",
            "type": "integer"
          },
          "overtimeMs": {
            "format": "int64",
            "type": "integer"
          },
          "planKind": {
            "description": "`schedule`, `shift`, `dayOff` or `holiday`.",
            "type": [
              "string",
              "null"
            ]
          },
          "privateMs": {
            "format": "int64",
            "type": "integer"
          },
          "productiveMs": {
            "format": "int64",
            "type": "integer"
          },
          "productivityPct": {
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "shiftCount": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "targetMs": {
            "format": "int64",
            "type": "integer"
          },
          "topApp": {
            "description": "Display name of the app with the most active time.",
            "type": [
              "string",
              "null"
            ]
          },
          "unproductiveMs": {
            "format": "int64",
            "type": "integer"
          },
          "unverifiedMs": {
            "description": "Window time of devices that sent no AFK data (not active; the UI warns about it).",
            "format": "int64",
            "type": "integer"
          },
          "workday": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "workedMs": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "date",
          "activeMs",
          "idleMs",
          "atWorkMs",
          "afkCoverage",
          "unverifiedMs",
          "eventCount",
          "productiveMs",
          "unproductiveMs",
          "neutralMs",
          "targetMs",
          "lateByMs",
          "leftEarly",
          "classified",
          "offlineMs",
          "privateMs",
          "deletedMs",
          "meetingMs",
          "workedMs",
          "overtimeMs",
          "dayOffWorkedMs",
          "leftEarlyByMs",
          "shiftCount",
          "absenceCreditMs",
          "expectedWorkMs"
        ],
        "type": "object"
      },
      "UserTotalDto": {
        "description": "One user of a summary.",
        "properties": {
          "absenceCreditMs": {
            "format": "int64",
            "type": "integer"
          },
          "absentDays": {
            "description": "Only for tracked users.",
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "activeDays": {
            "description": "Local days with active time.",
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "activeMs": {
            "format": "int64",
            "type": "integer"
          },
          "arrivalAt": {
            "description": "Earliest arrival and latest leave in the range.",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "atWorkMs": {
            "format": "int64",
            "type": "integer"
          },
          "classifiedDays": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "dayOffWorkedMs": {
            "format": "int64",
            "type": "integer"
          },
          "deletedMs": {
            "format": "int64",
            "type": "integer"
          },
          "effectivenessPct": {
            "description": "`null` without a target and for users missing from the directory.",
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ]
          },
          "eventCount": {
            "format": "int64",
            "type": "integer"
          },
          "fullName": {
            "type": [
              "string",
              "null"
            ]
          },
          "holidayDays": {
            "format": "double",
            "type": "number"
          },
          "idleMs": {
            "format": "int64",
            "type": "integer"
          },
          "lateDays": {
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "leaveDays": {
            "format": "double",
            "type": "number"
          },
          "leftAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "leftEarlyDays": {
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "meetingMs": {
            "format": "int64",
            "type": "integer"
          },
          "neutralMs": {
            "format": "int64",
            "type": "integer"
          },
          "offlineMs": {
            "format": "int64",
            "type": "integer"
          },
          "overtimeDays": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "overtimeMs": {
            "format": "int64",
            "type": "integer"
          },
          "privateMs": {
            "format": "int64",
            "type": "integer"
          },
          "productiveMs": {
            "format": "int64",
            "type": "integer"
          },
          "productivityPct": {
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "shiftDays": {
            "format": "int32",
            "minimum": 0,
            "type": "integer"
          },
          "targetMs": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "teamId": {
            "format": "uuid",
            "type": [
              "string",
              "null"
            ]
          },
          "teamName": {
            "type": [
              "string",
              "null"
            ]
          },
          "timeZone": {
            "type": "string"
          },
          "unproductiveMs": {
            "format": "int64",
            "type": "integer"
          },
          "userId": {
            "format": "uuid",
            "type": "string"
          },
          "workdays": {
            "format": "int32",
            "minimum": 0,
            "type": [
              "integer",
              "null"
            ]
          },
          "workedMs": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "userId",
          "timeZone",
          "activeMs",
          "idleMs",
          "atWorkMs",
          "activeDays",
          "eventCount",
          "productiveMs",
          "unproductiveMs",
          "neutralMs",
          "classifiedDays",
          "offlineMs",
          "privateMs",
          "deletedMs",
          "meetingMs",
          "workedMs",
          "overtimeMs",
          "overtimeDays",
          "dayOffWorkedMs",
          "leaveDays",
          "holidayDays",
          "shiftDays",
          "absenceCreditMs"
        ],
        "type": "object"
      },
      "WebhookDeliveryDetailDto": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookDeliveryDto"
          },
          {
            "properties": {
              "payload": {
                "description": "The thin delivery body, byte for byte what the receiver gets (ids only).",
                "type": "object"
              }
            },
            "required": [
              "payload"
            ],
            "type": "object"
          }
        ],
        "description": "`GET /v1/webhook-endpoints/{id}/deliveries/{deliveryId}`: the delivery and the body that was (or is) sent."
      },
      "WebhookDeliveryDto": {
        "description": "`WebhookDeliveryDto`.",
        "properties": {
          "attempts": {
            "format": "int32",
            "type": "integer"
          },
          "createdAt": {
            "type": "string"
          },
          "deliveredAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "eventId": {
            "description": "The `webhook-id` header.",
            "format": "uuid",
            "type": "string"
          },
          "eventType": {
            "type": "string"
          },
          "id": {
            "description": "A 64-bit integer as a string.",
            "type": "string"
          },
          "lastDurationMs": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "lastError": {
            "description": "`timeout`, `connect`, `tls`, `not_allowed`, `http_<code>`, `not_in_plan`, `owner_inactive`.",
            "type": [
              "string",
              "null"
            ]
          },
          "lastStatusCode": {
            "format": "int32",
            "type": [
              "integer",
              "null"
            ]
          },
          "nextAttemptAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "description": "`pending`, `succeeded`, `failed`, `dead`.",
            "type": "string"
          }
        },
        "required": [
          "id",
          "eventId",
          "eventType",
          "status",
          "attempts",
          "createdAt"
        ],
        "type": "object"
      },
      "WebhookDeliveryPage": {
        "description": "`GET /v1/webhook-endpoints/{id}/deliveries` (newest first).",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WebhookDeliveryDto"
            },
            "type": "array"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "WebhookEndpointDto": {
        "description": "`WebhookEndpointDto`.",
        "properties": {
          "createdAt": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "eventTypes": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "id": {
            "format": "uuid",
            "type": "string"
          },
          "owner": {
            "$ref": "#/components/schemas/MemberRefDto",
            "description": "The member who owns the endpoint (G1: a delivery needs an active Owner or Admin owner)."
          },
          "previousSecretExpiresAt": {
            "description": "After a rotation the previous secret still signs until then (24 hours).",
            "type": [
              "string",
              "null"
            ]
          },
          "secretPrefix": {
            "description": "The first 8 characters of the signing secret (`whsec_Kx`); never the secret.",
            "type": "string"
          },
          "stats": {
            "$ref": "#/components/schemas/WebhookEndpointStatsDto"
          },
          "status": {
            "description": "`active`, `paused`, `disabled`.",
            "type": "string"
          },
          "statusReason": {
            "description": "`manual`, `owner_inactive`, `failing`, `gone`; `null` while active.",
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "version": {
            "description": "`row_version` (`ETag: \"v<n>\"`, `If-Match` of `PATCH`).",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "url",
          "eventTypes",
          "status",
          "owner",
          "secretPrefix",
          "stats",
          "createdAt",
          "updatedAt",
          "version"
        ],
        "type": "object"
      },
      "WebhookEndpointPage": {
        "description": "`GET /v1/webhook-endpoints`.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WebhookEndpointDto"
            },
            "type": "array"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "WebhookEndpointStatsDto": {
        "description": "The delivery statistics of an endpoint.",
        "properties": {
          "consecutiveFailures": {
            "format": "int32",
            "type": "integer"
          },
          "lastFailureAt": {
            "type": [
              "string",
              "null"
            ]
          },
          "lastSuccessAt": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "consecutiveFailures"
        ],
        "type": "object"
      },
      "WebhookEventDto": {
        "description": "One event type of `GET /v1/webhook-events`.",
        "properties": {
          "available": {
            "description": "The tenant's plan has the feature: an endpoint may subscribe.",
            "type": "boolean"
          },
          "description": {
            "description": "One English sentence (the panel translates by `type`).",
            "type": "string"
          },
          "feature": {
            "description": "The plan feature the event needs (`null`: every plan with `api_access`).",
            "type": [
              "string",
              "null"
            ]
          },
          "object": {
            "description": "The `data.object` of the delivery body.",
            "type": "string"
          },
          "type": {
            "description": "`<object>.<verb>`, e.g. `time_entry.approved`.",
            "type": "string"
          }
        },
        "required": [
          "type",
          "object",
          "description",
          "available"
        ],
        "type": "object"
      },
      "WebhookEventsDto": {
        "description": "`GET /v1/webhook-events`.",
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/WebhookEventDto"
            },
            "type": "array"
          }
        },
        "required": [
          "items"
        ],
        "type": "object"
      },
      "WebhookTestDto": {
        "description": "`202` of `POST /v1/webhook-endpoints/{id}/test`.",
        "properties": {
          "deliveryId": {
            "description": "The delivery of the test event (a string: the deliveries' id is a 64-bit integer).",
            "type": "string"
          }
        },
        "required": [
          "deliveryId"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "apiKey": {
        "bearerFormat": "w360_pat",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "The documented, backward-compatible operations of the Workify360 Focus API v1 for personal access tokens (Authorization: Bearer w360_pat_…). A key reaches an operation when it holds the operation's scope and its owner's current role allows it.",
    "title": "Workify360 Focus public API",
    "version": "0.1.0"
  },
  "openapi": "3.1.0",
  "paths": {
    "/v1/absences": {
      "get": {
        "operationId": "listAbsences",
        "parameters": [
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "At most 366 days after `from`.",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "userId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "teamId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "typeId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AbsencePage"
                }
              }
            },
            "description": "The visible absences"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_request, range_too_long"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission)"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "List absences overlapping a range.",
        "tags": [
          "absences"
        ],
        "x-required-scope": "reports:read"
      },
      "post": {
        "operationId": "createAbsence",
        "parameters": [
          {
            "description": "Required: the same key and body return the first answer",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AbsenceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AbsenceDto"
                }
              }
            },
            "description": "Created (Location, ETag)"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_absence_unit, invalid_absence_range, invalid_half, unit_not_allowed, range_too_far"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "absence_type_not_found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "overlaps_absence, insufficient_balance, absence_type_inactive"
          }
        },
        "security": [
          {
            "apiKey": [
              "time:write"
            ]
          }
        ],
        "summary": "Request (or record) an absence.",
        "tags": [
          "absences"
        ],
        "x-required-scope": "time:write"
      }
    },
    "/v1/absences/{id}/decision": {
      "post": {
        "operationId": "decideAbsence",
        "parameters": [
          {
            "description": "Id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "ETag of the resource (`\"v<n>\"`); missing: 428, stale: 412",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CalendarDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AbsenceDto"
                }
              }
            },
            "description": "The decided absence (ETag)"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "absence_not_found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "absence_not_pending, insufficient_balance"
          },
          "412": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "version_conflict"
          },
          "428": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "precondition_required (no If-Match)"
          }
        },
        "security": [
          {
            "apiKey": [
              "time:write"
            ]
          }
        ],
        "summary": "Approve or reject an absence (the G1 endpoint of the calendar).",
        "tags": [
          "absences"
        ],
        "x-required-scope": "time:write"
      }
    },
    "/v1/activity/day": {
      "get": {
        "operationId": "getActivityDay",
        "parameters": [
          {
            "description": "The user's local day (required).",
            "example": "2026-10-05",
            "in": "query",
            "name": "date",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Default: the caller; another user must be visible (else 403).",
            "in": "query",
            "name": "userId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActivityDayDto"
                }
              }
            },
            "description": "The day (zeros without activity); another person's day is recorded in audit.data_access"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_request (malformed or missing parameter)"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission; a user outside the scope)"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "One user's local day (My Focus, the timeline): totals, productivity, attendance, day plan, slots, apps, time entries.",
        "tags": [
          "activity"
        ],
        "x-required-scope": "reports:read"
      }
    },
    "/v1/allocations": {
      "get": {
        "operationId": "listAllocations",
        "parameters": [
          {
            "description": "Default: the caller.",
            "in": "query",
            "name": "userId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Local date, included.",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Local date, included; at most 93 days after `from`.",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "projectId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1–200 (default 200).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllocationPage"
                }
              }
            },
            "description": "The allocations"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_request (malformed parameter), range_too_long"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission; a person outside the scope)"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "A person's allocations of a range of local days (the caller's, the people they manage, and the time on the projects they manage).",
        "tags": [
          "allocations"
        ],
        "x-required-scope": "reports:read"
      },
      "post": {
        "operationId": "createAllocation",
        "parameters": [
          {
            "description": "The same key and body return the first answer (a different body: 422 idempotency_key_reused)",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AllocationCreateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AllocationCreatedDto"
                }
              }
            },
            "description": "Created (Location, ETag)"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "range_in_future, range_too_old"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden, project_not_trackable"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "project_not_found, task_not_found, member_not_found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "allocation_overlaps, allocation_billed, project_not_active"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "validation_failed, allocation_too_long, task_not_in_project"
          }
        },
        "security": [
          {
            "apiKey": [
              "time:write"
            ]
          }
        ],
        "summary": "Put time on a project: entered (`manual`) or tracked time assigned afterwards (`assignment`); for another person with `allocations.write`.",
        "tags": [
          "allocations"
        ],
        "x-required-scope": "time:write"
      }
    },
    "/v1/dev-metrics/members": {
      "get": {
        "operationId": "listDevMetricsMembers",
        "parameters": [
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "teamId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "source",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`name` (default); a metric key only with `devMetrics.teamComparison` (422 `dev_metrics_ranking_disabled`).",
            "in": "query",
            "name": "sort",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "At most 100.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevMemberPage"
                }
              }
            },
            "description": "One page of people"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_request"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan (dev_metrics)"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (dev_metrics.team.read)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "team_not_found (also a team the caller may not see)"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "dev_metrics_not_configured, dev_metrics_disabled"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "dev_metrics_ranking_disabled"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "The people of a team or the company with their counts (name order; a metric order only with `teamComparison`).",
        "tags": [
          "dev-metrics"
        ],
        "x-required-scope": "reports:read"
      }
    },
    "/v1/dev-metrics/members/{userId}": {
      "get": {
        "operationId": "getDevMetricsMember",
        "parameters": [
          {
            "description": "The person",
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "groupBy",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "source",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevMemberDetailDto"
                }
              }
            },
            "description": "The person's metrics"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_request (from, to, groupBy, source)"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan (dev_metrics)"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "member_not_found (also for somebody the caller may not see)"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "dev_metrics_not_configured, dev_metrics_disabled"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "One person's cards: totals, series, per active hour, medians.",
        "tags": [
          "dev-metrics"
        ],
        "x-required-scope": "reports:read"
      }
    },
    "/v1/dev-metrics/members/{userId}/items": {
      "get": {
        "operationId": "listDevMetricsMemberItems",
        "parameters": [
          {
            "description": "The person",
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`commits`, `pull_requests`, `reviews`, `issues`.",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevItemPage"
                }
              }
            },
            "description": "One page of items"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_request (type, cursor)"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan (dev_metrics)"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "member_not_found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "dev_metrics_not_configured, dev_metrics_disabled"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "One person's items: commits, pull requests, reviews or issues (references and links only; lines with\n`lines = detail`).",
        "tags": [
          "dev-metrics"
        ],
        "x-required-scope": "reports:read"
      }
    },
    "/v1/dev-metrics/summary": {
      "get": {
        "operationId": "getDevMetricsSummary",
        "parameters": [
          {
            "description": "First local day (`YYYY-MM-DD`).",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Last local day (inclusive).",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "A team the caller may see.",
            "in": "query",
            "name": "teamId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "A person the caller may see (default: the caller).",
            "in": "query",
            "name": "userId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "`github`, `bitbucket`, `gitlab`, `jira`.",
            "in": "query",
            "name": "source",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`day` (default), `week`, `month`.",
            "in": "query",
            "name": "groupBy",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DevSummaryDto"
                }
              }
            },
            "description": "The period's totals, series and coverage"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_request (from, to, groupBy, source)"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan (dev_metrics)"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "member_not_found, team_not_found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "dev_metrics_not_configured, dev_metrics_disabled"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "The counts of a period for the caller, a team or a person, with a series by day, week or month.",
        "tags": [
          "dev-metrics"
        ],
        "x-required-scope": "reports:read"
      }
    },
    "/v1/exports": {
      "post": {
        "operationId": "createExport",
        "parameters": [
          {
            "description": "Required: the same key and body return the first answer",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateExportRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJobDto"
                }
              }
            },
            "description": "Queued (Location)"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_dataset, range_too_long, too_many_columns_for_pdf"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission; a user or team outside the scope; includeCosts without the right to see amounts)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "template_not_found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "export_not_available"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "validation_failed"
          },
          "429": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "too_many_exports"
          },
          "503": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "export_storage_unavailable"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "Request an export: the file is produced by a worker job with the requester's current role.",
        "tags": [
          "exports"
        ],
        "x-required-scope": "reports:read"
      }
    },
    "/v1/exports/{id}": {
      "get": {
        "operationId": "getExport",
        "parameters": [
          {
            "description": "Id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExportJobDto"
                }
              }
            },
            "description": "The job"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission; a user or team outside the scope)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "export_not_found"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "One export job (poll every 2 s).",
        "tags": [
          "exports"
        ],
        "x-required-scope": "reports:read"
      }
    },
    "/v1/invitations": {
      "post": {
        "operationId": "createInvitation",
        "parameters": [
          {
            "description": "Required: 1–255 printable ASCII characters",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvitation"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/InvitationResult"
                }
              }
            },
            "description": "Invited"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "already_member"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "validation_failed, idempotency_key_reused"
          }
        },
        "security": [
          {
            "apiKey": [
              "org:admin"
            ]
          }
        ],
        "summary": "Invite a person.",
        "tags": [
          "members"
        ],
        "x-required-scope": "org:admin"
      }
    },
    "/v1/me": {
      "get": {
        "operationId": "getMe",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MeDto"
                }
              }
            },
            "description": "The caller"
          },
          "401": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "unauthorized"
          }
        },
        "security": [
          {
            "apiKey": [
              "me"
            ]
          }
        ],
        "summary": "The signed-in person, their membership, organization, rights and session.",
        "tags": [
          "me"
        ],
        "x-required-scope": "me"
      }
    },
    "/v1/me/timer": {
      "get": {
        "operationId": "getMyTimer",
        "parameters": [
          {
            "description": "The ETag the caller holds (304 when unchanged)",
            "in": "header",
            "name": "If-None-Match",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimerDto"
                }
              }
            },
            "description": "The timer (ETag \"v<rowVersion>-<digest of the body without serverTime>\")"
          },
          "304": {
            "description": "Unchanged (If-None-Match)"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission)"
          }
        },
        "security": [
          {
            "apiKey": [
              "me"
            ]
          }
        ],
        "summary": "The caller's timer (a segment due after 24 hours is stopped first).",
        "tags": [
          "timer"
        ],
        "x-required-scope": "me"
      }
    },
    "/v1/me/timer/start": {
      "post": {
        "operationId": "startMyTimer",
        "parameters": [
          {
            "description": "The client's command id; a retry returns the first answer",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimerStartRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimerCommandResultDto"
                }
              }
            },
            "description": "The command result (also when it did not apply: stale, unchanged)"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "range_in_future"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden, project_not_trackable"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "project_not_found, task_not_found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "project_not_active, task_not_open, allocation_overlaps"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "validation_failed, timer_command_too_old, task_not_in_project"
          }
        },
        "security": [
          {
            "apiKey": [
              "me"
            ]
          }
        ],
        "summary": "Start the timer, or switch the running one to another project or task, at `at` (the client's clock).",
        "tags": [
          "timer"
        ],
        "x-required-scope": "me"
      }
    },
    "/v1/me/timer/stop": {
      "post": {
        "operationId": "stopMyTimer",
        "parameters": [
          {
            "description": "The client's command id; a retry returns the first answer",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimerAtRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimerCommandResultDto"
                }
              }
            },
            "description": "The command result (not_running and stale are 200 too)"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "range_in_future"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission)"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "allocation_overlaps"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "timer_command_too_old"
          }
        },
        "security": [
          {
            "apiKey": [
              "me"
            ]
          }
        ],
        "summary": "Stop the running timer at `at`; its segment becomes allocations.",
        "tags": [
          "timer"
        ],
        "x-required-scope": "me"
      }
    },
    "/v1/members": {
      "get": {
        "operationId": "listMembers",
        "parameters": [
          {
            "description": "Comma-separated statuses (default active,invited,suspended)",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Primary team",
            "in": "query",
            "name": "teamId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "owner, admin, team_admin, manager or employee",
            "in": "query",
            "name": "role",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Part of the name or e-mail (Turkish case folding)",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Opaque cursor of the next page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1–200, default 50",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberPage"
                }
              }
            },
            "description": "Visible members, sorted by name"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "No right"
          }
        },
        "security": [
          {
            "apiKey": [
              "org:admin"
            ]
          }
        ],
        "summary": "List members.",
        "tags": [
          "members"
        ],
        "x-required-scope": "org:admin"
      }
    },
    "/v1/members/{id}": {
      "get": {
        "operationId": "getMember",
        "parameters": [
          {
            "description": "Membership id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberDto"
                }
              }
            },
            "description": "The member (ETag: \"v<n>\")"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "member_not_found"
          }
        },
        "security": [
          {
            "apiKey": [
              "org:admin"
            ]
          }
        ],
        "summary": "One member.",
        "tags": [
          "members"
        ],
        "x-required-scope": "org:admin"
      },
      "patch": {
        "operationId": "updateMember",
        "parameters": [
          {
            "description": "Membership id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "ETag of the member (\"v<n>\")",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchMember"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberDto"
                }
              }
            },
            "description": "The changed member"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "self_change_forbidden, owner_immutable, role_not_assignable, team_required, viewer_teams_not_allowed"
          },
          "412": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "version_conflict"
          },
          "428": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "precondition_required"
          }
        },
        "security": [
          {
            "apiKey": [
              "org:admin"
            ]
          }
        ],
        "summary": "Change a member's role, team, viewer teams, zone or tracking.",
        "tags": [
          "members"
        ],
        "x-required-scope": "org:admin"
      }
    },
    "/v1/members/{id}/reactivate": {
      "post": {
        "operationId": "reactivateMember",
        "parameters": [
          {
            "description": "Membership id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberDto"
                }
              }
            },
            "description": "The active member"
          }
        },
        "security": [
          {
            "apiKey": [
              "org:admin"
            ]
          }
        ],
        "summary": "Reactivate a suspended member.",
        "tags": [
          "members"
        ],
        "x-required-scope": "org:admin"
      }
    },
    "/v1/members/{id}/suspend": {
      "post": {
        "operationId": "suspendMember",
        "parameters": [
          {
            "description": "Membership id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MemberDto"
                }
              }
            },
            "description": "The suspended member"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "conflict (an invitation is revoked instead)"
          }
        },
        "security": [
          {
            "apiKey": [
              "org:admin"
            ]
          }
        ],
        "summary": "Suspend a member: the membership is `suspended` and every session of it in this organization ends.",
        "tags": [
          "members"
        ],
        "x-required-scope": "org:admin"
      }
    },
    "/v1/projects": {
      "get": {
        "operationId": "listProjects",
        "parameters": [
          {
            "description": "`active`, `on_hold` or `completed`.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "clientId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Name or code search (case-insensitive).",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeArchived",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Only the projects the caller may track time on.",
            "in": "query",
            "name": "mine",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1–200 (default 50).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectPage"
                }
              }
            },
            "description": "The projects"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_request (malformed parameter)"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission)"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "The projects the caller sees (Owners and Admins: all; others: open ones, their teams and, read only, the projects of the people they manage).",
        "tags": [
          "projects"
        ],
        "x-required-scope": "reports:read"
      },
      "post": {
        "operationId": "createProject",
        "parameters": [
          {
            "description": "The same key and body return the first answer (a different body: 422 idempotency_key_reused)",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDto"
                }
              }
            },
            "description": "Created (Location, ETag)"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "client_not_found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "project_name_taken, project_code_taken"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "validation_failed (errors[] = field codes)"
          }
        },
        "security": [
          {
            "apiKey": [
              "org:admin"
            ]
          }
        ],
        "summary": "Add a project (Owners and Admins).",
        "tags": [
          "projects"
        ],
        "x-required-scope": "org:admin"
      }
    },
    "/v1/projects/{id}": {
      "get": {
        "operationId": "getProject",
        "parameters": [
          {
            "description": "Project id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDto"
                }
              }
            },
            "description": "The project (ETag)"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "project_not_found"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "One project (invisible projects are 404).",
        "tags": [
          "projects"
        ],
        "x-required-scope": "reports:read"
      },
      "put": {
        "operationId": "updateProject",
        "parameters": [
          {
            "description": "Project id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The ETag the caller read (412 version_conflict when it changed)",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProjectRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectDto"
                }
              }
            },
            "description": "Saved (ETag)"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "project_not_found, client_not_found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "project_name_taken, project_code_taken, project_currency_locked"
          },
          "412": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "version_conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "validation_failed (errors[] = field codes)"
          },
          "428": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "precondition_required (If-Match)"
          }
        },
        "security": [
          {
            "apiKey": [
              "org:admin"
            ]
          }
        ],
        "summary": "Change a project (Owners and Admins; the whole body).",
        "tags": [
          "projects"
        ],
        "x-required-scope": "org:admin"
      }
    },
    "/v1/projects/{id}/tasks": {
      "get": {
        "operationId": "listProjectTasks",
        "parameters": [
          {
            "description": "Project id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "`open`, `in_progress` or `done`.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "assigneeUserId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "includeArchived",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1–500 (default 200).",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskPage"
                }
              }
            },
            "description": "The tasks"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_request (malformed parameter)"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "project_not_found"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "A visible project's tasks, by sort order.",
        "tags": [
          "tasks"
        ],
        "x-required-scope": "reports:read"
      },
      "post": {
        "operationId": "createTask",
        "parameters": [
          {
            "description": "Project id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The same key and body return the first answer (a different body: 422 idempotency_key_reused)",
            "in": "header",
            "name": "Idempotency-Key",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDto"
                }
              }
            },
            "description": "Created (Location, ETag)"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden, project_not_trackable (the assignee)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "project_not_found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "task_name_taken"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "validation_failed (errors[] = field codes)"
          }
        },
        "security": [
          {
            "apiKey": [
              "time:write"
            ]
          }
        ],
        "summary": "Add a task (an Admin or the project's manager).",
        "tags": [
          "tasks"
        ],
        "x-required-scope": "time:write"
      }
    },
    "/v1/reports/productivity": {
      "get": {
        "operationId": "getProductivityReport",
        "parameters": [
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "`day` 93 days, `week`, `month` and `range` 366.",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "`day`, `week`, `month` or `range`.",
            "in": "query",
            "name": "groupBy",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "teamId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "userId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PeriodReportDto"
                }
              }
            },
            "description": "The report"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_request (malformed parameter), invalid_group_by, range_too_long"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission; a user or team outside the scope)"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "Productivity by day, week, month or range for the company, a team or a user.",
        "tags": [
          "reports"
        ],
        "x-required-scope": "reports:read"
      }
    },
    "/v1/reports/projects": {
      "get": {
        "operationId": "getProjectReport",
        "parameters": [
          {
            "description": "Local date, included.",
            "example": "2026-10-01",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Local date, included; at most 366 days after `from`.",
            "example": "2026-10-31",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "One or two of `project` (default), `task`, `user`, `client`, `day`, comma separated.",
            "example": "project,user",
            "in": "query",
            "name": "groupBy",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Comma-separated project ids.",
            "in": "query",
            "name": "projectIds",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "clientId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Comma-separated user ids (visible people only).",
            "in": "query",
            "name": "userIds",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "teamId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "`all` (default), `billable` or `nonBillable`.",
            "in": "query",
            "name": "billable",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Also compute the productive time within the allocations (costly; default false).",
            "in": "query",
            "name": "includeProductive",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProjectReportDto"
                }
              }
            },
            "description": "The report (amounts only with costsIncluded)"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_request (malformed parameter), invalid_group_by, range_too_long"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission; a user or team outside the scope)"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "Allocated time, billable time and the rate-layered amounts (Owners and Admins) of projects in a range, grouped by\none or two of project, task, user, client and day, with the projects' budget use.",
        "tags": [
          "reports"
        ],
        "x-required-scope": "reports:read"
      }
    },
    "/v1/reports/summary": {
      "get": {
        "operationId": "getReportSummary",
        "parameters": [
          {
            "example": "2026-09-19",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "At most 93 days after `from`.",
            "example": "2026-09-25",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "Only the team's current members; the team must be visible (else 403).",
            "in": "query",
            "name": "teamId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SummaryDto"
                }
              }
            },
            "description": "The summary"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_request (malformed parameter), range_too_long"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission; a team outside the scope)"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "The summary of the visible users over a range.",
        "tags": [
          "reports"
        ],
        "x-required-scope": "reports:read"
      }
    },
    "/v1/reports/targets": {
      "get": {
        "operationId": "listReportTargets",
        "parameters": [
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "`app`, `domain` or `host`.",
            "in": "query",
            "name": "type",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "teamId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "userId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Search in the key and the name (.NET `search`).",
            "in": "query",
            "name": "q",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`productive`, `unproductive` or `neutral`.",
            "in": "query",
            "name": "level",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "categoryKey",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Only targets without a category.",
            "in": "query",
            "name": "unclassified",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1–200, default 50.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TargetListDto"
                }
              }
            },
            "description": "One page of the list"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_request (malformed parameter or cursor), invalid_level, range_too_long"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission; a user or team outside the scope)"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "The apps, domains or hosts of the visible users over a range (Apps & URLs).",
        "tags": [
          "reports"
        ],
        "x-required-scope": "reports:read"
      }
    },
    "/v1/reports/users/{userId}/daily": {
      "get": {
        "operationId": "getUserDailyReport",
        "parameters": [
          {
            "description": "User",
            "in": "path",
            "name": "userId",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "At most 93 days after `from`.",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UserDailyDto"
                }
              }
            },
            "description": "The days"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_request (malformed parameter), range_too_long"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission; a user outside the scope)"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "A user's days of a range (computed days and the workdays without activity).",
        "tags": [
          "reports"
        ],
        "x-required-scope": "reports:read"
      }
    },
    "/v1/shifts": {
      "get": {
        "operationId": "listShifts",
        "parameters": [
          {
            "example": "2026-10-01",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "example": "2026-10-31",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "teamId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "userId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "Also open shifts (default true).",
            "in": "query",
            "name": "includeOpen",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShiftListDto"
                }
              }
            },
            "description": "Shifts starting in the range, by start"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_request (malformed parameter)"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission)"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "List the shifts starting in a range.",
        "tags": [
          "shifts"
        ],
        "x-required-scope": "reports:read"
      },
      "post": {
        "operationId": "createShift",
        "parameters": [
          {
            "description": "Required: the same key and body return the first answer",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ShiftBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ShiftDto"
                }
              }
            },
            "description": "Created (Location, ETag)"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_shift_time, invalid_break, open_shift_requires_team, …"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission)"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "overlaps_shift, shift_in_past"
          }
        },
        "security": [
          {
            "apiKey": [
              "time:write"
            ]
          }
        ],
        "summary": "Create a shift (assigned or open).",
        "tags": [
          "shifts"
        ],
        "x-required-scope": "time:write"
      }
    },
    "/v1/tasks/{id}": {
      "get": {
        "operationId": "getTask",
        "parameters": [
          {
            "description": "Task id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDto"
                }
              }
            },
            "description": "The task (ETag)"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "task_not_found"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "One task of a visible project.",
        "tags": [
          "tasks"
        ],
        "x-required-scope": "reports:read"
      },
      "put": {
        "operationId": "updateTask",
        "parameters": [
          {
            "description": "Task id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The ETag the caller read (412 version_conflict when it changed)",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TaskRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskDto"
                }
              }
            },
            "description": "Saved (ETag)"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden, project_not_trackable (the assignee)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "task_not_found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "task_name_taken"
          },
          "412": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "version_conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "validation_failed (errors[] = field codes)"
          },
          "428": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "precondition_required (If-Match)"
          }
        },
        "security": [
          {
            "apiKey": [
              "time:write"
            ]
          }
        ],
        "summary": "Change a task (the whole body).",
        "tags": [
          "tasks"
        ],
        "x-required-scope": "time:write"
      }
    },
    "/v1/teams": {
      "get": {
        "operationId": "listTeams",
        "parameters": [
          {
            "description": "Also archived teams (default false)",
            "in": "query",
            "name": "includeArchived",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "description": "Opaque cursor of the next page",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1–200, default 50",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamPage"
                }
              }
            },
            "description": "Visible teams, sorted by name"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "List teams.",
        "tags": [
          "teams"
        ],
        "x-required-scope": "reports:read"
      },
      "post": {
        "operationId": "createTeam",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTeam"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamDto"
                }
              }
            },
            "description": "Created (Location, ETag)"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action teams.create)"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "team_name_taken"
          }
        },
        "security": [
          {
            "apiKey": [
              "org:admin"
            ]
          }
        ],
        "summary": "Create a team (the G1 endpoint).",
        "tags": [
          "teams"
        ],
        "x-required-scope": "org:admin"
      }
    },
    "/v1/teams/{id}": {
      "patch": {
        "operationId": "updateTeam",
        "parameters": [
          {
            "description": "Team id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "ETag of the team",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchTeam"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TeamDto"
                }
              }
            },
            "description": "The changed team"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "team_name_taken"
          }
        },
        "security": [
          {
            "apiKey": [
              "org:admin"
            ]
          }
        ],
        "summary": "Rename a team or change its description.",
        "tags": [
          "teams"
        ],
        "x-required-scope": "org:admin"
      }
    },
    "/v1/time-entries": {
      "get": {
        "operationId": "listTimeEntries",
        "parameters": [
          {
            "description": "Default: the caller.",
            "in": "query",
            "name": "userId",
            "required": false,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The entry's local day, required.",
            "example": "2026-10-01",
            "in": "query",
            "name": "from",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "At most 93 days after `from`.",
            "example": "2026-10-31",
            "in": "query",
            "name": "to",
            "required": false,
            "schema": {
              "format": "date",
              "type": "string"
            }
          },
          {
            "description": "`offline` or `deletion`.",
            "in": "query",
            "name": "kind",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "`pending`, `approved` or `rejected`.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1–500.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryPage"
                }
              }
            },
            "description": "The entries"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_request, range_too_long, invalid_kind"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission)"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "List a user's time entries of a range (by start).",
        "tags": [
          "time-entries"
        ],
        "x-required-scope": "reports:read"
      },
      "post": {
        "operationId": "createTimeEntry",
        "parameters": [
          {
            "description": "Required: the same key and body return the first answer",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTimeEntryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryDto"
                }
              }
            },
            "description": "Created (Location, ETag)"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_time_range, range_not_in_one_day, range_in_future, range_too_old, invalid_description, invalid_level, invalid_kind, project_not_supported"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden, offline_time_disabled, time_editing_disabled"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "user_not_found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "overlaps_entry"
          }
        },
        "security": [
          {
            "apiKey": [
              "time:write"
            ]
          }
        ],
        "summary": "Add offline time or a deletion (for oneself, or for a user one manages: TimeEntryPolicy in the handler).",
        "tags": [
          "time-entries"
        ],
        "x-required-scope": "time:write"
      }
    },
    "/v1/time-entries/{id}": {
      "delete": {
        "operationId": "deleteTimeEntry",
        "parameters": [
          {
            "description": "Entry id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "ETag of the resource (`\"v<n>\"`); missing: 428, stale: 412",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden, offline_time_disabled, time_editing_disabled"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "entry_not_found"
          },
          "412": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "version_conflict"
          },
          "428": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "precondition_required (no If-Match)"
          }
        },
        "security": [
          {
            "apiKey": [
              "time:write"
            ]
          }
        ],
        "summary": "Delete an entry (deleting a deletion restores the tracked time).",
        "tags": [
          "time-entries"
        ],
        "x-required-scope": "time:write"
      },
      "get": {
        "operationId": "getTimeEntry",
        "parameters": [
          {
            "description": "Entry id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryDto"
                }
              }
            },
            "description": "The entry (ETag)"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "entry_not_found"
          }
        },
        "security": [
          {
            "apiKey": [
              "reports:read"
            ]
          }
        ],
        "summary": "One time entry (invisible, missing and other tenants' entries are all 404).",
        "tags": [
          "time-entries"
        ],
        "x-required-scope": "reports:read"
      },
      "put": {
        "operationId": "updateTimeEntry",
        "parameters": [
          {
            "description": "Entry id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "ETag of the resource (`\"v<n>\"`); missing: 428, stale: 412",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTimeEntryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryDto"
                }
              }
            },
            "description": "The changed entry (ETag)"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_time_range, range_not_in_one_day, range_in_future, range_too_old, invalid_description, invalid_level, invalid_kind, project_not_supported"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden, offline_time_disabled, time_editing_disabled"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "entry_not_found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "overlaps_entry"
          },
          "412": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "version_conflict"
          },
          "428": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "precondition_required (no If-Match)"
          }
        },
        "security": [
          {
            "apiKey": [
              "time:write"
            ]
          }
        ],
        "summary": "Replace an entry's editable fields.",
        "tags": [
          "time-entries"
        ],
        "x-required-scope": "time:write"
      }
    },
    "/v1/time-entries/{id}/decision": {
      "post": {
        "operationId": "decideTimeEntry",
        "parameters": [
          {
            "description": "Entry id",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "ETag of the resource (`\"v<n>\"`); missing: 428, stale: 412",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TimeEntryDecisionRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TimeEntryDto"
                }
              }
            },
            "description": "The decided entry (ETag)"
          },
          "400": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "invalid_request"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission)"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "entry_not_found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "entry_not_pending"
          },
          "412": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "version_conflict"
          },
          "428": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "precondition_required (no If-Match)"
          }
        },
        "security": [
          {
            "apiKey": [
              "time:write"
            ]
          }
        ],
        "summary": "Approve or reject a pending offline entry (the G1 endpoint of the time module).",
        "tags": [
          "time-entries"
        ],
        "x-required-scope": "time:write"
      }
    },
    "/v1/webhook-endpoints": {
      "get": {
        "operationId": "listWebhookEndpoints",
        "parameters": [
          {
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1–200, default 50.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointPage"
                }
              }
            },
            "description": "Newest first"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = webhooks.manage), feature_not_enabled"
          }
        },
        "security": [
          {
            "apiKey": [
              "webhooks:manage"
            ]
          }
        ],
        "summary": "The tenant's webhook endpoints.",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      },
      "post": {
        "operationId": "createWebhookEndpoint",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookEndpointRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreatedWebhookEndpointDto"
                }
              }
            },
            "description": "Created (ETag); `secret` is shown once"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = webhooks.manage), feature_not_enabled"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "webhook_limit_reached"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "validation_failed, webhook_url_invalid, webhook_url_not_allowed, webhook_event_unknown"
          }
        },
        "security": [
          {
            "apiKey": [
              "webhooks:manage"
            ]
          }
        ],
        "summary": "Add a webhook endpoint (its signing secret is in this answer only; no `Idempotency-Key`: the answer holds a\nsecret).",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhook-endpoints/{id}": {
      "delete": {
        "operationId": "deleteWebhookEndpoint",
        "parameters": [
          {
            "description": "The endpoint",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Deleted"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = webhooks.manage), feature_not_enabled"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "webhook_endpoint_not_found"
          }
        },
        "security": [
          {
            "apiKey": [
              "webhooks:manage"
            ]
          }
        ],
        "summary": "Delete an endpoint and its deliveries.",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      },
      "get": {
        "operationId": "getWebhookEndpoint",
        "parameters": [
          {
            "description": "The endpoint",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointDto"
                }
              }
            },
            "description": "The endpoint (ETag)"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = webhooks.manage), feature_not_enabled"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "webhook_endpoint_not_found"
          }
        },
        "security": [
          {
            "apiKey": [
              "webhooks:manage"
            ]
          }
        ],
        "summary": "One webhook endpoint.",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      },
      "patch": {
        "operationId": "updateWebhookEndpoint",
        "parameters": [
          {
            "description": "The endpoint",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The endpoint's ETag (`\"v<n>\"`)",
            "in": "header",
            "name": "If-Match",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookEndpointRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointDto"
                }
              }
            },
            "description": "The changed endpoint (ETag)"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = webhooks.manage), feature_not_enabled"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "webhook_endpoint_not_found"
          },
          "412": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "version_conflict"
          },
          "422": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "validation_failed, webhook_url_invalid, webhook_url_not_allowed, webhook_event_unknown"
          },
          "428": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "precondition_required"
          }
        },
        "security": [
          {
            "apiKey": [
              "webhooks:manage"
            ]
          }
        ],
        "summary": "Change an endpoint: URL, description, events, pause or resume (`active` also opens a `disabled` endpoint),\ntake it over.",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhook-endpoints/{id}/deliveries": {
      "get": {
        "operationId": "listWebhookDeliveries",
        "parameters": [
          {
            "description": "The endpoint",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "`pending`, `succeeded`, `failed`, `dead`.",
            "in": "query",
            "name": "status",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "name": "eventType",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Opaque cursor of the next page.",
            "in": "query",
            "name": "cursor",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "1–200, default 50.",
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "format": "int32",
              "minimum": 0,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryPage"
                }
              }
            },
            "description": "Newest first"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = webhooks.manage), feature_not_enabled"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "webhook_endpoint_not_found"
          }
        },
        "security": [
          {
            "apiKey": [
              "webhooks:manage"
            ]
          }
        ],
        "summary": "The deliveries of an endpoint, newest first.",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhook-endpoints/{id}/deliveries/{deliveryId}": {
      "get": {
        "operationId": "getWebhookDelivery",
        "parameters": [
          {
            "description": "The endpoint",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The delivery (a 64-bit integer)",
            "in": "path",
            "name": "deliveryId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookDeliveryDetailDto"
                }
              }
            },
            "description": "The delivery and its body"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = webhooks.manage), feature_not_enabled"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "webhook_endpoint_not_found, webhook_delivery_not_found"
          }
        },
        "security": [
          {
            "apiKey": [
              "webhooks:manage"
            ]
          }
        ],
        "summary": "One delivery with the body that was sent.",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhook-endpoints/{id}/deliveries/{deliveryId}/retry": {
      "post": {
        "operationId": "retryWebhookDelivery",
        "parameters": [
          {
            "description": "The endpoint",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          },
          {
            "description": "The delivery (a 64-bit integer)",
            "in": "path",
            "name": "deliveryId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptedDto"
                }
              }
            },
            "description": "Queued again"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = webhooks.manage), feature_not_enabled"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "webhook_endpoint_not_found, webhook_delivery_not_found"
          }
        },
        "security": [
          {
            "apiKey": [
              "webhooks:manage"
            ]
          }
        ],
        "summary": "Queue a failed or dead delivery again (attempts start over).",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhook-endpoints/{id}/rotate-secret": {
      "post": {
        "operationId": "rotateWebhookSecret",
        "parameters": [
          {
            "description": "The endpoint",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RotatedWebhookSecretDto"
                }
              }
            },
            "description": "The new secret, shown once"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = webhooks.manage), feature_not_enabled"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "webhook_endpoint_not_found"
          }
        },
        "security": [
          {
            "apiKey": [
              "webhooks:manage"
            ]
          }
        ],
        "summary": "A new signing secret (the previous one still signs for 24 hours).",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhook-endpoints/{id}/test": {
      "post": {
        "operationId": "testWebhookEndpoint",
        "parameters": [
          {
            "description": "The endpoint",
            "in": "path",
            "name": "id",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookTestDto"
                }
              }
            },
            "description": "The test delivery is queued"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = webhooks.manage), feature_not_enabled"
          },
          "404": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "webhook_endpoint_not_found"
          },
          "409": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "connection_paused (a disabled endpoint)"
          }
        },
        "security": [
          {
            "apiKey": [
              "webhooks:manage"
            ]
          }
        ],
        "summary": "Send the `webhook.test` event (also to a paused endpoint).",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    },
    "/v1/webhook-events": {
      "get": {
        "operationId": "listWebhookEvents",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEventsDto"
                }
              }
            },
            "description": "The event catalog (v1) in display order"
          },
          "402": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "feature_not_in_plan, subscription_read_only"
          },
          "403": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "forbidden (action = the permission), feature_not_enabled"
          }
        },
        "security": [
          {
            "apiKey": [
              "webhooks:manage"
            ]
          }
        ],
        "summary": "The webhook event catalog and whether the tenant's plan has each event.",
        "tags": [
          "webhooks"
        ],
        "x-required-scope": "webhooks:manage"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.focus.workify360.com"
    }
  ]
}
