{
  "info": {
    "title": "Common Information",
    "description": "\n# Common Information\n\n\n## FeathersJS Query Syntax\n\nThis API uses FeathersJS query syntax for filtering, sorting, and pagination. All `find` operations support these parameters.\n\n### Pagination\n\n- **`$limit`** - Maximum number of records to return (default: 10, max: 50)\n- **`$skip`** - Number of records to skip for pagination\n\n### Sorting\n\n- **`$sort[field]`** - Sort by field. Use 1 for ascending, -1 for descending\n  - Example: `?$sort[createdAt]=-1`\n\n### Field Selection\n\n- **`$select[]`** - Select specific fields to include in response\n  - Example: `?$select[]=_id&$select[]=name`\n\n### Comparison Operators\n\n- **`field[$in][]`** - Match any value in array\n  - Example: `?status[$in][]=active&status[$in][]=pending`\n- **`field[$nin][]`** - Match values not in array\n- **`field[$lt]`** - Less than\n- **`field[$lte]`** - Less than or equal\n- **`field[$gt]`** - Greater than\n- **`field[$gte]`** - Greater than or equal\n- **`field[$ne]`** - Not equal\n\n### Logical Operators\n\n- **`$or`** - Match any condition in array\n  - Example: `?$or[0][status]=active&$or[1][priority]=high`\n\nFor complete documentation, see [FeathersJS Querying](https://feathersjs.com/api/databases/querying)\n  \n\n## Authentication\n\nAll endpoints (except `/authentication` and `/authManagement`) require authentication using a Bearer token.\n\nInclude the token in the `Authorization` header:\n```\nAuthorization: Bearer YOUR_ACCESS_TOKEN\n```\n\n## Common Fields\n\nAll records include these standard fields: `createdBy`, `createdAt`, `updatedBy`, `updatedAt`. See the CommonFields schema for details.\n\n## Standard Responses\n\nAll endpoints return standard error responses. See the Error schema for details.\n      ",
    "version": "1.150.0",
    "x-logo": {
      "url": "/keephub_logo.svg",
      "altText": "Keephub",
      "backgroundColor": "#FFFFFF",
      "href": "https://www.keephub.io"
    },
    "x-docsMetadata": {
      "lastUpdated": "2026-07-09T12:37:35.000Z",
      "formattedLastUpdated": "09 Jul 2026, 12:37 UTC",
      "latestSummary": "Documented externalNotificationContent usage and push text behavior across content-related API docs.",
      "changelogUrl": "/api-docs/changelog/"
    }
  },
  "schemes": [
    "http",
    "https"
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "activitylogs",
      "description": "Activity logs track user activity in the system. When a user performs an action, an activity log entry is created automatically. The service also updates the `lastActivity` field in the users collection.\n\n**Note**: Only the `create` method is publicly available. Find, get, update, patch, and remove operations are disabled for security reasons.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details on `$limit`, `$skip`, `$sort`, `$select`, and other query operators."
    },
    {
      "name": "ai-assistant",
      "description": "AI Assistant service acts as a gateway to the internal AI Python service. Supports AI-powered multiple-choice field generation from a PDF stored in S3, and proxying queries to the MCP Agent API for message history and analytics endpoints.\n\n**Available methods**: `find` (messages / analytics variants) and `create` (multiple-choice generation). All other methods are disabled."
    },
    {
      "name": "attachmentdetails",
      "description": "Attachment details service for storing metadata and text extraction from PDF attachments. **[Internal/Lambda only]** This service is triggered by AWS Lambda for processing uploaded attachments, not for direct file uploads.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "audittrail",
      "description": "Audit trail service for logging and tracking changes and actions in the system. Automatically records create, update, patch, and delete operations. **[Primarily internal]** Managed by hooks, but accessible for audit reporting.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "authchat",
      "description": "DEPRECATED Authenticate user to chat service"
    },
    {
      "name": "authentication",
      "description": "Authentication service for user login and session management. Supports multiple authentication strategies including local (email/password), JWT token verification, and OAuth providers.\n\n**Note**: The create endpoint does not require authentication. All other endpoints require a valid Bearer token."
    },
    {
      "name": "authManagement",
      "description": "Authentication management service for user account operations including email verification, password reset, and account validation.\n\n**Note**: This service does not require authentication for most operations (password reset, email verification)."
    },
    {
      "name": "automaticflows",
      "description": "Automatic flow management service for creating workflows that automatically generate content and tasks based on templates. Flows define sequences of template-based operations triggered by events or schedules.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "awstrigger",
      "description": "A service for AWS triggers, for now we have two triggers [pdfConvertedToTxt,videoResized]"
    },
    {
      "name": "badges",
      "description": "Badge management service for gamification. Badges are achievements users can earn through various activities and milestones.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "blacklisttoken",
      "description": "A service for otes on polls, edit of vote is not possible."
    },
    {
      "name": "chat",
      "description": "New general chat service for authenticating users to chat and other operations related to chat"
    },
    {
      "name": "chatgroups",
      "description": "A service for TalkJS chat groups that are created from external source"
    },
    {
      "name": "comments",
      "description": "Comment management service for content, form values, and nested comments. Supports up to 2 levels of nesting (comment on content, reply to comment).\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "configs",
      "description": "Client configuration service for managing tenant-specific settings and environment configurations. Stores configuration data per subdomain and environment.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "contentpools",
      "description": "Content pool management service. Content pools are containers for organizing content with specific access rights, configurations, and organizational restrictions.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "contentpooltypes",
      "description": "Content pool type management service. Defines templates for creating content pools with predefined settings, permissions, and configurations. Types provide initial default values that can be customized when creating individual content pools.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "contents",
      "description": "This service manages system contents and their metadata. Content includes messages, events, polls, custom external notifications, and other information distributed to users based on organizational structure and group membership.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details on `$limit`, `$skip`, `$sort`, `$select`, `$or`, `$and`, and other query operators."
    },
    {
      "name": "contentsview",
      "description": "Content view collection service. Provides a materialized view of contents with denormalized data for efficient querying. **[Read-only]** This collection is automatically updated when content changes. Only find and get operations are supported.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "contentviews",
      "description": "Content view tracking service. Records when users view content for analytics and engagement metrics. One view per user per content.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "download",
      "description": "Download page service for managing public app download landing pages. **[Public access for GET]** Creates branded download pages with platform-specific links (iOS, Android, Desktop).\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "drive",
      "description": "KeepHub Drive service for browsing and accessing organization files stored in S3. Provides hierarchical file/folder navigation by organization unit. Drive must be configured per organization before use.\n\n**Note**: This service uses custom pagination with continuation tokens instead of standard skip/limit."
    },
    {
      "name": "eventattendees",
      "description": "Event attendee tracking service for managing RSVP status for events. Users can indicate if they are going, not going, or maybe attending an event.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "exports",
      "description": "Data export service for generating CSV or Excel files from polls, forms, and task results. Creators can export their own content; ExportAdmin and Admins can export any content.\n\nSupports automatic column sizing, image embedding in Excel, and CSV formula injection prevention."
    },
    {
      "name": "externalcontacts",
      "description": "External contacts directory service for managing company contacts, partners, and vendors. Supports multi-language information and file attachments.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "feed",
      "description": "RSS feed service for exporting content as RSS/XML feeds. Generates standard RSS 2.0 format for content pools with optional filtering by organization units and groups. Useful for external integrations and content syndication."
    },
    {
      "name": "flowtemplates",
      "description": "Flow template service for defining content and task templates that are automatically generated by cron jobs. Templates define what content/tasks to create, when to create them (intervals), and who should receive them.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "folders",
      "description": "Folder management service for organizing content. Folders can contain manuals, FAQs, and forms. Supports hierarchical structure with org unit and group targeting.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "formvalues",
      "description": "Form values service for storing user submissions from forms. Supports confidential forms with restricted access to confidants only.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "groups",
      "description": "Group management service for organizing users into logical groups. Groups are used for content targeting, permissions, and organizational structure.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "healthcheck",
      "description": "Health check service for monitoring system component status. **[Public endpoint]** Returns HTTP 200 if healthy, HTTP 400 if degraded. Used by load balancers and monitoring systems."
    },
    {
      "name": "impersonate",
      "description": "User impersonation service for administrators. **[Admin only]** Allows admins to log in as another user for support and debugging purposes."
    },
    {
      "name": "keymetrics",
      "description": "A service for calculating needed data for key metrics"
    },
    {
      "name": "lessons",
      "description": "Training lessons service for managing quizzes and assessments within training content. Each lesson contains questions with scoring and pass/fail messages.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "lessonsubmissions",
      "description": "Lesson submission service for tracking user attempts at training lessons. Records answers, scores, and pass/fail status.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "levels",
      "description": "User level/rank system service for gamification. Defines level tiers based on point ranges with associated rewards and titles.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "loginoptions",
      "description": "Providing login options to user based on loginname, public service"
    },
    {
      "name": "maintenance",
      "description": "Maintenance mode management service for controlling system availability. **[System user only]** When maintenance mode is enabled, regular users cannot access the system. Used during deployments and updates."
    },
    {
      "name": "marketplace",
      "description": "Marketplace service for managing available plugins and integrations. Defines external plugins that can be added to pages and widgets.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "notifications",
      "description": "Notification management service for user notifications. Handles notification creation, delivery, and status tracking (read/unread, new/seen).\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "orgattributecategories",
      "description": "Organization attribute category management service. Categories group related organization attributes for better organization and filtering (e.g., \"Location Attributes\", \"Operational Attributes\", \"Contact Attributes\").\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "orgattributes",
      "description": "Organization attribute management service. Attributes are additional metadata that can be assigned to organization chart nodes (e.g., \"Second Floor\", \"City Center\", \"Open 24/7\"). Used for advanced filtering and targeting.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "orgchart",
      "description": "Organization chart management service. Manages hierarchical organizational structure with nodes representing departments, locations, teams, etc.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "orgtypes",
      "description": "Organization type management service. Defines categories for organization chart nodes (e.g., \"Department\", \"Store\", \"Region\"). Supports hierarchical organization type structures.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "pages",
      "description": "Page navigation service for managing application pages and navigation structure. Typically uses a single configuration document. Pages are automatically filtered by user permissions (orgunits and groups).\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "permissions",
      "description": "Permission management service for defining granular access controls. Permissions are assigned to roles which are then assigned to users.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "pushmessages",
      "description": "Push message management service for creating and tracking push notification messages. Messages are queued and processed by background workers. Supports multi-create for batch operations.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "pushmessagesqueue",
      "description": "Push message queue service for managing individual push notification delivery attempts. Each queue entry represents a push message to a specific user/device. **[Internal only]** Managed by background workers.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "pushnotificationsettings",
      "description": "A service for getting client specific translations overrides for push notifications"
    },
    {
      "name": "pushsubscriptions",
      "description": "Push subscription management service for device registration. Users register their devices to receive push notifications. Subscriptions are active when loggedOn=true AND pushPermission=true.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "reach",
      "description": "Reach calculation service for determining how many users will be targeted by content, tasks, or navigation based on filters. Helps content creators understand audience size before publishing.\n\n**Note**: This is a create-only service that returns calculated reach metrics."
    },
    {
      "name": "reactions",
      "description": "Reaction management service for content and comments (likes, etc.). Users can add or remove reactions but not edit them. One reaction per user per item.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "reports",
      "description": "Reports generation service for analytics and insights. Generates various report types including user activity, content engagement, and gamification metrics over specified time periods.\n\n**Note**: This is a create-only service that generates and returns report data based on specified parameters."
    },
    {
      "name": "rewards",
      "description": "Reward/achievement system service for gamification. Defines rewards that are automatically granted to users based on query conditions (e.g., completing tasks, reaching milestones).\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "roles",
      "description": "Role management service for defining user permission levels. Roles determine what actions users can perform in the system.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "search",
      "description": "Unified search service for finding content, users, tasks, and external resources. Supports Elasticsearch for internal content and optional SharePoint integration.\n\n**Search Types**: contents, contacts, anniversary, externalcontents, folders, all\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "sentimentanalysis",
      "description": "An internal service for sentiment analysis."
    },
    {
      "name": "signurl",
      "description": "Signed URL service for secure S3 file access and uploads. Generates pre-signed URLs for downloading attachments, videos, and uploading files. Also supports external plugin URL signing.\n\n**Origin Types**: contentAttachment, contentTemplateAttachment, tasktemplateAttachment, taskAttachment, formValuesAttachment, externalAttachment, contentVideo, tasktemplateVideo, formValuesVideo, taskFormAnswer, externalPluginUrl, externalPluginProfile, lessonAttachment\n**File Types (Lambda Hints)**: image, video, attachment, other"
    },
    {
      "name": "systemtasks",
      "description": "System task management service for creating automated query-based tasks. System tasks execute database queries to find content/items requiring action (e.g., untranslated content, pending approvals) and present them as tasks to designated users.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "tags",
      "description": "Tag management service for organizing and searching content by hashtags. Tags are automatically created when used in content and can be searched by text.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "talkjshook",
      "description": "TalkJS webhook integration service for processing chat notifications. **[Webhook only]** Requires special signature-based authentication.\n\n**Authentication**: Uses HMAC-SHA256 signature with timestamp validation (5 minute timeout).\n**Signature Format**: SHA256([timestamp] + \".\" + [jsonPayloadWithoutWhiteSpace])"
    },
    {
      "name": "tasks",
      "description": "Task management service for personal and group tasks. Tasks are created from task templates and can be assigned to specific users or organizational units.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "tasktemplates",
      "description": "Task template management service for creating periodic, single, and child task templates. Templates define tasks that can be automatically or manually generated for users.\n\n**Template Types:**\n- daily, weekly, monthly1, monthly2, monthly3, monthly4, monthlyLast, monthly, yearly, child, single, custom\n\n**Note**: Queries without parentRef return root templates; with parentRef returns child templates.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "tasktemplatesview",
      "description": "Task template view service. **[Read-only]** Provides aggregated task template data with progress statistics and status breakdowns. This materialized view joins task templates with their execution progress for efficient querying.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "themes",
      "description": "Theme management service for customizing application appearance. Themes control colors, fonts, logos, and other visual elements. Only one theme can be set as default.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "trainingprogress",
      "description": "Training progress tracking service. **[Read-only]** Automatically maintained by the system when users complete lesson submissions. Tracks overall training completion status and lesson progress.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "translate",
      "description": "Google Translate API integration service for automatic text translation. Supports multiple languages via Google Cloud Translation API.\n\n**Note**: Requires Google Translate API key configuration."
    },
    {
      "name": "translations",
      "description": "UI translation overrides service for managing client-specific text translations. Allows customization of interface labels and messages per tenant/language.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "translationservice",
      "description": "Translation service for adding or updating translations for content, tasks, and other translatable entities. Handles multi-language content management and translator tracking.\n\n**Note**: This is a create-only service that processes translation requests."
    },
    {
      "name": "users",
      "description": "User management service. Handles user accounts, profiles, authentication, permissions, and organizational membership.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details on `$limit`, `$skip`, `$sort`, `$select`, and other query operators."
    },
    {
      "name": "userspointsbalances",
      "description": "User points balance ledger service. Tracks individual point/coin transactions and maintains user balances. **[Read-mostly]** Primarily managed by reward system.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "usersrewards",
      "description": "User rewards tracking service. Records individual reward grants to users. **[Read-mostly]** Primarily managed by automated reward system.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "version",
      "description": "Version information service for retrieving application version and system information. **[Public endpoint]** Provides version number, environment, and system resource information."
    },
    {
      "name": "videos",
      "description": "Video management service for handling video uploads and processing. Tracks video metadata, processing status, and references to content. **[Internal service]** Video files are uploaded to S3, this service stores metadata and processing status.\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "votes",
      "description": "Vote management service for polls. Users can vote on poll options but cannot edit votes. One vote per user per poll (unless poll allows multiple choices).\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "welcomewidget",
      "description": "Welcome widget service for retrieving unseen/new content for dashboard display. Provides a personalized content feed filtered to content the authenticated user is allowed to open.\n\n**Note**: This is a create-only service that returns widget data based on request parameters."
    },
    {
      "name": "widgets",
      "description": "Widget configuration service for managing application navigation and dashboard pages. Typically uses a single configuration document that defines all pages and widgets. Pages are automatically filtered by user permissions (orgunits and groups).\n\n**Standard Query Parameters**: This endpoint supports standard FeathersJS query parameters. See the [Common Information](#tag/Common-Information) section for details."
    },
    {
      "name": "workflow",
      "description": "Workflow automation service for executing approval flows and automated actions. Currently supports content approval workflow.\n\n**Available Actions**: approveContent,rejectContent,approveTaskAnswer,rejectTaskAnswer"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "JWT token obtained from /authentication endpoint"
      }
    },
    "schemas": {
      "CommonFields": {
        "type": "object",
        "description": "Fields present in all records",
        "properties": {
          "createdBy": {
            "type": "string",
            "description": "User ID who created this record"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp when record was created"
          },
          "updatedBy": {
            "type": "string",
            "description": "User ID who last updated this record"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp when record was last updated"
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Error name",
            "example": "BadRequest"
          },
          "message": {
            "type": "string",
            "description": "Error message",
            "example": "Validation failed"
          },
          "code": {
            "type": "integer",
            "description": "HTTP status code",
            "example": 400
          },
          "className": {
            "type": "string",
            "description": "Error class name",
            "example": "bad-request"
          },
          "errors": {
            "type": "object",
            "description": "Validation errors (if applicable)"
          }
        }
      },
      "PaginatedResponse": {
        "type": "object",
        "description": "Standard paginated list response",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total number of records matching the query"
          },
          "limit": {
            "type": "integer",
            "description": "Maximum records returned in this response"
          },
          "skip": {
            "type": "integer",
            "description": "Number of records skipped"
          },
          "data": {
            "type": "array",
            "description": "Array of records",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "tasktemplates": {
        "type": "object",
        "required": [
          "type",
          "template"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "orgchartSelection": {
            "type": "object",
            "description": "Organization chart targeting for task assignment",
            "properties": {
              "include": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "objectId"
                }
              },
              "exclude": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "objectId"
                }
              }
            }
          },
          "orgchartAttrSelection": {
            "type": "object",
            "description": "Organization attribute filters (AND/OR logic)"
          },
          "groups": {
            "type": "object",
            "description": "Group targeting configuration"
          },
          "orgunits": {
            "type": "array",
            "description": "Organization units (auto-calculated from selection)",
            "readOnly": true,
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "type": {
            "type": "string",
            "enum": [
              "daily",
              "weekly",
              "monthly1",
              "monthly2",
              "monthly3",
              "monthly4",
              "monthlyLast",
              "monthly",
              "yearly",
              "child",
              "single",
              "custom"
            ],
            "description": "Template type: daily, weekly, monthly1, monthly2, monthly3, monthly4, monthlyLast, monthly, yearly, child, single, custom"
          },
          "repeatEvery": {
            "type": "integer",
            "description": "For periodic tasks: repeat interval (e.g., 1=daily, 7=weekly)",
            "minimum": 1
          },
          "parentRef": {
            "type": "string",
            "format": "objectId",
            "description": "Parent template ID (for child templates)",
            "readOnly": true
          },
          "status": {
            "type": "string",
            "enum": [
              "empty",
              "pending",
              "partial",
              "complete",
              "ongoing"
            ],
            "description": "Template status: empty, pending, partial, complete, ongoing"
          },
          "template": {
            "type": "object",
            "description": "Task definition template",
            "properties": {
              "title": {
                "type": "object",
                "description": "Multi-language task title"
              },
              "originLanguage": {
                "type": "string",
                "description": "Original language code"
              },
              "translators": {
                "type": "array",
                "description": "Translation history",
                "readOnly": true
              },
              "images": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "S3 paths to attached images"
              },
              "videos": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "objectId"
                },
                "description": "Video references"
              },
              "embeddedVideos": {
                "type": "array",
                "description": "Embedded video URLs"
              },
              "attachments": {
                "type": "array",
                "description": "File attachments"
              },
              "form": {
                "type": "object",
                "description": "Form configuration for task completion"
              },
              "startDate": {
                "type": "string",
                "format": "date-time",
                "description": "Task start date/time"
              },
              "dueDate": {
                "type": "string",
                "format": "date-time",
                "description": "Task due date/time"
              },
              "strictDueDate": {
                "type": "boolean",
                "description": "When true, submissions are forbidden after the due date has passed and `taskState=expired` will match the overdue template."
              },
              "allDayStart": {
                "type": "boolean",
                "description": "Start date is all-day (no time component)"
              },
              "allDayDue": {
                "type": "boolean",
                "description": "Due date is all-day (no time component)"
              },
              "completionType": {
                "type": "string",
                "enum": [
                  "personal",
                  "group"
                ],
                "description": "Personal: each user must complete; Group: any user in org unit can complete"
              },
              "approveAnswers": {
                "type": "boolean",
                "description": "Require approval for task completions"
              },
              "relatedTags": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Related hashtags"
              }
            }
          },
          "videoProcessing": {
            "type": "boolean",
            "description": "Video attachments still processing",
            "readOnly": true
          },
          "lastTaskUserCount": {
            "type": "integer",
            "description": "Number of users assigned tasks in last generation",
            "readOnly": true
          },
          "originalStartDate": {
            "type": "string",
            "format": "date-time",
            "description": "Original start date for periodic templates (before progression)"
          },
          "originalAllDayStart": {
            "type": "boolean",
            "description": "Original all-day flag for start date"
          },
          "originalDueDate": {
            "type": "string",
            "format": "date-time",
            "description": "Original due date for periodic templates (before progression)"
          },
          "originalAllDayDue": {
            "type": "boolean",
            "description": "Original all-day flag for due date"
          },
          "templateEndDate": {
            "type": "string",
            "format": "date-time",
            "description": "When periodic template should stop generating tasks"
          },
          "sendPushNotification": {
            "type": "boolean",
            "description": "Send push notification when tasks become active"
          },
          "lastReminderAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last reminder sent timestamp",
            "readOnly": true
          },
          "edited": {
            "type": "boolean",
            "description": "Template has been edited after creation",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created template (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated template (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "tasktemplatesList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/tasktemplates"
            }
          }
        }
      },
      "tasktemplatesview": {
        "type": "object",
        "description": "Read-only view combining task templates with their execution progress and statistics",
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Task template ID",
            "readOnly": true
          },
          "statuses": {
            "type": "array",
            "description": "Aggregated statuses from all task instances of this template",
            "readOnly": true,
            "items": {
              "type": "string"
            }
          }
        }
      },
      "tasktemplatesviewList": {
        "type": "object",
        "description": "Paginated list with optional statistics",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/tasktemplatesview"
            }
          },
          "taskTemplateCount": {
            "type": "object",
            "description": "Optional statistics breakdown"
          }
        }
      },
      "tasks": {
        "type": "object",
        "required": [
          "templateRef",
          "userId"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "templateRef": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to the task template this task was created from"
          },
          "type": {
            "type": "string",
            "enum": [
              "personal",
              "group"
            ],
            "description": "Task type inherited from template (read-only)",
            "readOnly": true
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "rejected",
              "pendingApproval",
              "othersPendingApproval",
              "done",
              "draft"
            ],
            "description": "Task status: open, rejected, pendingApproval, othersPendingApproval, done, draft. Auto-updated by backend",
            "readOnly": true
          },
          "template": {
            "type": "object",
            "description": "Snapshot of task template at creation time",
            "readOnly": true,
            "properties": {
              "title": {
                "type": "object",
                "description": "Multi-language task title"
              },
              "originLanguage": {
                "type": "string",
                "description": "Original language of the task"
              },
              "images": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Attached image paths"
              },
              "videos": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "objectId"
                },
                "description": "Video references"
              },
              "attachments": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string"
                    },
                    "storageId": {
                      "type": "string"
                    },
                    "fileType": {
                      "type": "string"
                    }
                  }
                }
              },
              "form": {
                "type": "object",
                "properties": {
                  "fields": {
                    "type": "array",
                    "description": "Form fields for task submission",
                    "items": {
                      "type": "object"
                    }
                  }
                }
              },
              "startDate": {
                "type": "string",
                "format": "date-time",
                "description": "Task start date"
              },
              "dueDate": {
                "type": "string",
                "format": "date-time",
                "description": "Task due date"
              },
              "strictDueDate": {
                "type": "boolean",
                "description": "When true, the task snapshot enforces the due date strictly and submission is rejected after it passes."
              },
              "completionType": {
                "type": "string",
                "enum": [
                  "personal",
                  "group"
                ],
                "description": "Whether all users must complete (personal) or any user can complete (group)"
              },
              "relatedTags": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "objectId"
                },
                "description": "Tags related to this task"
              }
            }
          },
          "userId": {
            "type": "string",
            "format": "objectId",
            "description": "User assigned to this task"
          },
          "orgunits": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "objectId"
            },
            "description": "Organization units where task should be performed"
          },
          "answers": {
            "type": "array",
            "description": "User responses to task form fields",
            "items": {
              "type": "object"
            }
          },
          "submissionDate": {
            "type": "string",
            "format": "date-time",
            "description": "When the task was submitted/completed",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the task (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the task (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "tasksList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/tasks"
            }
          }
        }
      },
      "groups": {
        "type": "object",
        "required": [
          "name",
          "originLanguage"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier. Can be manually set by system users for imported groups, otherwise auto-generated"
          },
          "name": {
            "type": "object",
            "description": "Multi-language group name. Must include at least the origin language (e.g., {\"en\": \"Regional Managers\", \"nl\": \"Regionale Managers\"})",
            "example": {
              "en": "Regional Managers",
              "nl": "Regionale Managers"
            }
          },
          "imported": {
            "type": "boolean",
            "description": "Indicates if group was imported from external system (true) or manually created (false). Defaults to false on create when omitted. Only keephubAdmin and system user can change this field.",
            "default": false
          },
          "originLanguage": {
            "type": "string",
            "description": "Language code for the original group name (e.g., \"en\", \"nl\", \"de\")"
          },
          "translators": {
            "type": "array",
            "description": "Translation history - users who translated the group name",
            "readOnly": true,
            "items": {
              "type": "object",
              "properties": {
                "lang": {
                  "type": "string",
                  "description": "Language code translated"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "description": "When translation was added"
                },
                "createdBy": {
                  "type": "string",
                  "format": "objectId",
                  "description": "User who added translation"
                }
              }
            }
          },
          "excludeFromContent": {
            "type": "boolean",
            "description": "If true, this group is excluded from content targeting options",
            "default": false
          },
          "orgunitsForAdditionalContacts": {
            "type": "array",
            "description": "Additional organizational units whose members are visible in contacts for users in this group. Automatically expanded to include descendants",
            "items": {
              "type": "string",
              "format": "objectId",
              "description": "Organization unit ID"
            }
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created this group (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated this group (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "groupsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/groups"
            }
          }
        }
      },
      "groupsPagination": {
        "title": "groups pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/groupsList"
          }
        }
      },
      "users": {
        "type": "object",
        "required": [
          "name",
          "email",
          "password"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Full name of the user"
          },
          "firstName": {
            "type": "string",
            "description": "First name"
          },
          "insertion": {
            "type": "string",
            "description": "Name insertion (e.g., \"van\", \"de\")"
          },
          "lastName": {
            "type": "string",
            "description": "Last name"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Email address - must be unique across the system"
          },
          "loginName": {
            "type": "string",
            "description": "Login name - automatically set to lowercase email (auto-generated)",
            "readOnly": true
          },
          "loginMethod": {
            "type": "string",
            "enum": [
              "local",
              "cognito",
              "okta",
              "azure"
            ],
            "description": "Authentication method - can only be changed by users.keephubAdmin or users.system"
          },
          "imported": {
            "type": "boolean",
            "description": "Import flag for external user provisioning. Can be changed only by users.keephubAdmin or users.system"
          },
          "personalInfo": {
            "type": "string",
            "description": "Personal information/bio entered by the user"
          },
          "password": {
            "type": "string",
            "format": "password",
            "description": "Password (sent as plain text on create, automatically hashed)",
            "writeOnly": true
          },
          "passwordExpires": {
            "type": "string",
            "format": "date-time",
            "description": "Date when password expires"
          },
          "permanentPassword": {
            "type": "boolean",
            "description": "If true, password expiration is disabled"
          },
          "firstLoginDone": {
            "type": "boolean",
            "description": "Indicates if user has completed first login",
            "readOnly": true
          },
          "profilePicture": {
            "type": "string",
            "description": "S3 path to user profile picture"
          },
          "organisation": {
            "type": "string",
            "description": "Organization name"
          },
          "position": {
            "type": "string",
            "description": "Job position/function in organization"
          },
          "preferredLanguage": {
            "type": "string",
            "description": "Preferred UI language code (e.g., \"en\", \"nl\", \"de\")"
          },
          "employeeID": {
            "type": "string",
            "description": "Employee ID number"
          },
          "level": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to user level for gamification"
          },
          "dob": {
            "type": "string",
            "format": "date",
            "description": "Date of birth"
          },
          "phone": {
            "type": "string",
            "description": "Work phone number"
          },
          "active": {
            "type": "boolean",
            "description": "Account active status - inactive users cannot log in"
          },
          "deleted": {
            "type": "boolean",
            "description": "Soft delete flag (auto-managed)",
            "readOnly": true
          },
          "privateEmail": {
            "type": "string",
            "format": "email",
            "description": "Private email - only visible to profile owner and admins"
          },
          "privatePhone": {
            "type": "string",
            "description": "Private phone - only visible to profile owner and admins"
          },
          "orgunits": {
            "type": "array",
            "description": "Organization units user belongs to",
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "groups": {
            "type": "array",
            "description": "Groups user belongs to",
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "roles": {
            "type": "array",
            "description": "Roles assigned to user (determines permissions)",
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "excludeFromContacts": {
            "type": "boolean",
            "description": "If true, user is hidden from contact search results"
          },
          "excludeFromTasks": {
            "type": "boolean",
            "description": "If true, user cannot be assigned tasks"
          },
          "ghost": {
            "type": "boolean",
            "description": "If true, user is excluded from reach calculations and view counts"
          },
          "accountType": {
            "type": "string",
            "enum": [
              "standard",
              "keephub",
              "system"
            ],
            "description": "Account type - determines special permissions (system-managed)",
            "readOnly": true
          },
          "zoneOfInfluence": {
            "type": "array",
            "description": "Organization units within user supervision scope (auto-calculated for supervisors)",
            "readOnly": true,
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "canImpersonate": {
            "type": "array",
            "description": "User IDs this user is allowed to impersonate",
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "points": {
            "type": "integer",
            "description": "Total gamification points (calculated on get)",
            "readOnly": true
          },
          "lastActivity": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp of last user activity",
            "readOnly": true
          },
          "subdomain": {
            "type": "string",
            "description": "Subdomain for multi-tenant configurations"
          },
          "customAttributes": {
            "type": "object",
            "description": "Custom attributes specific to organization"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created this account (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated this account (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "usersList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/users"
            }
          }
        }
      },
      "usersPagination": {
        "title": "users pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/usersList"
          }
        }
      },
      "contentpools": {
        "type": "object",
        "required": [
          "name",
          "createRights",
          "originLanguage"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "name": {
            "type": "object",
            "description": "Multi-language content pool name. Must include at least origin language (e.g., {\"en\": \"News Pool\", \"nl\": \"Nieuws Pool\"})"
          },
          "originLanguage": {
            "type": "string",
            "description": "Language code for the original content pool name"
          },
          "contentPoolType": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to content pool type for categorization"
          },
          "createRights": {
            "type": "array",
            "description": "Group IDs that have permission to create content in this pool",
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "limitToOrgtype": {
            "type": "string",
            "format": "objectId",
            "description": "Restrict content in this pool to specific organization unit type"
          },
          "requireApproval": {
            "type": "boolean",
            "description": "If true, content requires approval before publishing"
          },
          "approvers": {
            "type": "array",
            "description": "User IDs who can approve content in this pool",
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "rightsConfiguration": {
            "type": "object",
            "description": "Default rights settings for new content (can disable certain rights features)"
          },
          "optionsConfiguration": {
            "type": "object",
            "description": "Default options settings for new content (can disable certain option features)"
          },
          "translationConfiguration": {
            "type": "object",
            "description": "Translation settings (can disable translation features, specify requestor groups)"
          },
          "translators": {
            "type": "array",
            "description": "Translation history for content pool name",
            "readOnly": true,
            "items": {
              "type": "object",
              "properties": {
                "lang": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "createdBy": {
                  "type": "string",
                  "format": "objectId"
                }
              }
            }
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the content pool (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the content pool (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "contentpoolsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/contentpools"
            }
          }
        }
      },
      "contentpoolsPagination": {
        "title": "contentpools pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/contentpoolsList"
          }
        }
      },
      "contents": {
        "type": "object",
        "required": [
          "title",
          "message",
          "originLanguage",
          "contentPool",
          "contentType"
        ],
        "properties": {
          "orgchartSelection": {
            "type": "array",
            "description": "Array of organisation units selected on frontend, this is state of selection for edit of content",
            "items": {
              "type": "string"
            }
          },
          "orgchartAttrSelection": {
            "type": "object",
            "description": "Object that contains include and exclude properties. Both are Array of arrays for org unit attributes that additionally filter orgchartSelection, Top level array is interpreted as AND, Second level array is interpreted as OR",
            "properties": {
              "include": {
                "type": "array",
                "description": "List of inclusion filters for organizational attributes, represented as nested arrays.",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "objectId",
                    "description": "ObjectId reference to an organizational attribute."
                  }
                }
              },
              "exclude": {
                "type": "array",
                "description": "List of exclusion filters for organizational attributes, represented as nested arrays.",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "objectId",
                    "description": "ObjectId reference to an organizational attribute."
                  }
                }
              }
            }
          },
          "groups": {
            "type": "object",
            "properties": {
              "exclude": {
                "type": "boolean",
                "description": "Flag to exclude groups, defaults to false",
                "default": false
              },
              "selection": {
                "type": "array",
                "description": "Array of selected group IDs",
                "items": {
                  "type": "string",
                  "description": "Reference to a group ID"
                }
              }
            },
            "required": [
              "exclude"
            ],
            "description": "Group field containing exclusion flag and selection of group references"
          },
          "orgunits": {
            "type": "array",
            "description": "Array of organisation units this message belongs to, this array is populated by server based on orgchartSelection",
            "items": {
              "type": "string"
            }
          },
          "recipient": {
            "type": "string",
            "description": "Reference to user for whom this content is created"
          },
          "notificationsCreated": {
            "type": "boolean",
            "description": "Tells if notifications for content are created"
          },
          "edited": {
            "type": "boolean",
            "description": "If content data (title, message, poll data) were changed."
          },
          "notifyNew": {
            "type": "boolean",
            "description": "Flag that marks to send notification that new content has been added"
          },
          "notifyUpdated": {
            "type": "boolean",
            "description": "Flag that marks to send notification that the content has been updated"
          },
          "notifyOnAttendeeActions": {
            "type": "boolean",
            "description": "For events with attendance enabled, notify the organizer when attendees change their attendance status"
          },
          "notifyAttendeesOnUpdate": {
            "type": "boolean",
            "description": "For events with attendance enabled, notify attendees when the event content itself is updated"
          },
          "notifyAttendeesOnComment": {
            "type": "boolean",
            "description": "For events with attendance enabled, notify attendees when a new top-level comment/message is posted on the event"
          },
          "event": {
            "type": "object",
            "description": "Event related data",
            "properties": {
              "startDate": {
                "type": "string",
                "description": "Date when event is about to start"
              },
              "endDate": {
                "type": "string",
                "description": "Date when event is about to end"
              },
              "widgets": {
                "type": "array",
                "description": "What mini widgets should be shown on event detail page",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "webhookStatus": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "none"
            ],
            "description": "Derived content webhook status. Returns `active` when at least one top-level content hook URL is enabled, `inactive` when only disabled hook URLs exist, and `none` when no hook URLs are configured. For forms, `form.hookurls` is used as fallback when top-level `hookurls` is not set.",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "description": "Field populated by system, reference to user who created content"
          },
          "createdAt": {
            "type": "string",
            "description": "Field populated by system, timestamp of creation"
          },
          "updatedBy": {
            "type": "string",
            "description": "Field populated by system, reference to user who updated content"
          },
          "updatedAt": {
            "type": "string",
            "description": "Field populated by system, timestamp of last update"
          },
          "originLanguage": {
            "type": "string",
            "description": "Language in which content was created. Used as default translation"
          },
          "translators": {
            "type": "array",
            "description": "Array of translators (users) that worked on content",
            "items": {
              "type": "object",
              "properties": {
                "lang": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "createdBy": {
                  "type": "string"
                }
              }
            }
          },
          "title": {
            "type": "object",
            "description": "At least provide title for originLanguage e.g. {\"en\": \"English Title\"}, possible to other langages as well"
          },
          "message": {
            "type": "object",
            "description": "At least provide message for originLanguage e.g. {\"en\": \"English Message\"}, possible to other langages as well"
          },
          "private": {
            "type": "boolean",
            "description": "Indicate that content is private and that it needs to be addressed to you in order to access it"
          },
          "contentPool": {
            "type": "string",
            "description": "Content pools where message belongs to"
          },
          "contentType": {
            "type": "string",
            "description": "Type of content. Supported values include news, form, manual, event, faq, training, and externalNotificationContent. Use externalNotificationContent for custom external push flows where notification title is the content creator full name and notification body is the content title."
          },
          "onlineDate": {
            "type": "string",
            "description": "Date when content goes live"
          },
          "offlineDate": {
            "type": "string",
            "description": "Date when content goes offline"
          },
          "sendPushNotification": {
            "type": "boolean",
            "description": "Enable sending push notifications for this content"
          },
          "images": {
            "type": "object",
            "description": "At least provide images for originLanguage e.g. {\"en\": [\"local/path/x/y/z\"]}, possible to other langages as well"
          },
          "videos": {
            "type": "array",
            "description": "Array of video references as ObjectIds",
            "items": {
              "type": "string"
            }
          },
          "embeddedVideos": {
            "type": "array",
            "description": "Array of embeddedVideos",
            "items": {
              "type": "object",
              "properties": {
                "lang": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                }
              }
            }
          },
          "videoProcessing": {
            "type": "boolean",
            "description": "Indicate that Video attach to this record is still in processing"
          },
          "attachments": {
            "type": "object",
            "description": "At least provide attachments for originLanguage e.g. {\"en\": []}, possible to other langages as well"
          },
          "tags": {
            "type": "array",
            "description": "Array of tags, assign by content",
            "items": {
              "type": "object",
              "properties": {
                "_id": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                }
              }
            }
          },
          "relatedTags": {
            "type": "array",
            "description": "Array of tags related to this content, used for Event to pull taged content to the page, in order to submit new relevant tag, just provide new object without _id e.g. {text:TagName}",
            "items": {
              "type": "object",
              "properties": {
                "_id": {
                  "type": "string"
                },
                "text": {
                  "type": "string"
                }
              }
            }
          },
          "mentions": {
            "type": "array",
            "description": "Array of yours that are mentioned using @ in message section of contents",
            "items": {
              "type": "string"
            }
          },
          "social": {
            "type": "object",
            "description": "Social data",
            "properties": {
              "reactionsEnabled": {
                "type": "boolean",
                "description": "Enable reactions on this message"
              },
              "commentsEnabled": {
                "type": "boolean",
                "description": "Enable comments on this message"
              },
              "reactionCounts": {
                "type": "object",
                "description": "Count per reaction on content (Managed by server and can not be changed from client)"
              },
              "commentCount": {
                "type": "integer",
                "description": "Number of L1 comments on content (Managed by server and can not be changed from client)"
              },
              "comments": {
                "type": "array",
                "description": "List of L1 comments on content (Managed by server and can not be changed from client)",
                "items": {
                  "type": "object"
                }
              }
            }
          },
          "viewsCount": {
            "type": "integer",
            "description": "Number of views on content (Managed by server and can not be changed from client)"
          },
          "originalReach": {
            "type": "integer",
            "description": "Original reach number when content was created (Unchangable)"
          },
          "poll": {
            "type": "object",
            "description": "Poll data",
            "properties": {
              "options": {
                "type": "array",
                "description": "Poll options",
                "items": {
                  "type": "object",
                  "description": "Poll option",
                  "properties": {
                    "optId": {
                      "type": "string"
                    },
                    "index": {
                      "type": "integer"
                    },
                    "text": {
                      "type": "string"
                    },
                    "image": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "form": {
            "type": "object",
            "description": "Form related data",
            "properties": {
              "active": {
                "type": "boolean",
                "description": "Flag that marks if form is active or not"
              },
              "confidential": {
                "type": "boolean",
                "description": "Flag that marks if form is confidential"
              },
              "confidants": {
                "type": "array",
                "description": "List of confidants, only confidants can access form results if form is confidental",
                "items": {
                  "type": "string"
                }
              },
              "emails": {
                "type": "array",
                "description": "Array of emails to send this form to",
                "items": {
                  "type": "string"
                }
              },
              "hookurls": {
                "type": "array",
                "description": "Form-content webhooks for form submission/delete events. This is a dedicated abstraction on the form model and remains separate from top-level content hookurls.",
                "items": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "description": "Webhook endpoint URL"
                    },
                    "active": {
                      "type": "boolean",
                      "description": "Whether this webhook is currently active",
                      "default": true
                    }
                  },
                  "required": [
                    "url"
                  ]
                },
                "example": [
                  {
                    "url": "https://example.com/hook1",
                    "active": true
                  },
                  {
                    "url": "https://example.com/hook2",
                    "active": false
                  }
                ]
              },
              "fields": {
                "type": "array",
                "description": "Form fields",
                "items": {
                  "type": "object",
                  "description": "Form field"
                }
              }
            }
          },
          "hookurls": {
            "type": "array",
            "description": "Content webhooks. Used for workflow content approval/rejection callbacks; each callback sends `_id`, `approvedBy`, and `createdBy` in `data`.",
            "items": {
              "type": "object",
              "properties": {
                "url": {
                  "type": "string",
                  "format": "uri",
                  "description": "Webhook endpoint URL"
                },
                "active": {
                  "type": "boolean",
                  "description": "Whether this webhook is currently active",
                  "default": true
                }
              },
              "required": [
                "url"
              ]
            },
            "example": [
              {
                "url": "https://example.com/content-webhook",
                "active": true
              }
            ]
          },
          "folder": {
            "type": "string",
            "description": "Id of folder to which this content may belong to -> applicable only for manuals and faq content types"
          },
          "approval": {
            "type": "object",
            "description": "Approval Flow related data",
            "properties": {
              "status": {
                "type": "string",
                "description": "Status of approval"
              },
              "reviewedAt": {
                "type": "string",
                "description": "Field populated by system, timestamp of review"
              },
              "reviewedBy": {
                "type": "string",
                "description": "Field populated by system, reference to user who did review of content (approved or rejected)"
              }
            }
          },
          "training": {
            "type": "object",
            "description": "Training related data",
            "properties": {
              "lessons": {
                "type": "array",
                "description": "List of lessons for this tnings",
                "items": {
                  "type": "string"
                }
              },
              "ownCompleted": {
                "type": "array",
                "description": "Populated by backend, no need to send it, list of lessons that current user has completed",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "contentsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/contents"
            }
          }
        }
      },
      "contentsPagination": {
        "title": "contents pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/contentsList"
          }
        }
      },
      "orgchart": {
        "type": "object",
        "required": [
          "_id",
          "name",
          "parent"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "description": "Unique identifier (must be manually specified for org chart nodes)"
          },
          "name": {
            "type": "string",
            "description": "Node name (should be unique among siblings)"
          },
          "type": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to organization type (defines node category)"
          },
          "profilePicture": {
            "type": "string",
            "description": "S3 path to node profile image/logo"
          },
          "generalInformation": {
            "type": "object",
            "description": "Multi-language textual description (e.g., {\"en\": \"Main Office\", \"nl\": \"Hoofdkantoor\"})"
          },
          "contactInformation": {
            "type": "object",
            "description": "Contact details for this organizational node",
            "properties": {
              "phone1": {
                "type": "string",
                "description": "Primary phone number"
              },
              "phone2": {
                "type": "string",
                "description": "Secondary phone number"
              },
              "email1": {
                "type": "string",
                "format": "email",
                "description": "Primary email"
              },
              "email2": {
                "type": "string",
                "format": "email",
                "description": "Secondary email"
              },
              "address1": {
                "type": "string",
                "description": "Address line 1"
              },
              "address2": {
                "type": "string",
                "description": "Address line 2"
              },
              "city": {
                "type": "string"
              },
              "zipcode": {
                "type": "string"
              },
              "country": {
                "type": "string"
              }
            }
          },
          "additionalInformation": {
            "type": "object",
            "description": "Custom key-value pairs for additional data"
          },
          "openingTimes": {
            "type": "array",
            "description": "Opening hours schedule (ISO weekday format)",
            "items": {
              "type": "object",
              "properties": {
                "isoweekday": {
                  "type": "integer",
                  "minimum": 1,
                  "maximum": 7,
                  "description": "Day of week (1=Monday, 7=Sunday)"
                },
                "open": {
                  "type": "integer",
                  "description": "Opening time in minutes from start of day (e.g., 540 = 9:00 AM)"
                },
                "close": {
                  "type": "integer",
                  "description": "Closing time in minutes from start of day (e.g., 1020 = 5:00 PM)"
                }
              }
            }
          },
          "excludeFromContacts": {
            "type": "boolean",
            "description": "If true, exclude this node from contact search results"
          },
          "namepath": {
            "type": "string",
            "description": "Comma-separated path of names from root to this node (auto-generated)",
            "readOnly": true
          },
          "idpath": {
            "type": "string",
            "description": "Comma-separated path of IDs from root to this node (auto-generated)",
            "readOnly": true
          },
          "parent": {
            "type": "string",
            "description": "Parent node ID. All nodes must have a parent except root (cannot create/delete root)"
          },
          "ancestors": {
            "type": "array",
            "description": "All ancestor node IDs from root to this node (auto-generated)",
            "readOnly": true,
            "items": {
              "type": "string"
            }
          },
          "children": {
            "type": "array",
            "description": "Direct child node IDs (auto-generated)",
            "readOnly": true,
            "items": {
              "type": "string"
            }
          },
          "attributes": {
            "type": "object",
            "description": "Organization attributes assigned to this node (references orgattributes collection)"
          },
          "externalRef": {
            "type": "string",
            "description": "External system reference/ID for integration"
          },
          "originLanguage": {
            "type": "string",
            "description": "Language code for original content"
          },
          "translators": {
            "type": "array",
            "description": "Translation history",
            "readOnly": true,
            "items": {
              "type": "object",
              "properties": {
                "lang": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "createdBy": {
                  "type": "string",
                  "format": "objectId"
                }
              }
            }
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created this node (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated this node (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "orgchartList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/orgchart"
            }
          }
        }
      },
      "authManagement": {
        "type": "object",
        "required": [
          "action",
          "value"
        ],
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "checkUnique",
              "resendVerifySignup",
              "sendResetPwd",
              "magicLink",
              "generateSelfServeLink",
              "validateToken",
              "resetPwdLong",
              "passwordChange"
            ],
            "description": "Action to perform - see operation description for details"
          },
          "value": {
            "type": "object",
            "description": "Action-specific parameters - structure varies by action type",
            "oneOf": [
              {
                "description": "For checkUnique action",
                "properties": {
                  "loginName": {
                    "type": "string",
                    "format": "email"
                  }
                }
              },
              {
                "description": "For resendVerifySignup, sendResetPwd, magicLink, generateSelfServeLink actions",
                "properties": {
                  "loginName": {
                    "type": "string",
                    "format": "email"
                  }
                }
              },
              {
                "description": "For validateToken action",
                "properties": {
                  "loginName": {
                    "type": "string",
                    "format": "email"
                  },
                  "oneTimeToken": {
                    "type": "string",
                    "description": "One-time token received through the self-serve setup link email"
                  }
                }
              },
              {
                "description": "For resetPwdLong action",
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "Token received via email"
                  },
                  "password": {
                    "type": "string",
                    "format": "password",
                    "description": "New password"
                  }
                }
              },
              {
                "description": "For passwordChange action",
                "properties": {
                  "user": {
                    "type": "object",
                    "properties": {
                      "loginName": {
                        "type": "string",
                        "format": "email"
                      }
                    }
                  },
                  "oldPassword": {
                    "type": "string",
                    "format": "password",
                    "description": "Current password"
                  },
                  "password": {
                    "type": "string",
                    "format": "password",
                    "description": "New password"
                  }
                }
              }
            ]
          }
        }
      },
      "translations": {
        "type": "object",
        "required": [
          "lang",
          "translations"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "lang": {
            "type": "string",
            "description": "Language code (e.g., \"en\", \"nl\", \"de\", \"fr\")"
          },
          "cid": {
            "type": "integer",
            "description": "Client/tenant ID for multi-tenant deployments"
          },
          "translations": {
            "type": "object",
            "description": "Key-value pairs of translation overrides (e.g., {\"common.save\": \"Opslaan\", \"common.cancel\": \"Annuleren\"})",
            "additionalProperties": {
              "type": "string"
            }
          },
          "category": {
            "type": "string",
            "enum": [
              "ui",
              "email",
              "push",
              "system"
            ],
            "description": "Translation category"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created translations (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated translations (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "translationsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/translations"
            }
          }
        }
      },
      "translationsPagination": {
        "title": "translations pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/translationsList"
          }
        }
      },
      "orgtypes": {
        "type": "object",
        "required": [
          "_id",
          "name"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "description": "Unique identifier (must be manually specified)"
          },
          "name": {
            "type": "string",
            "description": "Organization type name (e.g., \"Store\", \"Department\", \"Region\")"
          },
          "imported": {
            "type": "boolean",
            "description": "Whether type was imported from external system (true) or manually created (false)"
          },
          "description": {
            "type": "string",
            "description": "Textual description of the organization type"
          },
          "orderIndex": {
            "type": "integer",
            "description": "Sort order for display (lower numbers appear first)"
          },
          "parent": {
            "type": "string",
            "description": "Parent type ID for hierarchical organization types"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created this type (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated this type (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "orgtypesList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/orgtypes"
            }
          }
        }
      },
      "orgtypesPagination": {
        "title": "orgtypes pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/orgtypesList"
          }
        }
      },
      "reactions": {
        "type": "object",
        "required": [
          "type",
          "reaction"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "type": {
            "type": "string",
            "enum": [
              "messageReaction",
              "commentReaction"
            ],
            "description": "Type of reaction target"
          },
          "reaction": {
            "type": "string",
            "description": "Reaction emoji or icon identifier (e.g., \"👍\", \"❤️\", \"like\")"
          },
          "contentsref": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to content (required for messageReaction)"
          },
          "commentref": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to comment (required for commentReaction)"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the reaction (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the reaction (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "reactionsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/reactions"
            }
          }
        }
      },
      "comments": {
        "type": "object",
        "required": [
          "text",
          "refId"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "originLanguage": {
            "type": "string",
            "description": "Language in which comment was created"
          },
          "text": {
            "type": "string",
            "description": "Comment text content"
          },
          "refId": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to content, form value, or parent comment"
          },
          "type": {
            "type": "string",
            "enum": [
              "onContent",
              "onCommentOnContent",
              "onFormvalue",
              "onCommentOnFormvalue"
            ],
            "description": "Comment type indicating what it is commenting on",
            "readOnly": true
          },
          "images": {
            "type": "array",
            "description": "Attached image paths",
            "items": {
              "type": "string"
            }
          },
          "level": {
            "type": "integer",
            "description": "Nesting level: 1 (top-level comment) or 2 (reply to comment)",
            "minimum": 1,
            "maximum": 2,
            "readOnly": true
          },
          "edited": {
            "type": "boolean",
            "description": "Whether the comment has been edited after creation",
            "readOnly": true
          },
          "mentions": {
            "type": "array",
            "description": "User IDs mentioned in the comment using @ syntax",
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "social": {
            "type": "object",
            "description": "Social interaction data (auto-populated)",
            "readOnly": true,
            "properties": {
              "reactionCount": {
                "type": "integer",
                "description": "Total number of reactions on this comment"
              },
              "replyCount": {
                "type": "integer",
                "description": "Number of replies to this comment"
              },
              "replies": {
                "type": "array",
                "description": "Nested reply comments",
                "items": {
                  "type": "object"
                }
              }
            }
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the comment (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the comment (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "commentsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/comments"
            }
          }
        }
      },
      "notifications": {
        "type": "object",
        "required": [
          "notificationType",
          "recipient"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "notificationType": {
            "type": "string",
            "enum": [
              "contentNotification",
              "contentUpdateNotification",
              "contentApprovalNotification",
              "commentOnContentNotification",
              "commentOnEventContentNotification",
              "commentOnFormvalueNotification",
              "commentOnCommentOnContentNotification",
              "commentOnCommentOnFormvalueNotification",
              "updateOnFormValuesNotification",
              "reactionOnContentNotification",
              "reactionOnCommentNotification",
              "usersRewardNotification",
              "usersLevelNotification",
              "mentionOnContentNotification",
              "mentionOnCommentOnContentNotification",
              "mentionOnCommentOnFormvalueNotification",
              "taskApproval",
              "translationRequestNotification",
              "deleteFormSubmissionsNotification",
              "removeAttendeesNotification",
              "userAttendanceStatusNotification"
            ],
            "description": "Type of notification"
          },
          "recipient": {
            "type": "string",
            "format": "objectId",
            "description": "User who receives this notification"
          },
          "read": {
            "type": "boolean",
            "description": "Whether the recipient has read the notification",
            "default": false
          },
          "new": {
            "type": "boolean",
            "description": "Whether the notification is new/unseen",
            "default": true
          },
          "notificationData": {
            "type": "object",
            "description": "Notification-specific data (content varies by notification type)",
            "properties": {
              "contentId": {
                "type": "string",
                "format": "objectId",
                "description": "Related content ID (if applicable)"
              },
              "taskId": {
                "type": "string",
                "format": "objectId",
                "description": "Related task ID (if applicable)"
              },
              "commentId": {
                "type": "string",
                "format": "objectId",
                "description": "Related comment ID (if applicable)"
              },
              "message": {
                "type": "string",
                "description": "Notification message text"
              }
            }
          },
          "otherUsers": {
            "type": "integer",
            "description": "Number of other users involved in this notification (e.g., for grouped likes)",
            "minimum": 0
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who triggered the notification (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the notification (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "notificationAction": {
        "type": "object",
        "required": [
          "action"
        ],
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "markAllRead",
              "markAllNonNew"
            ],
            "description": "Bulk action to perform on all notifications for current user"
          }
        }
      },
      "notificationsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/notifications"
            }
          }
        }
      },
      "notificationsPagination": {
        "title": "notifications pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/notificationsList"
          }
        }
      },
      "votes": {
        "type": "object",
        "required": [
          "contentRef",
          "pollOptId"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "contentRef": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to the poll content"
          },
          "pollOptId": {
            "type": "string",
            "description": "Poll option ID that this vote is for"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who cast the vote (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Vote timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the vote (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "votesList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/votes"
            }
          }
        }
      },
      "version": {
        "type": "object",
        "properties": {
          "version": {
            "type": "string",
            "description": "Application version (e.g., \"1.136.0\")",
            "example": "1.136.0"
          },
          "env": {
            "type": "string",
            "enum": [
              "production",
              "staging",
              "development",
              "local"
            ],
            "description": "Environment name"
          },
          "cpus": {
            "type": "string",
            "description": "Number of CPU cores available",
            "example": "8"
          },
          "totalmem": {
            "type": "string",
            "description": "Total system memory in GB",
            "example": "16 GB"
          },
          "freemem": {
            "type": "string",
            "description": "Free system memory in GB",
            "example": "8 GB"
          },
          "nodeVersion": {
            "type": "string",
            "description": "Node.js version"
          },
          "platform": {
            "type": "string",
            "description": "Operating system platform"
          },
          "uptime": {
            "type": "number",
            "description": "System uptime in seconds"
          }
        }
      },
      "versionList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/version"
            }
          }
        }
      },
      "configs": {
        "type": "object",
        "required": [
          "configType"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "configType": {
            "type": "string",
            "enum": [
              "app",
              "theme",
              "features",
              "integrations",
              "notifications"
            ],
            "description": "Type of configuration"
          },
          "subdomain": {
            "type": "string",
            "description": "Subdomain this configuration applies to (for multi-tenant setups)"
          },
          "environment": {
            "type": "string",
            "enum": [
              "production",
              "staging",
              "development"
            ],
            "description": "Environment this configuration applies to"
          },
          "data": {
            "type": "object",
            "description": "Configuration data (structure varies by configType)"
          },
          "active": {
            "type": "boolean",
            "description": "Whether this configuration is currently active",
            "default": true
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the configuration (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the configuration (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "configsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/configs"
            }
          }
        }
      },
      "configsPagination": {
        "title": "configs pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/configsList"
          }
        }
      },
      "pushsubscriptions": {
        "type": "object",
        "required": [
          "udid",
          "platform"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "udid": {
            "type": "string",
            "description": "Unique device identifier (UUID for mobile, generated for web)"
          },
          "pushPermission": {
            "type": "boolean",
            "description": "Whether user granted push notification permission",
            "default": false
          },
          "lastRequest": {
            "type": "string",
            "format": "date-time",
            "description": "Last time user was prompted for push permission (when pushPermission=false)",
            "readOnly": true
          },
          "platform": {
            "type": "string",
            "enum": [
              "ios",
              "android",
              "web"
            ],
            "description": "Device platform type"
          },
          "pushToken": {
            "type": "string",
            "description": "FCM push token (used by Android and Web)"
          },
          "apnsPushToken": {
            "type": "string",
            "description": "APNs push token (iOS only)"
          },
          "subscriptionId": {
            "type": "string",
            "description": "Deprecated - kept for backward compatibility",
            "deprecated": true
          },
          "loggedOn": {
            "type": "boolean",
            "description": "Whether user is currently logged into the app on this device",
            "default": true
          },
          "update": {
            "type": "boolean",
            "description": "Deprecated - kept for backward compatibility",
            "deprecated": true
          },
          "deviceInfo": {
            "type": "object",
            "description": "Additional device information (OS version, app version, etc.)"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who owns this subscription (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Registration timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "pushsubscriptionsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/pushsubscriptions"
            }
          }
        }
      },
      "pushsubscriptionsPagination": {
        "title": "pushsubscriptions pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/pushsubscriptionsList"
          }
        }
      },
      "authchat": {
        "type": "object",
        "properties": {}
      },
      "authchatList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/authchat"
            }
          }
        }
      },
      "authchatPagination": {
        "title": "authchat pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/authchatList"
          }
        }
      },
      "pushmessages": {
        "type": "object",
        "required": [
          "message",
          "origin",
          "originId"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "status": {
            "type": "string",
            "enum": [
              "new",
              "converted",
              "processed",
              "failed"
            ],
            "description": "Processing status of the push message",
            "default": "new"
          },
          "sendTime": {
            "type": "string",
            "format": "date-time",
            "description": "Scheduled time for push delivery"
          },
          "message": {
            "type": "string",
            "description": "Push notification message text"
          },
          "title": {
            "type": "string",
            "description": "Push notification title"
          },
          "origin": {
            "type": "string",
            "enum": [
              "content",
              "task",
              "comment",
              "system",
              "chat"
            ],
            "description": "Type of entity that triggered the push notification"
          },
          "originId": {
            "type": "string",
            "format": "objectId",
            "description": "ID of the entity that triggered the push"
          },
          "userId": {
            "type": "string",
            "format": "objectId",
            "description": "Target user ID for the push notification"
          },
          "data": {
            "type": "object",
            "description": "Additional data payload for the push notification"
          },
          "errorMessage": {
            "type": "string",
            "description": "Error message if processing failed",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User/system that created the message (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User/system that last updated (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "pushmessagesList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/pushmessages"
            }
          }
        }
      },
      "pushmessagesPagination": {
        "title": "pushmessages pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/pushmessagesList"
          }
        }
      },
      "pushmessagesqueue": {
        "type": "object",
        "required": [
          "pushMessage",
          "userId"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "pushMessage": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to parent push message"
          },
          "userId": {
            "type": "string",
            "format": "objectId",
            "description": "Target user for this queue entry"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "sent",
              "failed",
              "retry"
            ],
            "description": "Delivery status of this queue entry",
            "default": "pending"
          },
          "sentAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when push was successfully sent",
            "readOnly": true
          },
          "message": {
            "type": "string",
            "description": "Resolved message text for this user"
          },
          "title": {
            "type": "string",
            "description": "Resolved notification title"
          },
          "deviceToken": {
            "type": "string",
            "description": "FCM/APNS device token for delivery"
          },
          "platform": {
            "type": "string",
            "enum": [
              "ios",
              "android",
              "web"
            ],
            "description": "Target platform"
          },
          "retryCount": {
            "type": "integer",
            "description": "Number of delivery retry attempts",
            "default": 0
          },
          "errorMessage": {
            "type": "string",
            "description": "Error message if delivery failed",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "System that created the entry (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "System that last updated (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "pushmessagesqueueList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/pushmessagesqueue"
            }
          }
        }
      },
      "pushmessagesqueuePagination": {
        "title": "pushmessagesqueue pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/pushmessagesqueueList"
          }
        }
      },
      "formvalues": {
        "type": "object",
        "required": [
          "contentRef",
          "values"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "contentRef": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to the form content"
          },
          "contentType": {
            "type": "string",
            "enum": [
              "form",
              "event"
            ],
            "description": "Type of content (auto-populated from contentRef)",
            "readOnly": true
          },
          "confidential": {
            "type": "boolean",
            "description": "Whether form submission is confidential (copied from form configuration)",
            "readOnly": true
          },
          "confidants": {
            "type": "array",
            "description": "User IDs who can access confidential form results (copied from form configuration)",
            "readOnly": true,
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "values": {
            "type": "array",
            "description": "Form field values submitted by user",
            "items": {
              "type": "object",
              "properties": {
                "fieldId": {
                  "type": "string",
                  "description": "Form field identifier"
                },
                "value": {
                  "description": "Field value (type varies by field type)"
                }
              }
            }
          },
          "orgunitsOfCreator": {
            "type": "array",
            "description": "Organization units of the submitter at time of submission (for filtering by zone of influence)",
            "readOnly": true,
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "videoProcessing": {
            "type": "boolean",
            "description": "Indicates if video attachments in submission are still processing",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who submitted the form (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Submission timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the submission (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "formvaluesList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/formvalues"
            }
          }
        }
      },
      "formvaluesPagination": {
        "title": "formvalues pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/formvaluesList"
          }
        }
      },
      "permissions": {
        "type": "object",
        "required": [
          "value"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "value": {
            "type": "string",
            "description": "Permission identifier (e.g., \"content.create\", \"user.manage\", \"reports.view\")"
          },
          "description": {
            "type": "string",
            "description": "Human-readable description of what this permission grants"
          },
          "category": {
            "type": "string",
            "description": "Permission category for grouping (e.g., \"content\", \"users\", \"administration\")"
          },
          "isSuperAdminPermission": {
            "type": "boolean",
            "description": "Indicates whether the permission is reserved for super-admin or Keephub admin functionality"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the permission (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the permission (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "permissionsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/permissions"
            }
          }
        }
      },
      "permissionsPagination": {
        "title": "permissions pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/permissionsList"
          }
        }
      },
      "roles": {
        "type": "object",
        "required": [
          "name",
          "level"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Role name (e.g., \"Content Manager\", \"Supervisor\")"
          },
          "level": {
            "type": "string",
            "enum": [
              "user",
              "supervisor",
              "admin",
              "keephubAdmin",
              "system"
            ],
            "description": "Role hierarchy level determining access scope"
          },
          "default": {
            "type": "boolean",
            "description": "Indicates whether the role is a default system role"
          },
          "hidden": {
            "type": "boolean",
            "description": "Indicates whether the role is hidden from normal role selection flows"
          },
          "description": {
            "type": "string",
            "description": "Optional human-readable description of the role"
          },
          "isProtected": {
            "type": "boolean",
            "description": "Protected roles cannot be edited or deleted through the API"
          },
          "permissions": {
            "type": "array",
            "description": "Permission IDs assigned to this role. The `configs.admin` permission may only be assigned by callers who already have `configs.admin`.",
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the role (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the role (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          },
          "userCount": {
            "type": "integer",
            "description": "Number of users assigned to this role. Returned only when `management=true` is requested.",
            "readOnly": true
          }
        }
      },
      "rolesList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/roles"
            }
          }
        }
      },
      "rolesPagination": {
        "title": "roles pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/rolesList"
          }
        }
      },
      "signurl": {
        "type": "object",
        "required": [
          "signType"
        ],
        "properties": {
          "signType": {
            "type": "string",
            "enum": [
              "getObject",
              "putObject",
              "externalPlugin"
            ],
            "description": "Type of signing operation"
          },
          "origin": {
            "type": "string",
            "enum": [
              "contentAttachment",
              "contentTemplateAttachment",
              "tasktemplateAttachment",
              "taskAttachment",
              "formValuesAttachment",
              "externalAttachment",
              "contentVideo",
              "tasktemplateVideo",
              "formValuesVideo",
              "taskFormAnswer",
              "externalPluginUrl",
              "externalPluginProfile",
              "lessonAttachment"
            ],
            "description": "Origin type for access verification (required for getObject). Options: contentAttachment, contentTemplateAttachment, tasktemplateAttachment, taskAttachment, formValuesAttachment, externalAttachment, contentVideo, tasktemplateVideo, formValuesVideo, taskFormAnswer, externalPluginUrl, externalPluginProfile, lessonAttachment"
          },
          "originId": {
            "type": "string",
            "format": "objectId",
            "description": "ID of origin entity (content, task, form, etc.) for access verification (required for getObject)"
          },
          "storageId": {
            "type": "string",
            "description": "S3 storage identifier to sign (required for getObject)"
          },
          "contentType": {
            "type": "string",
            "description": "MIME type of file (required for putObject, e.g., \"image/jpeg\", \"application/pdf\")"
          },
          "fileType": {
            "type": "string",
            "enum": [
              "image",
              "video",
              "attachment",
              "other"
            ],
            "description": "File type for Lambda processing hint (required for putObject). Options: image, video, attachment, other"
          },
          "subFolder": {
            "type": "string",
            "description": "Optional subfolder path when generating storageId (for putObject)"
          },
          "textractDisable": {
            "type": "boolean",
            "description": "Disable PDF text extraction Lambda processing (for putObject)"
          },
          "fileName": {
            "type": "string",
            "description": "Filename to append to S3 path (for putObject)"
          },
          "attachment": {
            "type": "boolean",
            "description": "Set Content-Disposition to attachment for downloads (for getObject)",
            "default": false
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "External URL to sign (for externalPlugin with origin=externalPluginUrl)"
          }
        }
      },
      "signurlList": {
        "type": "object",
        "description": "Not applicable - returns single signed URL"
      },
      "contentviewViewer": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Viewer user identifier"
          },
          "name": {
            "type": "string",
            "description": "Viewer display name"
          },
          "profilePicture": {
            "type": "string",
            "description": "Viewer profile picture URL"
          },
          "organisation": {
            "type": "string",
            "description": "Viewer organisation"
          },
          "position": {
            "type": "string",
            "description": "Viewer position"
          },
          "deleted": {
            "type": "boolean",
            "description": "Whether the user has been deleted"
          },
          "lastViewedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the content was viewed",
            "readOnly": true
          }
        }
      },
      "contentviewViewerList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/contentviewViewer"
            }
          }
        }
      },
      "contentviews": {
        "type": "object",
        "required": [
          "contentRef"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "contentRef": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to the viewed content"
          },
          "viewDuration": {
            "type": "integer",
            "description": "Time spent viewing content in seconds"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who viewed the content (auto-populated)",
            "readOnly": true
          },
          "createdByFullName": {
            "type": "string",
            "description": "Denormalized full name of the viewer used for viewer-list search",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "View timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the view (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "contentviewsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/contentviews"
            }
          }
        }
      },
      "blacklisttoken": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Token that needs to be blacklisted"
          }
        }
      },
      "blacklisttokenList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/blacklisttoken"
            }
          }
        }
      },
      "search": {
        "type": "object",
        "properties": {
          "searchData": {
            "type": "object",
            "description": "Search result object (structure varies by search type)"
          },
          "_score": {
            "type": "number",
            "description": "Relevance score from Elasticsearch"
          },
          "highlight": {
            "type": "object",
            "description": "Highlighted search term matches"
          }
        }
      },
      "searchList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/search"
            }
          }
        }
      },
      "searchPagination": {
        "title": "search pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/searchList"
          }
        }
      },
      "levels": {
        "type": "object",
        "required": [
          "name",
          "range"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Level name (e.g., \"Beginner\", \"Expert\", \"Master\")"
          },
          "range": {
            "type": "array",
            "description": "Point range [from, to] for this level",
            "items": {
              "type": "number"
            },
            "minItems": 2,
            "maxItems": 2,
            "example": [
              0,
              100
            ]
          },
          "reward": {
            "type": "object",
            "description": "Reward given when user reaches this level",
            "properties": {
              "amount": {
                "type": "number",
                "description": "Amount of coins/points awarded"
              },
              "title": {
                "type": "string",
                "description": "Title granted at this level"
              },
              "icon": {
                "type": "string",
                "description": "MDI icon name for level badge"
              },
              "badge": {
                "type": "string",
                "description": "Badge image URL or identifier"
              }
            }
          },
          "order": {
            "type": "integer",
            "description": "Display order of levels"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "levelsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/levels"
            }
          }
        }
      },
      "rewards": {
        "type": "object",
        "required": [
          "rewardType",
          "pipeline",
          "collectionName"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "rewardType": {
            "type": "string",
            "enum": [
              "achievement",
              "milestone",
              "activity",
              "contribution"
            ],
            "description": "Type of reward"
          },
          "points": {
            "type": "number",
            "description": "Number of points awarded to user",
            "minimum": 0
          },
          "coins": {
            "type": "number",
            "description": "Number of coins awarded to user",
            "minimum": 0
          },
          "pipeline": {
            "type": "string",
            "description": "MongoDB aggregation pipeline (JSON string) to find eligible users"
          },
          "collectionName": {
            "type": "string",
            "description": "Collection name on which pipeline query is executed"
          },
          "description": {
            "type": "string",
            "description": "Reward description explaining what triggers it"
          },
          "title": {
            "type": "string",
            "description": "Reward title displayed to users"
          },
          "oneTimeReward": {
            "type": "boolean",
            "description": "If true, reward is granted only once per user; if false, granted every time condition is met",
            "default": false
          },
          "active": {
            "type": "boolean",
            "description": "Whether reward is currently active",
            "default": true
          },
          "icon": {
            "type": "string",
            "description": "Icon identifier for reward badge"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the reward (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the reward (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "rewardsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/rewards"
            }
          }
        }
      },
      "rewardsPagination": {
        "title": "rewards pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/rewardsList"
          }
        }
      },
      "badges": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "name": {
            "type": "object",
            "description": "Multi-language badge name (e.g., {\"en\": \"First Post\", \"nl\": \"Eerste Bericht\"})"
          },
          "description": {
            "type": "object",
            "description": "Multi-language badge description"
          },
          "image": {
            "type": "string",
            "description": "S3 path to badge image/icon"
          },
          "criteria": {
            "type": "object",
            "description": "Criteria for earning this badge (e.g., points threshold, activity count)"
          },
          "points": {
            "type": "integer",
            "description": "Points awarded when earning this badge",
            "minimum": 0
          },
          "order": {
            "type": "integer",
            "description": "Display order for badge listing"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the badge (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the badge (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "badgesList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/badges"
            }
          }
        }
      },
      "badgesPagination": {
        "title": "badges pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/badgesList"
          }
        }
      },
      "usersrewards": {
        "type": "object",
        "required": [
          "userRef",
          "rewardRef"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "userRef": {
            "type": "string",
            "format": "objectId",
            "description": "User who received the reward"
          },
          "entityRef": {
            "type": "string",
            "format": "objectId",
            "description": "Entity related to reward (e.g., content ID, task ID)"
          },
          "rewardRef": {
            "type": "string",
            "format": "objectId",
            "description": "Reward definition reference"
          },
          "points": {
            "type": "number",
            "description": "Points awarded",
            "readOnly": true
          },
          "coins": {
            "type": "number",
            "description": "Coins awarded",
            "readOnly": true
          },
          "description": {
            "type": "string",
            "description": "Reward description"
          },
          "title": {
            "type": "string",
            "description": "Reward title"
          },
          "originLanguage": {
            "type": "string",
            "description": "Language for reward text"
          },
          "seen": {
            "type": "boolean",
            "description": "Whether user has seen this reward notification",
            "default": false
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "System/user that granted reward (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When reward was granted (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "Last updated by (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "usersrewardsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/usersrewards"
            }
          }
        }
      },
      "usersrewardsPagination": {
        "title": "usersrewards pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/usersrewardsList"
          }
        }
      },
      "translate": {
        "type": "object",
        "required": [
          "text",
          "target"
        ],
        "properties": {
          "text": {
            "type": "array",
            "description": "Text strings to translate",
            "items": {
              "type": "string"
            }
          },
          "source": {
            "type": "string",
            "description": "Source language code (e.g., \"en\", \"nl\", \"de\"). Auto-detected if not provided"
          },
          "target": {
            "type": "string",
            "description": "Target language code (e.g., \"en\", \"nl\", \"de\", \"fr\")"
          },
          "format": {
            "type": "string",
            "enum": [
              "text",
              "html"
            ],
            "description": "Format of the text (text or HTML)",
            "default": "text"
          }
        }
      },
      "translateList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/translate"
            }
          }
        }
      },
      "translatePagination": {
        "title": "translate pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/translateList"
          }
        }
      },
      "userspointsbalances": {
        "type": "object",
        "required": [
          "userRef",
          "points"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "userRef": {
            "type": "string",
            "format": "objectId",
            "description": "User who owns this balance entry"
          },
          "usersRewardRef": {
            "type": "string",
            "format": "objectId",
            "description": "Associated user reward (if points from reward)"
          },
          "points": {
            "type": "number",
            "description": "Points amount (positive for credit, negative for debit)"
          },
          "coins": {
            "type": "number",
            "description": "Coins amount (if applicable)"
          },
          "description": {
            "type": "string",
            "description": "Transaction description"
          },
          "title": {
            "type": "string",
            "description": "Transaction title"
          },
          "transactionType": {
            "type": "string",
            "enum": [
              "reward",
              "purchase",
              "adjustment",
              "refund"
            ],
            "description": "Type of transaction"
          },
          "originLanguage": {
            "type": "string",
            "description": "Language for transaction text"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "System/user that created entry (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Transaction timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "Last updated by (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "userspointsbalancesList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/userspointsbalances"
            }
          }
        }
      },
      "userspointsbalancesPagination": {
        "title": "userspointsbalances pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/userspointsbalancesList"
          }
        }
      },
      "attachmentdetails": {
        "type": "object",
        "required": [
          "storageId"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "storageId": {
            "type": "string",
            "description": "S3 storage identifier for the attachment"
          },
          "fileName": {
            "type": "string",
            "description": "Original file name"
          },
          "fileType": {
            "type": "string",
            "description": "MIME type of the attachment (e.g., \"application/pdf\")"
          },
          "textContent": {
            "type": "string",
            "description": "Extracted text content from PDF for search indexing"
          },
          "pageCount": {
            "type": "integer",
            "description": "Number of pages in PDF document"
          },
          "fileSize": {
            "type": "integer",
            "description": "File size in bytes"
          },
          "processingStatus": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "completed",
              "failed"
            ],
            "description": "Status of text extraction processing"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "attachmentdetailsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/attachmentdetails"
            }
          }
        }
      },
      "attachmentdetailsPagination": {
        "title": "attachmentdetails pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/attachmentdetailsList"
          }
        }
      },
      "awstrigger": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Type of trigger, allowed values are [pdfConvertedToTxt,videoResized]"
          },
          "value": {
            "type": "string",
            "description": "value from trigger, point to new content. For pdfConvertedToTxt it is location of TXT file that will later be deleted, for videoResized it points to new converted video (original one from processing will be deleted)"
          },
          "poster": {
            "type": "array",
            "description": "Array of two poster image URLs",
            "items": {
              "type": "string"
            },
            "minItems": 2,
            "maxItems": 2
          },
          "ref": {
            "type": "string",
            "description": "Reference to original content. For pdfConvertedToTxt it points to original PDF in processing folder, for videoResized it points to original video in processing folder"
          }
        }
      },
      "awstriggerList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/awstrigger"
            }
          }
        }
      },
      "chatgroups": {
        "type": "object",
        "required": [
          "name",
          "type",
          "users"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the group, non translatable"
          },
          "type": {
            "type": "string",
            "description": "Type of group, options are external and auto, Use external unless you are sure"
          },
          "users": {
            "type": "array",
            "description": "Array of users that belong to the group",
            "items": {
              "type": "string"
            }
          },
          "createdBy": {
            "type": "string",
            "description": "Field populated by system, reference to user who created group"
          },
          "createdAt": {
            "type": "string",
            "description": "Field populated by system, timestamp of creation"
          },
          "updatedBy": {
            "type": "string",
            "description": "Field populated by system, reference to user who updated group"
          },
          "updatedAt": {
            "type": "string",
            "description": "Field populated by system, timestamp of last update"
          }
        }
      },
      "chatgroupsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/chatgroups"
            }
          }
        }
      },
      "chatgroupsPagination": {
        "title": "chatgroups pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/chatgroupsList"
          }
        }
      },
      "tags": {
        "type": "object",
        "required": [
          "text"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "text": {
            "type": "string",
            "description": "Tag text (hashtag). Must start with # symbol (e.g., \"#marketing\", \"#urgent\")"
          },
          "type": {
            "type": "string",
            "enum": [
              "content",
              "task",
              "event"
            ],
            "description": "Tag category/type",
            "default": "content"
          },
          "useCount": {
            "type": "integer",
            "description": "Number of times this tag has been used (auto-calculated)",
            "minimum": 0,
            "readOnly": true
          },
          "relevanceScore": {
            "type": "number",
            "description": "Relevance score for sorting tags (auto-calculated based on usage and recency)",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the tag (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the tag (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "tagsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/tags"
            }
          }
        }
      },
      "exports": {
        "type": "object",
        "description": "Export service does not return JSON - returns file directly"
      },
      "exportsList": {
        "type": "object",
        "description": "Not applicable - this service returns files"
      },
      "contentpooltypes": {
        "type": "object",
        "required": [
          "name",
          "type"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Display name for this content pool type (e.g., \"News Pool\", \"Event Calendar\")"
          },
          "type": {
            "type": "string",
            "enum": [
              "news",
              "event",
              "poll",
              "manual",
              "faq",
              "form",
              "training",
              "externalNotificationContent"
            ],
            "description": "Content type restriction - content pools of this type can only contain this content type"
          },
          "createRights": {
            "type": "array",
            "description": "Default group IDs that have permission to create content in pools of this type",
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "limitToOrgtype": {
            "type": "string",
            "format": "objectId",
            "description": "Default organization type restriction for content pools of this type"
          },
          "requireApproval": {
            "type": "boolean",
            "description": "Default approval requirement for content in pools of this type",
            "default": false
          },
          "approvers": {
            "type": "array",
            "description": "Default user IDs who can approve content",
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "rightsConfiguration": {
            "type": "object",
            "description": "Default rights settings template (can disable certain rights features)",
            "properties": {
              "disable": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "List of rights features to disable"
              }
            }
          },
          "optionsConfiguration": {
            "type": "object",
            "description": "Default options settings template (can disable certain option features)",
            "properties": {
              "disable": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "List of option features to disable"
              }
            }
          },
          "translationConfiguration": {
            "type": "object",
            "description": "Default translation settings template",
            "properties": {
              "disable": {
                "type": "boolean",
                "description": "Whether to disable translations"
              },
              "requestorGroups": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "objectId"
                },
                "description": "Groups that can request translations"
              }
            }
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created this type (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated this type (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "contentpooltypesList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/contentpooltypes"
            }
          }
        }
      },
      "contentpooltypesPagination": {
        "title": "contentpooltypes pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/contentpooltypesList"
          }
        }
      },
      "orgattributes": {
        "type": "object",
        "required": [
          "_id",
          "name",
          "originLanguage",
          "category"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "description": "Unique identifier (must be manually specified)"
          },
          "name": {
            "type": "object",
            "description": "Multi-language attribute name (e.g., {\"en\": \"Second Floor\", \"nl\": \"Tweede Verdieping\"})"
          },
          "originLanguage": {
            "type": "string",
            "description": "Language code for original attribute name"
          },
          "imported": {
            "type": "boolean",
            "description": "Whether attribute was imported from external system (true) or manually created (false). Defaults to false on create when omitted. Only keephubAdmin and system user can change this field."
          },
          "category": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to organization attribute category for grouping"
          },
          "translators": {
            "type": "array",
            "description": "Translation history for attribute name",
            "readOnly": true,
            "items": {
              "type": "object",
              "properties": {
                "lang": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "createdBy": {
                  "type": "string",
                  "format": "objectId"
                }
              }
            }
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created this attribute (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated this attribute (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "orgattributesList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/orgattributes"
            }
          }
        }
      },
      "orgattributesPagination": {
        "title": "orgattributes pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/orgattributesList"
          }
        }
      },
      "orgattributecategories": {
        "type": "object",
        "required": [
          "_id",
          "name",
          "originLanguage"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "description": "Unique identifier (must be manually specified)"
          },
          "name": {
            "type": "object",
            "description": "Multi-language category name (e.g., {\"en\": \"Location Attributes\", \"nl\": \"Locatie Attributen\"})"
          },
          "originLanguage": {
            "type": "string",
            "description": "Language code for original category name"
          },
          "imported": {
            "type": "boolean",
            "description": "Whether category was imported from external system (true) or manually created (false). Defaults to false on create when omitted. Only keephubAdmin and system user can change this field."
          },
          "translators": {
            "type": "array",
            "description": "Translation history for category name",
            "readOnly": true,
            "items": {
              "type": "object",
              "properties": {
                "lang": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "createdBy": {
                  "type": "string",
                  "format": "objectId"
                }
              }
            }
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created this category (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated this category (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "orgattributecategoriesList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/orgattributecategories"
            }
          }
        }
      },
      "orgattributecategoriesPagination": {
        "title": "orgattributecategories pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/orgattributecategoriesList"
          }
        }
      },
      "talkjshook": {
        "type": "object",
        "description": "TalkJS webhook payload"
      },
      "folders": {
        "type": "object",
        "required": [
          "name",
          "originLanguage"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "name": {
            "type": "object",
            "description": "Multi-language folder name. Must include at least origin language (e.g., {\"en\": \"Documentation\", \"nl\": \"Documentatie\"})"
          },
          "originLanguage": {
            "type": "string",
            "description": "Language code for the original folder name"
          },
          "parent": {
            "type": "string",
            "format": "objectId",
            "description": "Parent folder ID for hierarchical structure (null for root folders)"
          },
          "contentPool": {
            "type": "string",
            "format": "objectId",
            "description": "Content pool this folder belongs to"
          },
          "orgchartSelection": {
            "type": "object",
            "description": "Organization units selected for targeting",
            "properties": {
              "include": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "objectId"
                }
              },
              "exclude": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "objectId"
                }
              }
            }
          },
          "orgchartAttrSelection": {
            "type": "object",
            "description": "Organizational attribute filters. Top-level arrays use AND logic, nested arrays use OR logic",
            "properties": {
              "include": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "objectId"
                  }
                }
              },
              "exclude": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "objectId"
                  }
                }
              }
            }
          },
          "groups": {
            "type": "object",
            "description": "Group targeting configuration",
            "properties": {
              "exclude": {
                "type": "boolean",
                "description": "If true, excludes selected groups; if false, includes only selected groups"
              },
              "selection": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "objectId"
                },
                "description": "Group IDs for targeting"
              }
            }
          },
          "orgunits": {
            "type": "array",
            "description": "Organization units this folder belongs to (auto-populated based on orgchartSelection)",
            "readOnly": true,
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "translators": {
            "type": "array",
            "description": "Translation history for folder name",
            "readOnly": true,
            "items": {
              "type": "object",
              "properties": {
                "lang": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "createdBy": {
                  "type": "string",
                  "format": "objectId"
                }
              }
            }
          },
          "contentCount": {
            "type": "integer",
            "description": "Number of content items in this folder (calculated on read)",
            "readOnly": true
          },
          "subfolderCount": {
            "type": "integer",
            "description": "Number of subfolders in this folder (calculated and updated in after hook)",
            "readOnly": true
          },
          "externalRef": {
            "type": "string",
            "description": "Optional external reference ID for integration with other systems"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the folder (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the folder (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "foldersList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/folders"
            }
          }
        }
      },
      "loginoptions": {
        "type": "object",
        "properties": {
          "loginMethod": {
            "type": "string",
            "description": "String that returned allowed login method for user, options are [local,oauth]"
          },
          "oAuthURL": {
            "type": "string",
            "description": "URL that needs to be called in order to redirect user to IDP portal, only present if loginMethod is oauth"
          },
          "magicLink": {
            "type": "boolean",
            "description": "Flag that tells if magic link (Email Sign-in) login is possible for user, user needs to have valid email and magic link needs to be enabled."
          }
        }
      },
      "loginoptionsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/loginoptions"
            }
          }
        }
      },
      "impersonate": {
        "type": "object",
        "required": [
          "value"
        ],
        "properties": {
          "value": {
            "type": "object",
            "description": "User identification (provide either loginName or _id)",
            "properties": {
              "loginName": {
                "type": "string",
                "description": "Login name of user to impersonate"
              },
              "_id": {
                "type": "string",
                "format": "objectId",
                "description": "User ID to impersonate"
              }
            }
          },
          "method": {
            "type": "string",
            "enum": [
              "magiclink",
              "jwt"
            ],
            "description": "Impersonation method (defaults to magiclink if not specified)",
            "default": "magiclink"
          }
        }
      },
      "impersonateList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/impersonate"
            }
          }
        }
      },
      "reach": {
        "type": "object",
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "orgUnitBelong",
              "relevantParams",
              "calculateReach"
            ],
            "description": "Type of reach calculation to perform"
          },
          "contentPool": {
            "type": "string",
            "format": "objectId",
            "description": "Content pool ID (for content/folders). If orgtype is defined in CP, orgchartSelection is ignored relative to user position"
          },
          "orgchartSelection": {
            "type": "object",
            "description": "Organization chart selection for targeting",
            "properties": {
              "include": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "objectId"
                },
                "description": "Organization units to include"
              },
              "exclude": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "objectId"
                },
                "description": "Organization units to exclude"
              }
            }
          },
          "orgchartAttrSelection": {
            "type": "object",
            "description": "Organization attribute filters",
            "properties": {
              "include": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "objectId"
                  }
                },
                "description": "Attribute filters (AND/OR logic)"
              },
              "exclude": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "objectId"
                  }
                },
                "description": "Attribute exclusion filters"
              }
            }
          },
          "groups": {
            "description": "Group targeting configuration. When `contentPool` is present, content-style requests use `{ selection, exclude }` and support both include and exclude matching. When `contentPool` is absent, task-preview requests may also send the legacy array shape and do not support excluded groups.",
            "oneOf": [
              {
                "type": "object",
                "properties": {
                  "exclude": {
                    "type": "boolean",
                    "description": "If true, excludes selected groups for content-style `calculateReach`, `orgUnitBelong`, and `relevantParams` when `contentPool` is present. Task previews reject this mode."
                  },
                  "selection": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "format": "objectId"
                    },
                    "description": "Group IDs"
                  }
                }
              },
              {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "objectId"
                },
                "description": "Legacy task-template group IDs used for task reach previews."
              }
            ]
          },
          "onlyActiveUsers": {
            "type": "boolean",
            "description": "Include only active users in `orgUnitBelong`, `relevantParams`, and content-style `calculateReach`. Task-preview `calculateReach` already always requires active users as part of task-assignment rules.",
            "default": false
          },
          "firstLoginDone": {
            "type": "boolean",
            "description": "Include only users who have completed first login in `orgUnitBelong` and `relevantParams`. `calculateReach` already always requires first login as part of task-assignment rules.",
            "default": false
          },
          "excludeFromTasks": {
            "type": "boolean",
            "description": "Filter out users marked as excluded from tasks in `orgUnitBelong` and `relevantParams`. Task-style `calculateReach` already always applies this task-assignment rule, while content-style `calculateReach` ignores this field.",
            "default": false
          },
          "completionType": {
            "type": "string",
            "enum": [
              "person",
              "group"
            ],
            "description": "Task completion mode used for the preview. Omit this field, or set it to `person`, for the default personal reach calculation. Set it to `group` only when previewing group task completion and you need the eligible orgunit count.",
            "default": "person"
          }
        }
      },
      "reachCalculateReachResponse": {
        "type": "object",
        "required": [
          "count"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "description": "Calculated task reach count. Defaults to the personal task count as it would be created by upsert; when `completionType=\"group\"`, returns the eligible group-task orgunit count."
          }
        }
      },
      "reachOrgUnitBelongResponse": {
        "type": "object",
        "required": [
          "count",
          "meta-count-orgunits"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "nullable": true,
            "description": "Number of matching users, or `null` when no eligible orgunits remain after filtering."
          },
          "meta-count-orgunits": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Organization units included in the org-unit reach calculation."
          }
        }
      },
      "reachRelevantParamsResponse": {
        "type": "object",
        "required": [
          "relevantGroups",
          "relevantAttributes"
        ],
        "properties": {
          "relevantGroups": {
            "type": "array",
            "description": "Suggested groups derived from users matching the current filters.",
            "items": {
              "type": "object",
              "properties": {
                "_id": {
                  "type": "string"
                },
                "count": {
                  "type": "integer"
                },
                "group": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Joined group document for the matched group."
                }
              },
              "additionalProperties": true
            }
          },
          "relevantAttributes": {
            "type": "array",
            "description": "Suggested org attributes derived from users matching the current filters.",
            "items": {
              "type": "object",
              "properties": {
                "_id": {
                  "type": "string"
                },
                "count": {
                  "type": "integer"
                },
                "attribute": {
                  "type": "object",
                  "additionalProperties": true,
                  "description": "Joined org attribute document for the matched attribute."
                }
              },
              "additionalProperties": true
            }
          }
        }
      },
      "reachList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/reach"
            }
          }
        }
      },
      "workflow": {
        "type": "object",
        "required": [
          "action",
          "ref"
        ],
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "approveContent",
              "rejectContent",
              "approveTaskAnswer",
              "rejectTaskAnswer"
            ],
            "description": "Workflow action to execute. Allowed values: approveContent,rejectContent,approveTaskAnswer,rejectTaskAnswer"
          },
          "value": {
            "type": "string",
            "description": "Optional value/comment for the action (e.g., rejection reason)"
          },
          "ref": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to document (currently supports content)"
          },
          "notify": {
            "type": "boolean",
            "description": "Whether to send notifications about this action",
            "default": true
          }
        }
      },
      "workflowList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/workflow"
            }
          }
        }
      },
      "drive": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Name of the file, folder, or organization unit"
          },
          "lastModified": {
            "type": "string",
            "format": "date-time",
            "description": "Last modification date (files only)"
          },
          "size": {
            "type": "integer",
            "description": "File size in bytes (files only)"
          },
          "storageId": {
            "type": "string",
            "description": "S3 storage identifier for files, or path for folders/orgunits"
          },
          "type": {
            "type": "string",
            "enum": [
              "file",
              "folder",
              "orgunit"
            ],
            "description": "Type of drive entry"
          },
          "mimeType": {
            "type": "string",
            "description": "MIME type for files (e.g., \"application/pdf\", \"image/jpeg\")"
          }
        }
      },
      "drive_sign": {
        "type": "object",
        "required": [
          "storageId"
        ],
        "properties": {
          "storageId": {
            "type": "string",
            "description": "S3 storage identifier of the file to generate signed URL for"
          },
          "expiresIn": {
            "type": "integer",
            "description": "URL expiration time in seconds (default: 3600)",
            "default": 3600
          }
        }
      },
      "driveList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/drive"
            }
          }
        }
      },
      "drive_signList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/drive_sign"
            }
          }
        }
      },
      "marketplace": {
        "type": "object",
        "required": [
          "name",
          "url"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Plugin name for internal reference"
          },
          "description": {
            "type": "object",
            "description": "Multi-language plugin description"
          },
          "originLanguage": {
            "type": "string",
            "description": "Original language for plugin text"
          },
          "translators": {
            "type": "array",
            "description": "Translation history",
            "readOnly": true,
            "items": {
              "type": "object",
              "properties": {
                "lang": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "createdBy": {
                  "type": "string"
                }
              }
            }
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Plugin URL or iframe source"
          },
          "icon": {
            "type": "string",
            "description": "Plugin icon identifier"
          },
          "category": {
            "type": "string",
            "enum": [
              "productivity",
              "communication",
              "analytics",
              "integration",
              "other"
            ],
            "description": "Plugin category"
          },
          "active": {
            "type": "boolean",
            "description": "Whether plugin is currently active/enabled",
            "default": true
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who added the plugin (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the plugin (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "marketplaceList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/marketplace"
            }
          }
        }
      },
      "marketplacePagination": {
        "title": "marketplace pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/marketplaceList"
          }
        }
      },
      "reports": {
        "type": "object",
        "required": [
          "reportType",
          "startDate",
          "endDate"
        ],
        "properties": {
          "reportType": {
            "type": "string",
            "enum": [
              "activeUsersBasedOnLastActivity",
              "contentWeeklyReport",
              "taskMonthlyReport",
              "usersForUsageReport",
              "turnoverRate",
              "adoptionRate",
              "userActivityHeatMap",
              "searchResults",
              "averageResults",
              "averageUseStats"
            ],
            "description": "Type of report to generate. Options: activeUsersBasedOnLastActivity, contentWeeklyReport, taskMonthlyReport, usersForUsageReport, turnoverRate, adoptionRate, userActivityHeatMap, searchResults, averageResults, averageUseStats"
          },
          "pointType": {
            "type": "string",
            "enum": [
              "all",
              "ever",
              "24h",
              "7d",
              "30d",
              "month",
              "never",
              "last12weeks"
            ],
            "description": "Time granularity for data points. Options: all, ever, 24h, 7d, 30d, month, never, last12weeks"
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "description": "Start date of reporting period"
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "description": "End date of reporting period (can be in the future for projections)"
          },
          "orgunits": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "objectId"
            },
            "description": "Filter by specific organization units"
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "objectId"
            },
            "description": "Filter by specific groups"
          },
          "contentPools": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "objectId"
            },
            "description": "Filter by specific content pools"
          }
        }
      },
      "reportsList": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Record identifier (combination of date and reference)"
          },
          "date": {
            "type": "string",
            "format": "date-time",
            "description": "Data point date/time"
          },
          "ref": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to related entity (orgunit, group, category, etc.)"
          },
          "meta": {
            "type": "object",
            "description": "Denormalized metadata about the reference (name, type, etc.)"
          },
          "data": {
            "type": "object",
            "description": "Report metrics and values for this data point",
            "properties": {
              "count": {
                "type": "integer",
                "description": "Primary metric count"
              },
              "percentage": {
                "type": "number",
                "description": "Percentage value (if applicable)"
              },
              "trend": {
                "type": "string",
                "enum": [
                  "up",
                  "down",
                  "stable"
                ],
                "description": "Trend indicator"
              }
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When the report was generated (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "chat": {
        "properties": {
          "action": {
            "type": "string",
            "description": "Type of action to be taken on object, allowed values are authenticate,deleteConversation,removeFromGroup,setNewGroupAdmin,token"
          },
          "value": {
            "type": "string",
            "description": "value for action, optional."
          },
          "ref": {
            "type": "string",
            "description": "Reference to e.g. chat group"
          }
        }
      },
      "chatTalkjsTokenResponse": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "HS256 JWT for TalkJS token-based authentication. Pass to TalkJS Session.setToken()."
          }
        }
      },
      "externalcontacts": {
        "type": "object",
        "required": [
          "name",
          "shortDescription",
          "originLanguage"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "profilePicture": {
            "type": "string",
            "description": "S3 path to contact logo/profile image"
          },
          "name": {
            "type": "string",
            "description": "Contact name or company name"
          },
          "nameCI": {
            "type": "string",
            "description": "Case-insensitive name for search (auto-generated)",
            "readOnly": true
          },
          "nameASCII": {
            "type": "string",
            "description": "ASCII-converted name for search (auto-generated)",
            "readOnly": true
          },
          "shortDescription": {
            "type": "string",
            "description": "Brief contact description"
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "Contact email address"
          },
          "phone": {
            "type": "string",
            "description": "Contact phone number"
          },
          "website": {
            "type": "string",
            "format": "uri",
            "description": "Contact website URL"
          },
          "address1": {
            "type": "string",
            "description": "Address line 1"
          },
          "address2": {
            "type": "string",
            "description": "Address line 2"
          },
          "postalCode": {
            "type": "string",
            "description": "Postal/ZIP code"
          },
          "city": {
            "type": "string",
            "description": "City"
          },
          "country": {
            "type": "string",
            "description": "Country"
          },
          "generalInformation": {
            "type": "object",
            "description": "Multi-language general information/description"
          },
          "originLanguage": {
            "type": "string",
            "description": "Original language for contact information"
          },
          "translators": {
            "type": "array",
            "description": "Translation history",
            "readOnly": true,
            "items": {
              "type": "object",
              "properties": {
                "lang": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "createdBy": {
                  "type": "string"
                }
              }
            }
          },
          "attachments": {
            "type": "array",
            "description": "Attached files (brochures, contracts, etc.)",
            "items": {
              "type": "object",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "File name"
                },
                "storageId": {
                  "type": "string",
                  "description": "S3 storage ID"
                },
                "fileType": {
                  "type": "string",
                  "description": "MIME type"
                }
              }
            }
          },
          "category": {
            "type": "string",
            "enum": [
              "partner",
              "vendor",
              "supplier",
              "customer",
              "other"
            ],
            "description": "Contact category/type"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the contact (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the contact (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "externalcontactsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/externalcontacts"
            }
          }
        }
      },
      "externalcontactsPagination": {
        "title": "externalcontacts pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/externalcontactsList"
          }
        }
      },
      "lessons": {
        "type": "object",
        "required": [
          "originLanguage",
          "contentRef",
          "title",
          "questions",
          "neededScore"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "originLanguage": {
            "type": "string",
            "description": "Language code for original lesson content"
          },
          "translators": {
            "type": "array",
            "description": "Translation history for lesson content",
            "readOnly": true,
            "items": {
              "type": "object",
              "properties": {
                "lang": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time"
                },
                "createdBy": {
                  "type": "string",
                  "format": "objectId"
                }
              }
            }
          },
          "contentRef": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to training content this lesson belongs to"
          },
          "title": {
            "type": "object",
            "description": "Multi-language lesson title (e.g., {\"en\": \"Quiz 1\", \"nl\": \"Quiz 1\"})"
          },
          "description": {
            "type": "object",
            "description": "Multi-language lesson description/instructions"
          },
          "questions": {
            "type": "object",
            "description": "Multi-language question data structure with questions, answers, and scoring"
          },
          "neededScore": {
            "type": "number",
            "description": "Minimum score required to pass the lesson",
            "minimum": 0
          },
          "maxScore": {
            "type": "number",
            "description": "Maximum possible score for the lesson (auto-calculated)",
            "readOnly": true
          },
          "passedMessage": {
            "type": "object",
            "description": "Multi-language success message shown when user passes"
          },
          "failedMessage": {
            "type": "object",
            "description": "Multi-language failure message shown when user fails"
          },
          "order": {
            "type": "integer",
            "description": "Display order within the training"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the lesson (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the lesson (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "lessonsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/lessons"
            }
          }
        }
      },
      "lessonsPagination": {
        "title": "lessons pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/lessonsList"
          }
        }
      },
      "lessonsubmissions": {
        "type": "object",
        "required": [
          "lessonRef",
          "answers"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "lessonRef": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to the lesson being attempted"
          },
          "userId": {
            "type": "string",
            "format": "objectId",
            "description": "User who submitted the lesson (auto-populated from authenticated user)",
            "readOnly": true
          },
          "orgunitsOfCreator": {
            "type": "array",
            "description": "User's organization units at time of submission (for reporting)",
            "readOnly": true,
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "passed",
              "failed"
            ],
            "description": "Submission status (auto-calculated based on score)",
            "readOnly": true
          },
          "answers": {
            "type": "array",
            "description": "User answers to lesson questions",
            "items": {
              "type": "object",
              "properties": {
                "ffId": {
                  "type": "string",
                  "description": "Lesson question field identifier"
                },
                "element": {
                  "type": "string",
                  "enum": [
                    "LessonQuestion"
                  ],
                  "description": "Answer discriminator for lesson question values"
                },
                "value": {
                  "type": "object",
                  "required": [
                    "key",
                    "value"
                  ],
                  "description": "Submitted option payload copied from the lesson question option list. `key` is the canonical option identifier, `value` is the option score, and `text` is optional display metadata.",
                  "properties": {
                    "value": {
                      "type": "number",
                      "description": "Option score value as defined on the lesson. The service cross-checks this value against the lesson option matched by `key`."
                    },
                    "text": {
                      "type": "object",
                      "description": "Optional translated label of the selected option for client display. This field is ignored for server-side validation and scoring."
                    },
                    "key": {
                      "type": "string",
                      "description": "Stable option key required for validating the selected answer"
                    }
                  }
                }
              }
            }
          },
          "currentScore": {
            "type": "number",
            "description": "Points scored by user (auto-calculated)",
            "readOnly": true
          },
          "maxScore": {
            "type": "number",
            "description": "Maximum possible score for the lesson (auto-populated)",
            "readOnly": true
          },
          "attemptNumber": {
            "type": "integer",
            "description": "Which attempt this is (1 for first attempt, 2 for second, etc.)",
            "readOnly": true
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the submission (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Submission timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the submission (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "lessonsubmissionsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/lessonsubmissions"
            }
          }
        }
      },
      "lessonsubmissionsPagination": {
        "title": "lessonsubmissions pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/lessonsubmissionsList"
          }
        }
      },
      "themes": {
        "type": "object",
        "required": [
          "name",
          "themeData"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Theme name (e.g., \"Corporate Blue\", \"Dark Mode\")"
          },
          "themeData": {
            "type": "object",
            "description": "Theme configuration data including colors, fonts, logos, and styling",
            "properties": {
              "primaryColor": {
                "type": "string",
                "description": "Primary brand color (hex)"
              },
              "secondaryColor": {
                "type": "string",
                "description": "Secondary color (hex)"
              },
              "backgroundColor": {
                "type": "string",
                "description": "Background color (hex)"
              },
              "textColor": {
                "type": "string",
                "description": "Text color (hex)"
              },
              "logo": {
                "type": "string",
                "description": "S3 path to logo image"
              },
              "favicon": {
                "type": "string",
                "description": "S3 path to favicon"
              },
              "fontFamily": {
                "type": "string",
                "description": "Font family name"
              },
              "customCSS": {
                "type": "string",
                "description": "Additional custom CSS"
              }
            }
          },
          "default": {
            "type": "boolean",
            "description": "Whether this is the default theme (only one can be default)",
            "default": false
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the theme (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the theme (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "themesList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/themes"
            }
          }
        }
      },
      "themesPagination": {
        "title": "themes pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/themesList"
          }
        }
      },
      "maintenance": {
        "type": "object",
        "required": [
          "maintenance"
        ],
        "properties": {
          "maintenance": {
            "type": "boolean",
            "description": "Maintenance mode flag (true=maintenance on, false=maintenance off)"
          },
          "message": {
            "type": "object",
            "description": "Multi-language maintenance message to display to users"
          },
          "scheduledStart": {
            "type": "string",
            "format": "date-time",
            "description": "Scheduled maintenance start time"
          },
          "scheduledEnd": {
            "type": "string",
            "format": "date-time",
            "description": "Scheduled maintenance end time"
          },
          "allowedUsers": {
            "type": "array",
            "description": "User IDs allowed to access during maintenance (e.g., admins)",
            "items": {
              "type": "string",
              "format": "objectId"
            }
          }
        }
      },
      "maintenanceList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/maintenance"
            }
          }
        }
      },
      "trainingprogress": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "contentsRef": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to training content",
            "readOnly": true
          },
          "userRef": {
            "type": "string",
            "format": "objectId",
            "description": "User taking the training",
            "readOnly": true
          },
          "orgunitsOfCreator": {
            "type": "array",
            "description": "User's organization units (for reporting and filtering)",
            "readOnly": true,
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "completed": {
            "type": "boolean",
            "description": "Whether user has completed all required lessons",
            "readOnly": true
          },
          "totalLessons": {
            "type": "integer",
            "description": "Total number of lessons in the training",
            "readOnly": true
          },
          "passedLessons": {
            "type": "integer",
            "description": "Number of lessons user has passed",
            "readOnly": true
          },
          "completedLessons": {
            "type": "array",
            "description": "IDs of lessons completed by user",
            "readOnly": true,
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "completedAt": {
            "type": "string",
            "format": "date-time",
            "description": "When user completed all lessons (null if incomplete)",
            "readOnly": true
          },
          "progressPercentage": {
            "type": "number",
            "description": "Completion percentage (0-100)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "When user started the training (auto-generated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last progress update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "trainingprogressList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/trainingprogress"
            }
          }
        }
      },
      "videos": {
        "type": "object",
        "required": [
          "storageId",
          "type"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "refId": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to parent entity (content, task, lesson, etc.)"
          },
          "lang": {
            "type": "string",
            "description": "Language code for the video content"
          },
          "type": {
            "type": "string",
            "enum": [
              "contents",
              "flowtemplates",
              "tasktemplates",
              "lessons"
            ],
            "description": "Type of parent entity. Options: contents,flowtemplates,tasktemplates,lessons"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "new",
              "done"
            ],
            "description": "Processing status (auto-updated by system). Options: draft,new,done",
            "readOnly": true
          },
          "storageId": {
            "type": "string",
            "description": "Unique S3 storage identifier (generated by frontend during upload)"
          },
          "fileType": {
            "type": "string",
            "description": "MIME type of the video file (e.g., \"video/mp4\", \"video/webm\")"
          },
          "fileName": {
            "type": "string",
            "description": "Original file name"
          },
          "duration": {
            "type": "number",
            "description": "Video duration in seconds (populated after processing)"
          },
          "thumbnail": {
            "type": "string",
            "description": "S3 path to generated thumbnail image"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who uploaded the video (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Upload timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the video (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "videosList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/videos"
            }
          }
        }
      },
      "videosPagination": {
        "title": "videos pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/videosList"
          }
        }
      },
      "automaticflows": {
        "type": "object",
        "required": [
          "name"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "name": {
            "type": "string",
            "description": "Flow name (single language, no translations)"
          },
          "description": {
            "type": "string",
            "description": "Flow description explaining its purpose"
          },
          "active": {
            "type": "boolean",
            "description": "Whether flow is currently active and will execute",
            "default": true
          },
          "orderOfTemplates": {
            "type": "array",
            "description": "Template IDs in execution order (update on every change for proper sequencing)",
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "trigger": {
            "type": "object",
            "description": "Flow trigger configuration (event-based, scheduled, manual)",
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "event",
                  "schedule",
                  "manual"
                ],
                "description": "Trigger type"
              },
              "eventType": {
                "type": "string",
                "description": "Event type that triggers flow (for event-based triggers)"
              },
              "schedule": {
                "type": "string",
                "description": "Cron expression for scheduled triggers"
              }
            }
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the flow (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the flow (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "automaticflowsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/automaticflows"
            }
          }
        }
      },
      "automaticflowsPagination": {
        "title": "automaticflows pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/automaticflowsList"
          }
        }
      },
      "flowtemplates": {
        "type": "object",
        "required": [
          "template",
          "interval",
          "flowRef"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "orgchartSelection": {
            "type": "object",
            "description": "Organization chart targeting for selecting users",
            "properties": {
              "include": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "objectId"
                },
                "description": "Organization units to include"
              },
              "exclude": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "objectId"
                },
                "description": "Organization units to exclude"
              }
            }
          },
          "orgchartAttrSelection": {
            "type": "object",
            "description": "Organization attribute filters (AND/OR logic)",
            "properties": {
              "include": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "objectId"
                  }
                },
                "description": "Attribute filters to include"
              },
              "exclude": {
                "type": "array",
                "items": {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "format": "objectId"
                  }
                },
                "description": "Attribute filters to exclude"
              }
            }
          },
          "groups": {
            "type": "object",
            "description": "Group targeting configuration",
            "properties": {
              "exclude": {
                "type": "boolean",
                "description": "If true, excludes selected groups; if false, includes only selected groups"
              },
              "selection": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "objectId"
                },
                "description": "Group IDs"
              }
            }
          },
          "template": {
            "type": "object",
            "description": "Content/task template configuration (follows same structure as contents service)",
            "properties": {
              "originLanguage": {
                "type": "string",
                "description": "Language in which content was created. Used as default translation"
              },
              "translators": {
                "type": "array",
                "description": "Array of translators (users) that worked on content",
                "items": {
                  "type": "object",
                  "properties": {
                    "lang": {
                      "type": "string"
                    },
                    "createdAt": {
                      "type": "string"
                    },
                    "createdBy": {
                      "type": "string"
                    }
                  }
                }
              },
              "title": {
                "type": "object",
                "description": "At least provide title for originLanguage e.g. {\"en\": \"English Title\"}, possible to other langages as well"
              },
              "message": {
                "type": "object",
                "description": "At least provide message for originLanguage e.g. {\"en\": \"English Message\"}, possible to other langages as well"
              },
              "private": {
                "type": "boolean",
                "description": "Indicate that content is private and that it needs to be addressed to you in order to access it"
              },
              "contentPool": {
                "type": "string",
                "description": "Content pools where message belongs to"
              },
              "contentType": {
                "type": "string",
                "description": "Type of content. Supported values include news, form, manual, event, faq, training, and externalNotificationContent. Use externalNotificationContent for custom external push flows where notification title is the content creator full name and notification body is the content title."
              },
              "onlineDate": {
                "type": "string",
                "description": "Date when content goes live"
              },
              "offlineDate": {
                "type": "string",
                "description": "Date when content goes offline"
              },
              "sendPushNotification": {
                "type": "boolean",
                "description": "Enable sending push notifications for this content"
              },
              "images": {
                "type": "object",
                "description": "At least provide images for originLanguage e.g. {\"en\": [\"local/path/x/y/z\"]}, possible to other langages as well"
              },
              "videos": {
                "type": "array",
                "description": "Array of video references as ObjectIds",
                "items": {
                  "type": "string"
                }
              },
              "embeddedVideos": {
                "type": "array",
                "description": "Array of embeddedVideos",
                "items": {
                  "type": "object",
                  "properties": {
                    "lang": {
                      "type": "string"
                    },
                    "type": {
                      "type": "string"
                    },
                    "url": {
                      "type": "string"
                    }
                  }
                }
              },
              "videoProcessing": {
                "type": "boolean",
                "description": "Indicate that Video attach to this record is still in processing"
              },
              "attachments": {
                "type": "object",
                "description": "At least provide attachments for originLanguage e.g. {\"en\": []}, possible to other langages as well"
              },
              "tags": {
                "type": "array",
                "description": "Array of tags, assign by content",
                "items": {
                  "type": "object",
                  "properties": {
                    "_id": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    }
                  }
                }
              },
              "relatedTags": {
                "type": "array",
                "description": "Array of tags related to this content, used for Event to pull taged content to the page, in order to submit new relevant tag, just provide new object without _id e.g. {text:TagName}",
                "items": {
                  "type": "object",
                  "properties": {
                    "_id": {
                      "type": "string"
                    },
                    "text": {
                      "type": "string"
                    }
                  }
                }
              },
              "mentions": {
                "type": "array",
                "description": "Array of yours that are mentioned using @ in message section of contents",
                "items": {
                  "type": "string"
                }
              },
              "social": {
                "type": "object",
                "description": "Social data",
                "properties": {
                  "reactionsEnabled": {
                    "type": "boolean",
                    "description": "Enable reactions on this message"
                  },
                  "commentsEnabled": {
                    "type": "boolean",
                    "description": "Enable comments on this message"
                  },
                  "reactionCounts": {
                    "type": "object",
                    "description": "Count per reaction on content (Managed by server and can not be changed from client)"
                  },
                  "commentCount": {
                    "type": "integer",
                    "description": "Number of L1 comments on content (Managed by server and can not be changed from client)"
                  },
                  "comments": {
                    "type": "array",
                    "description": "List of L1 comments on content (Managed by server and can not be changed from client)",
                    "items": {
                      "type": "object"
                    }
                  }
                }
              },
              "viewsCount": {
                "type": "integer",
                "description": "Number of views on content (Managed by server and can not be changed from client)"
              },
              "originalReach": {
                "type": "integer",
                "description": "Original reach number when content was created (Unchangable)"
              },
              "poll": {
                "type": "object",
                "description": "Poll data",
                "properties": {
                  "options": {
                    "type": "array",
                    "description": "Poll options",
                    "items": {
                      "type": "object",
                      "description": "Poll option",
                      "properties": {
                        "optId": {
                          "type": "string"
                        },
                        "index": {
                          "type": "integer"
                        },
                        "text": {
                          "type": "string"
                        },
                        "image": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              },
              "form": {
                "type": "object",
                "description": "Form related data",
                "properties": {
                  "active": {
                    "type": "boolean",
                    "description": "Flag that marks if form is active or not"
                  },
                  "confidential": {
                    "type": "boolean",
                    "description": "Flag that marks if form is confidential"
                  },
                  "confidants": {
                    "type": "array",
                    "description": "List of confidants, only confidants can access form results if form is confidental",
                    "items": {
                      "type": "string"
                    }
                  },
                  "emails": {
                    "type": "array",
                    "description": "Array of emails to send this form to",
                    "items": {
                      "type": "string"
                    }
                  },
                  "hookurls": {
                    "type": "array",
                    "description": "Form-content webhooks for form submission/delete events. This is a dedicated abstraction on the form model and remains separate from top-level content hookurls.",
                    "items": {
                      "type": "object",
                      "properties": {
                        "url": {
                          "type": "string",
                          "format": "uri",
                          "description": "Webhook endpoint URL"
                        },
                        "active": {
                          "type": "boolean",
                          "description": "Whether this webhook is currently active",
                          "default": true
                        }
                      },
                      "required": [
                        "url"
                      ]
                    },
                    "example": [
                      {
                        "url": "https://example.com/hook1",
                        "active": true
                      },
                      {
                        "url": "https://example.com/hook2",
                        "active": false
                      }
                    ]
                  },
                  "fields": {
                    "type": "array",
                    "description": "Form fields",
                    "items": {
                      "type": "object",
                      "description": "Form field"
                    }
                  }
                }
              },
              "hookurls": {
                "type": "array",
                "description": "Content webhooks. Used for workflow content approval/rejection callbacks; each callback sends `_id`, `approvedBy`, and `createdBy` in `data`.",
                "items": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "description": "Webhook endpoint URL"
                    },
                    "active": {
                      "type": "boolean",
                      "description": "Whether this webhook is currently active",
                      "default": true
                    }
                  },
                  "required": [
                    "url"
                  ]
                },
                "example": [
                  {
                    "url": "https://example.com/content-webhook",
                    "active": true
                  }
                ]
              },
              "folder": {
                "type": "string",
                "description": "Id of folder to which this content may belong to -> applicable only for manuals and faq content types"
              },
              "event": {
                "type": "object",
                "description": "Event related data",
                "properties": {
                  "startDate": {
                    "type": "string",
                    "description": "Date when event is about to start"
                  },
                  "endDate": {
                    "type": "string",
                    "description": "Date when event is about to end"
                  },
                  "widgets": {
                    "type": "array",
                    "description": "What mini widgets should be shown on event detail page",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              },
              "approval": {
                "type": "object",
                "description": "Approval Flow related data",
                "properties": {
                  "status": {
                    "type": "string",
                    "description": "Status of approval"
                  },
                  "reviewedAt": {
                    "type": "string",
                    "description": "Field populated by system, timestamp of review"
                  },
                  "reviewedBy": {
                    "type": "string",
                    "description": "Field populated by system, reference to user who did review of content (approved or rejected)"
                  }
                }
              },
              "training": {
                "type": "object",
                "description": "Training related data",
                "properties": {
                  "lessons": {
                    "type": "array",
                    "description": "List of lessons for this tnings",
                    "items": {
                      "type": "string"
                    }
                  },
                  "ownCompleted": {
                    "type": "array",
                    "description": "Populated by backend, no need to send it, list of lessons that current user has completed",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "interval": {
            "type": "object",
            "description": "Timing configuration for when content/tasks should be generated",
            "required": [
              "direction",
              "period",
              "offset",
              "dateType"
            ],
            "properties": {
              "direction": {
                "type": "string",
                "enum": [
                  "before",
                  "after"
                ],
                "description": "Whether to generate before or after the reference date"
              },
              "period": {
                "type": "string",
                "enum": [
                  "day",
                  "week",
                  "month",
                  "year"
                ],
                "description": "Time period unit for offset"
              },
              "offset": {
                "type": "integer",
                "description": "Number of period units for offset"
              },
              "dateType": {
                "type": "string",
                "enum": [
                  "dateOfBirth",
                  "contractStartDate",
                  "customDate"
                ],
                "description": "Reference date type for calculating generation time"
              }
            }
          },
          "visibleFor": {
            "type": "string",
            "enum": [
              "all",
              "sameOrgUnit",
              "user"
            ],
            "description": "How targeting (selected users) is transferred to addressing (content visibility). \"all\" = visible to all targeted users, \"sameOrgUnit\" = visible only within same org unit, \"user\" = visible only to specific user"
          },
          "active": {
            "type": "boolean",
            "description": "If false, template will be skipped by cron job",
            "default": true
          },
          "flowRef": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to automatic flow this template belongs to"
          },
          "order": {
            "type": "integer",
            "description": "Execution order within the flow"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the template (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the template (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "flowtemplatesList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/flowtemplates"
            }
          }
        }
      },
      "flowtemplatesPagination": {
        "title": "flowtemplates pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/flowtemplatesList"
          }
        }
      },
      "translationservice": {
        "type": "object",
        "required": [
          "entityType",
          "entityId",
          "language",
          "translations"
        ],
        "properties": {
          "entityType": {
            "type": "string",
            "enum": [
              "contents",
              "tasks",
              "tasktemplates",
              "groups",
              "folders",
              "contentpools",
              "orgattributes",
              "orgattributecategories",
              "lessons"
            ],
            "description": "Type of entity being translated"
          },
          "entityId": {
            "type": "string",
            "format": "objectId",
            "description": "ID of the entity to translate"
          },
          "language": {
            "type": "string",
            "description": "Language code for the translation (e.g., \"en\", \"nl\", \"de\")"
          },
          "translations": {
            "type": "object",
            "description": "Translation data with field names as keys and translated text as values",
            "properties": {
              "title": {
                "type": "string",
                "description": "Translated title"
              },
              "message": {
                "type": "string",
                "description": "Translated message/content"
              },
              "description": {
                "type": "string",
                "description": "Translated description"
              },
              "name": {
                "type": "string",
                "description": "Translated name"
              }
            }
          }
        }
      },
      "translationserviceList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/translationservice"
            }
          }
        }
      },
      "feed": {
        "type": "string",
        "description": "RSS 2.0 XML formatted feed containing news content with title, description, link, pubDate, and other standard RSS elements"
      },
      "feedList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/feed"
            }
          }
        }
      },
      "feedPagination": {
        "title": "feed pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/feedList"
          }
        }
      },
      "eventattendees": {
        "type": "object",
        "required": [
          "contentRef",
          "status"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "contentRef": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to event content"
          },
          "status": {
            "type": "string",
            "enum": [
              "going",
              "notgoing",
              "maybe"
            ],
            "description": "Attendance status. Options: going, notgoing, maybe"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the RSVP (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "RSVP timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the RSVP (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "eventattendeesList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/eventattendees"
            }
          }
        }
      },
      "eventattendeesPagination": {
        "title": "eventattendees pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/eventattendeesList"
          }
        }
      },
      "systemtasks": {
        "type": "object",
        "required": [
          "title",
          "query",
          "resultType"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "title": {
            "type": "string",
            "description": "System task display title (e.g., \"Translation Requests\", \"Pending Approvals\")"
          },
          "query": {
            "type": "string",
            "description": "MongoDB aggregation query (as JSON string) to find items requiring action. Must return minimum fields: _id, title, originLanguage, translationRequest, contentPool. Special value \"REPLACE_DATE\" is replaced with date 7 days ago for dynamic date filtering. Example: {\"$match\": {\"translationRequest.status\": \"pending\", \"updatedAt\": {\"$gte\": \"REPLACE_DATE\"}}}"
          },
          "resultType": {
            "type": "string",
            "enum": [
              "contents",
              "tasks",
              "users",
              "formvalues"
            ],
            "description": "Type of items returned by the query (determines which collection to query)"
          },
          "groups": {
            "type": "array",
            "description": "Group IDs that will receive this system task",
            "items": {
              "type": "string",
              "format": "objectId"
            }
          },
          "orgchartSelection": {
            "type": "object",
            "description": "Organization chart targeting for task recipients",
            "properties": {
              "include": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "objectId"
                }
              },
              "exclude": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "objectId"
                }
              }
            }
          },
          "active": {
            "type": "boolean",
            "description": "Whether system task is currently active and executing",
            "default": true
          },
          "schedule": {
            "type": "string",
            "description": "Cron expression for task execution schedule (e.g., \"0 9 * * *\" for daily at 9 AM)"
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the system task (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the system task (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "systemtasksList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/systemtasks"
            }
          }
        }
      },
      "systemtasksPagination": {
        "title": "systemtasks pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/systemtasksList"
          }
        }
      },
      "keymetrics": {
        "type": "object",
        "properties": {
          "userResults": {
            "type": "object",
            "description": "Key metrics regarding users",
            "properties": {
              "activeUsers": {
                "type": "number",
                "description": "Active users, all users with active flag"
              },
              "activeUsersWithFirstLogin": {
                "type": "number",
                "description": "Active users that logged into system at least once"
              },
              "inactiveUsers": {
                "type": "number",
                "description": "Inactive users, all users with active flag set to false"
              },
              "activeWithActivityInLast30Days": {
                "type": "number",
                "description": "Active users with last activity in past 30 days"
              },
              "acountTypes": {
                "type": "object",
                "description": "Key metrics regarding account types",
                "properties": {
                  "personal": {
                    "type": "number",
                    "description": "Personal account type"
                  },
                  "group": {
                    "type": "number",
                    "description": "Group account type"
                  },
                  "keephub": {
                    "type": "number",
                    "description": "Keephub account type"
                  },
                  "none": {
                    "type": "number",
                    "description": "No account type set"
                  }
                }
              }
            }
          },
          "orgChartNodes": {
            "type": "number",
            "description": "Number of org chart nodes"
          },
          "orgChartLevels": {
            "type": "number",
            "description": "Number of org chart levels"
          },
          "languages": {
            "type": "number",
            "description": "Number of languages"
          },
          "userRoles": {
            "type": "number",
            "description": "Number of user roles"
          },
          "orgAttributesCategories": {
            "type": "number",
            "description": "Number of org attributes categories"
          },
          "userGroups": {
            "type": "number",
            "description": "Number of user groups"
          },
          "contentPools": {
            "type": "number",
            "description": "Number of content pools"
          },
          "themes": {
            "type": "number",
            "description": "Number of themes"
          },
          "automaticFlows": {
            "type": "number",
            "description": "Number of content flows"
          },
          "contentFlowTemplates": {
            "type": "number",
            "description": "Number of content flow templates"
          },
          "orgAttributes": {
            "type": "number",
            "description": "number of org attributes"
          },
          "activePlugins": {
            "type": "number",
            "description": "Number of active plugins"
          }
        }
      },
      "keymetricsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/keymetrics"
            }
          }
        }
      },
      "keymetricsPagination": {
        "title": "keymetrics pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/keymetricsList"
          }
        }
      },
      "healthcheck": {
        "type": "object",
        "properties": {
          "redisStatus": {
            "type": "string",
            "enum": [
              "ready",
              "dead",
              "disabled"
            ],
            "description": "Redis cache status (ready=operational, dead=down, disabled=not configured)"
          },
          "dbStatus": {
            "type": "string",
            "enum": [
              "up",
              "down"
            ],
            "description": "MongoDB database status"
          },
          "version": {
            "type": "string",
            "description": "Application version"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "Health check timestamp"
          },
          "uptime": {
            "type": "number",
            "description": "Application uptime in seconds"
          }
        }
      },
      "healthcheckList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/healthcheck"
            }
          }
        }
      },
      "sentimentanalysis": {
        "type": "object",
        "properties": {
          "text": {
            "type": "string",
            "description": "Text that will be analyzed"
          },
          "originLanguage": {
            "type": "string",
            "description": "Language of supplied text"
          }
        }
      },
      "sentimentanalysisList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/sentimentanalysis"
            }
          }
        }
      },
      "contentsview": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Content ID",
            "readOnly": true
          },
          "title": {
            "type": "object",
            "description": "Multi-language content title",
            "readOnly": true
          },
          "message": {
            "type": "object",
            "description": "Multi-language content message",
            "readOnly": true
          },
          "contentType": {
            "type": "string",
            "description": "Type of content",
            "readOnly": true
          },
          "webhookStatus": {
            "type": "string",
            "enum": [
              "active",
              "inactive",
              "none"
            ],
            "description": "Derived form webhook status. Returns `active` when at least one form hook URL is enabled, `inactive` when only disabled form hook URLs exist, and `none` for non-form content or forms without hook URLs.",
            "readOnly": true
          },
          "contentPool": {
            "type": "object",
            "description": "Denormalized content pool data",
            "readOnly": true
          },
          "onlineDate": {
            "type": "string",
            "format": "date-time",
            "description": "When content goes live",
            "readOnly": true
          },
          "offlineDate": {
            "type": "string",
            "format": "date-time",
            "description": "When content goes offline",
            "readOnly": true
          },
          "createdBy": {
            "type": "object",
            "description": "Denormalized creator user data",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp",
            "readOnly": true
          }
        }
      },
      "contentsviewList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/contentsview"
            }
          }
        }
      },
      "contentsviewPagination": {
        "title": "contentsview pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/contentsviewList"
          }
        }
      },
      "pages": {
        "type": "object",
        "required": [
          "pages"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "pages": {
            "type": "array",
            "description": "Array of pages in navigation structure",
            "items": {
              "type": "object",
              "properties": {
                "_id": {
                  "type": "string",
                  "format": "objectId"
                },
                "orderIndex": {
                  "type": "integer",
                  "description": "Display order (lower numbers first)"
                },
                "originLanguage": {
                  "type": "string",
                  "description": "Original language for page title"
                },
                "translators": {
                  "type": "array",
                  "description": "Translation history",
                  "readOnly": true
                },
                "title": {
                  "type": "object",
                  "description": "Multi-language page title"
                },
                "mobile": {
                  "type": "boolean",
                  "description": "Available on mobile devices"
                },
                "desktop": {
                  "type": "boolean",
                  "description": "Available on desktop"
                },
                "permaUrl": {
                  "type": "string",
                  "description": "Permalink slug for the page"
                },
                "openOn": {
                  "type": "string",
                  "enum": [
                    "newtab",
                    "iframe",
                    "internal"
                  ],
                  "description": "How to open external pages"
                },
                "icon": {
                  "type": "string",
                  "description": "Icon identifier (UTF8 or icon class)"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "dashboard",
                    "external",
                    "contentpool",
                    "custom"
                  ],
                  "description": "Page type"
                },
                "externalUrl": {
                  "type": "string",
                  "description": "External URL (for type=\"external\")"
                },
                "orgchartSelection": {
                  "type": "object",
                  "description": "Organization chart targeting"
                },
                "orgchartAttrSelection": {
                  "type": "object",
                  "description": "Organization attribute filters (include/exclude with AND/OR logic)",
                  "properties": {
                    "include": {
                      "type": "array",
                      "description": "Inclusion filters (nested arrays for AND/OR logic)",
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "objectId"
                        }
                      }
                    },
                    "exclude": {
                      "type": "array",
                      "description": "Exclusion filters (nested arrays for AND/OR logic)",
                      "items": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "format": "objectId"
                        }
                      }
                    }
                  }
                },
                "orgunits": {
                  "type": "array",
                  "description": "Calculated organization units (auto-generated)",
                  "readOnly": true,
                  "items": {
                    "type": "string",
                    "format": "objectId"
                  }
                },
                "groups": {
                  "type": "object",
                  "description": "Group targeting configuration"
                }
              }
            }
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created configuration (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated configuration (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "pagesList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/pages"
            }
          }
        }
      },
      "widgets": {
        "type": "object",
        "required": [
          "pages"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "relatedTags": {
            "type": "array",
            "description": "Optional tag filters on the widget itself. Requests may send tag ids or objects with a `text` field; stored results return populated tag references.",
            "items": {
              "anyOf": [
                {
                  "type": "string",
                  "format": "objectId"
                },
                {
                  "type": "object",
                  "required": [
                    "text"
                  ],
                  "additionalProperties": false,
                  "properties": {
                    "text": {
                      "type": "string"
                    }
                  }
                },
                {
                  "type": "object",
                  "properties": {
                    "_id": {
                      "type": "string",
                      "format": "objectId",
                      "readOnly": true
                    },
                    "text": {
                      "type": "string",
                      "readOnly": true
                    },
                    "type": {
                      "type": "string",
                      "readOnly": true
                    },
                    "useCount": {
                      "type": "integer",
                      "readOnly": true
                    }
                  }
                }
              ]
            }
          },
          "pages": {
            "type": "array",
            "description": "Array of pages/widgets in navigation",
            "items": {
              "type": "object",
              "properties": {
                "_id": {
                  "type": "string",
                  "format": "objectId"
                },
                "orderIndex": {
                  "type": "integer",
                  "description": "Display order (lower numbers first)"
                },
                "originLanguage": {
                  "type": "string",
                  "description": "Original language for page title"
                },
                "translators": {
                  "type": "array",
                  "description": "Translation history",
                  "readOnly": true
                },
                "title": {
                  "type": "object",
                  "description": "Multi-language page title"
                },
                "mobile": {
                  "type": "boolean",
                  "description": "Available on mobile devices"
                },
                "desktop": {
                  "type": "boolean",
                  "description": "Available on desktop"
                },
                "permaUrl": {
                  "type": "string",
                  "description": "Permalink slug for the page"
                },
                "openOn": {
                  "type": "string",
                  "enum": [
                    "newtab",
                    "iframe",
                    "internal"
                  ],
                  "description": "How to open external pages"
                },
                "icon": {
                  "type": "string",
                  "description": "Icon identifier (UTF8 or icon class)"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "dashboard",
                    "external",
                    "contentpool",
                    "custom"
                  ],
                  "description": "Page type"
                },
                "externalUrl": {
                  "type": "string",
                  "description": "External URL (for type=\"external\")"
                },
                "orgchartSelection": {
                  "type": "object",
                  "description": "Organization chart targeting"
                },
                "orgchartAttrSelection": {
                  "type": "object",
                  "description": "Organization attribute filters"
                },
                "orgunits": {
                  "type": "array",
                  "description": "Calculated organization units (auto-generated)",
                  "readOnly": true,
                  "items": {
                    "type": "string",
                    "format": "objectId"
                  }
                },
                "groups": {
                  "type": "object",
                  "description": "Group targeting configuration"
                },
                "widgets": {
                  "type": "array",
                  "description": "Dashboard widgets for this page",
                  "items": {
                    "type": "object"
                  }
                }
              }
            }
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created configuration (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated configuration (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "widgetsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/widgets"
            }
          }
        }
      },
      "welcomewidget": {
        "type": "object",
        "required": [
          "widgetType"
        ],
        "properties": {
          "widgetType": {
            "type": "string",
            "enum": [
              "welcomewidget"
            ],
            "description": "Widget type identifier (must be \"welcomewidget\")",
            "example": "welcomewidget"
          },
          "unseen": {
            "type": "boolean",
            "description": "Filter for unseen content only",
            "default": true,
            "example": true
          },
          "skip": {
            "type": "integer",
            "description": "Number of items to skip for pagination",
            "minimum": 0,
            "default": 0,
            "example": 0
          },
          "limit": {
            "type": "integer",
            "description": "Maximum number of items to retrieve",
            "minimum": 1,
            "maximum": 100,
            "default": 10,
            "example": 10
          },
          "contentTypes": {
            "type": "array",
            "description": "Filter by specific content types",
            "items": {
              "type": "string",
              "enum": [
                "news",
                "event",
                "poll",
                "task",
                "manual",
                "faq"
              ]
            }
          }
        }
      },
      "welcomewidgetList": {
        "type": "object",
        "description": "Welcome widget response",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total number of unseen content items"
          },
          "limit": {
            "type": "integer",
            "description": "Applied page size"
          },
          "skip": {
            "type": "integer",
            "description": "Applied result offset"
          },
          "data": {
            "type": "array",
            "description": "List of unseen content",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "download": {
        "type": "object",
        "required": [
          "path",
          "title"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "path": {
            "type": "string",
            "description": "Unique URL path for this download page (e.g., \"/app-download\")"
          },
          "title": {
            "type": "object",
            "description": "Multi-language page title"
          },
          "faq": {
            "type": "object",
            "description": "Multi-language FAQ content for download page"
          },
          "originLanguage": {
            "type": "string",
            "description": "Original language for page content"
          },
          "translators": {
            "type": "array",
            "description": "Translation history",
            "readOnly": true,
            "items": {
              "type": "object",
              "properties": {
                "lang": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string"
                },
                "createdBy": {
                  "type": "string"
                }
              }
            }
          },
          "downloadPageUrl": {
            "type": "string",
            "format": "uri",
            "description": "Public URL for this download page (immutable once set)"
          },
          "iosUrl": {
            "type": "string",
            "format": "uri",
            "description": "App Store link for iOS app"
          },
          "androidUrl": {
            "type": "string",
            "format": "uri",
            "description": "Google Play link for Android app"
          },
          "desktopUrl": {
            "type": "string",
            "format": "uri",
            "description": "Download link for desktop application"
          },
          "textTop": {
            "type": "object",
            "description": "Multi-language header text"
          },
          "textBottom": {
            "type": "object",
            "description": "Multi-language footer text"
          },
          "clientLogo": {
            "type": "string",
            "description": "S3 path to client logo image"
          },
          "backgroundImage": {
            "type": "string",
            "description": "S3 path to background image"
          },
          "active": {
            "type": "boolean",
            "description": "Whether download page is currently active",
            "default": true
          },
          "createdBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who created the page (auto-populated)",
            "readOnly": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Creation timestamp (auto-generated)",
            "readOnly": true
          },
          "updatedBy": {
            "type": "string",
            "format": "objectId",
            "description": "User who last updated the page (auto-populated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Last update timestamp (auto-generated)",
            "readOnly": true
          }
        }
      },
      "downloadList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/download"
            }
          }
        }
      },
      "activitylogs": {
        "type": "object",
        "required": [
          "userId",
          "orgunits"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier for the activity log entry (auto-generated)",
            "readOnly": true
          },
          "userId": {
            "type": "string",
            "format": "objectId",
            "description": "Reference to the user who performed the activity (auto-populated from authenticated user)",
            "readOnly": true
          },
          "connectionOrigin": {
            "type": "string",
            "description": "IP address from where the activity was recorded. Extracted from `x-forwarded-for` header or defaults to 127.0.0.1 (auto-populated)",
            "readOnly": true
          },
          "orgunits": {
            "type": "array",
            "description": "Organization units the user belongs to at the time of activity (auto-populated from user context)",
            "readOnly": true,
            "items": {
              "type": "string",
              "format": "objectId",
              "description": "Organization unit ID"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the activity was logged (auto-generated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when the activity log was last updated (auto-generated)",
            "readOnly": true
          }
        }
      },
      "activitylogsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/activitylogs"
            }
          }
        }
      },
      "pushnotificationsettings": {
        "type": "object",
        "required": [
          "cid"
        ],
        "properties": {
          "type": {
            "type": "string",
            "description": "Specific types of push notifications"
          },
          "title": {
            "type": "object",
            "description": "Client specific translations overrides for push notifications"
          },
          "createdBy": {
            "type": "string",
            "description": "Field populated by system, reference to user who created translation for one of the push notifications"
          },
          "createdAt": {
            "type": "string",
            "description": "Field populated by system, timestamp of creation"
          },
          "updatedBy": {
            "type": "string",
            "description": "Field populated by system, reference to user who updated translation for one of the push notifications"
          },
          "updatedAt": {
            "type": "string",
            "description": "Field populated by system, timestamp of last update"
          }
        }
      },
      "pushnotificationsettingsList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/pushnotificationsettings"
            }
          }
        }
      },
      "pushnotificationsettingsPagination": {
        "title": "pushnotificationsettings pagination result",
        "type": "object",
        "properties": {
          "total": {
            "type": "integer"
          },
          "limit": {
            "type": "integer"
          },
          "skip": {
            "type": "integer"
          },
          "data": {
            "$ref": "#/components/schemas/pushnotificationsettingsList"
          }
        }
      },
      "audittrail": {
        "type": "object",
        "required": [
          "userId",
          "objectId",
          "objectType",
          "changeType"
        ],
        "properties": {
          "_id": {
            "type": "string",
            "format": "objectId",
            "description": "Unique identifier (auto-generated)",
            "readOnly": true
          },
          "userId": {
            "type": "string",
            "format": "objectId",
            "description": "User who performed the action",
            "example": "60c72b2f9b1d8c001c8e4f3a"
          },
          "objectId": {
            "type": "string",
            "description": "ID of the modified object (content, task, user, etc.)",
            "example": "60c72b2f9b1d8c001c8e4f3b"
          },
          "objectType": {
            "type": "string",
            "description": "Type of object modified (collection name)",
            "example": "contents"
          },
          "changeType": {
            "type": "string",
            "enum": [
              "Create",
              "Update",
              "Patch",
              "Remove"
            ],
            "description": "Type of change operation performed",
            "example": "Patch"
          },
          "changeData": {
            "description": "Change payload captured by the audit hook. Create and remove operations store a sanitized object snapshot. Patch and update operations store a datum-diff array of changed fields.",
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": true,
                "example": {
                  "template": {
                    "title": {
                      "en": "Gagi video"
                    }
                  },
                  "orgunits": [
                    "test0001",
                    "test0003"
                  ]
                }
              },
              {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "example": "E"
                    },
                    "path": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "template"
                      ]
                    },
                    "lhs": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "rhs": {
                      "type": "object",
                      "additionalProperties": true
                    }
                  }
                },
                "example": [
                  {
                    "kind": "E",
                    "path": [
                      "template"
                    ],
                    "lhs": {
                      "title": {
                        "en": "Gagi video"
                      }
                    },
                    "rhs": {
                      "title": {
                        "en": "Gagi video updated"
                      }
                    }
                  }
                ]
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when action was performed (auto-generated)",
            "readOnly": true
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "description": "Timestamp when action was performed (auto-generated)",
            "readOnly": true
          }
        }
      },
      "audittrailList": {
        "type": "object",
        "properties": {
          "total": {
            "type": "number",
            "description": "Pagination response, total number of results"
          },
          "limit": {
            "type": "number",
            "description": "Pagination response, result set is limited to"
          },
          "skip": {
            "type": "number",
            "description": "Pagination response, results skipped"
          },
          "data": {
            "type": "array",
            "description": "Actual data",
            "items": {
              "$ref": "#/components/schemas/audittrail"
            }
          }
        }
      },
      "ai-assistant": {
        "type": "object",
        "properties": {
          "questions": {
            "type": "object",
            "properties": {
              "fields": {
                "type": "array",
                "description": "Array of generated multiple-choice fields ready to be inserted into a lesson",
                "items": {
                  "$ref": "#/components/schemas/MultipleChoice"
                }
              }
            }
          }
        }
      },
      "AiMessagesResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total number of messages matching the filters",
            "example": 2
          },
          "limit": {
            "type": "integer",
            "description": "Maximum messages returned in this page",
            "example": 10
          },
          "skip": {
            "type": "integer",
            "description": "Number of messages skipped",
            "example": 0
          },
          "messages": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiMessage"
            }
          }
        }
      },
      "AiMessage": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Message document ID",
            "example": "69aed46ffa51baf432118c96"
          },
          "question": {
            "type": "string",
            "description": "The question submitted by the user",
            "example": "bad bot,"
          },
          "answer": {
            "type": "string",
            "description": "The answer returned by the AI assistant"
          },
          "reaction": {
            "type": "string",
            "enum": [
              "like",
              "dislike"
            ],
            "description": "User reaction to the answer",
            "example": "dislike"
          },
          "timestamp": {
            "type": "string",
            "format": "date-time",
            "description": "When the message was created",
            "example": "Mon, 09 Mar 2026 14:08:47 GMT"
          }
        }
      },
      "AiAnalyticsSummary": {
        "type": "object",
        "properties": {
          "totalQuestions": {
            "type": "integer",
            "description": "Total number of questions asked",
            "example": 2
          },
          "likedAnswers": {
            "type": "integer",
            "description": "Number of answers that received a like reaction",
            "example": 0
          },
          "dislikedAnswers": {
            "type": "integer",
            "description": "Number of answers that received a dislike reaction",
            "example": 2
          },
          "indexedDocuments": {
            "type": "integer",
            "description": "Number of documents currently indexed by the AI agent",
            "example": 200
          }
        }
      },
      "AiAnalyticsCategoriesResponse": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/AiAnalyticsCategory"
        }
      },
      "AiAnalyticsCategory": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "string",
            "description": "Category id",
            "example": "6869e0c3f4e7f3f4f1a1b2c3"
          },
          "name": {
            "type": "string",
            "description": "Category name",
            "example": "Store Operations"
          },
          "questionCount": {
            "type": "integer",
            "description": "Total questions in this category",
            "example": 374
          },
          "percentage": {
            "type": "number",
            "format": "float",
            "description": "Share of all questions in percent",
            "example": 52.1
          }
        }
      },
      "AiAnalyticsSubcategoriesResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total subcategories for the selected category",
            "example": 4
          },
          "skip": {
            "type": "integer",
            "description": "Pagination offset",
            "example": 0
          },
          "limit": {
            "type": "integer",
            "description": "Pagination page size",
            "example": 5
          },
          "subcategories": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiAnalyticsSubcategory"
            }
          }
        }
      },
      "AiAnalyticsSubcategory": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Subcategory name",
            "example": "Playbooks & Daily Routines"
          },
          "count": {
            "type": "integer",
            "description": "Question count in this subcategory",
            "example": 179
          }
        }
      },
      "AiAnalyticsUnansweredResponse": {
        "type": "object",
        "properties": {
          "total": {
            "type": "integer",
            "description": "Total unanswered questions for selected category",
            "example": 27
          },
          "skip": {
            "type": "integer",
            "description": "Pagination offset",
            "example": 0
          },
          "limit": {
            "type": "integer",
            "description": "Pagination page size",
            "example": 5
          },
          "unansweredTopics": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AiAnalyticsUnansweredTopic"
            }
          }
        }
      },
      "AiAnalyticsUnansweredTopic": {
        "type": "object",
        "properties": {
          "topic": {
            "type": "string",
            "description": "Detected topic/subcategory label",
            "example": "COO"
          },
          "questionAsked": {
            "type": "string",
            "description": "Original user question",
            "example": "coo"
          }
        }
      },
      "MultipleChoice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the question field"
          },
          "element": {
            "type": "string",
            "description": "Field type discriminator"
          },
          "field_name": {
            "type": "string",
            "description": "Same as id, used internally by the form engine"
          },
          "label": {
            "type": "object",
            "description": "Question text keyed by language code",
            "example": {
              "en": "What is TypeScript?"
            }
          },
          "options": {
            "type": "array",
            "description": "Answer options for the question",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "Unique key for the answer option"
                },
                "text": {
                  "type": "object",
                  "description": "Answer text keyed by language code",
                  "example": {
                    "en": "A typed superset of JavaScript"
                  }
                },
                "value": {
                  "type": "string",
                  "description": "Points awarded for this answer. Equals pointsPerAnswer for correct answer, \"0\" for incorrect",
                  "example": "10"
                },
                "showRemark": {
                  "type": "boolean",
                  "default": false
                },
                "remark": {
                  "type": "string",
                  "default": ""
                }
              }
            }
          },
          "orderIndex": {
            "type": "integer",
            "description": "Position of the question in the lesson"
          },
          "required": {
            "type": "boolean",
            "default": true
          },
          "insideSection": {
            "type": "boolean",
            "description": "Whether the question is placed inside a section. Null for top level fields, true when inside a section.",
            "example": false
          }
        }
      }
    },
    "responses": {
      "400": {
        "description": "Bad Request - Request validation failed",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "401": {
        "description": "Unauthorized - Invalid or missing authentication token",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "403": {
        "description": "Forbidden - Insufficient permissions",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "404": {
        "description": "Not Found - Resource does not exist",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      },
      "500": {
        "description": "Internal Server Error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "paths": {
    "/authentication": {
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "Successfully authenticated - returns access token and user data",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accessToken": {
                      "type": "string",
                      "description": "JWT access token for subsequent API calls"
                    },
                    "authentication": {
                      "type": "object",
                      "properties": {
                        "strategy": {
                          "type": "string",
                          "description": "Authentication strategy used"
                        },
                        "payload": {
                          "type": "object",
                          "description": "JWT payload data"
                        }
                      }
                    },
                    "user": {
                      "type": "object",
                      "description": "Authenticated user data (sensitive fields omitted)"
                    },
                    "chatSignature": {
                      "type": "string",
                      "description": "Chat service signature (if chat module enabled)"
                    },
                    "chatUserId": {
                      "type": "string",
                      "description": "Chat user ID (if chat module enabled)"
                    },
                    "pluginJWT": {
                      "type": "string",
                      "description": "JWT token for plugin integration (if configured)"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid credentials format or missing required fields"
          },
          "401": {
            "description": "Unauthorized - Invalid credentials, inactive user, or expired token"
          },
          "403": {
            "description": "Forbidden - User account is locked, deleted, or has no assigned orgunits"
          },
          "500": {
            "description": "Server error - consult server logs"
          }
        },
        "description": "Authenticate a user and receive an access token. Supports multiple strategies:\n- `local`: Email and password authentication\n- `jwt`: Verify existing JWT token\n- `magicLink`: Email-based passwordless login\n- OAuth providers: cognito, okta, azure (if configured)",
        "summary": "",
        "tags": [
          "authentication"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "strategy"
                ],
                "properties": {
                  "strategy": {
                    "type": "string",
                    "enum": [
                      "local",
                      "jwt",
                      "regeneratejwt",
                      "magicLink",
                      "cognito",
                      "okta",
                      "azure"
                    ],
                    "description": "Authentication strategy to use",
                    "default": "local"
                  },
                  "loginName": {
                    "type": "string",
                    "format": "email",
                    "description": "User email address (required for local strategy)"
                  },
                  "password": {
                    "type": "string",
                    "format": "password",
                    "description": "User password (required for local strategy)"
                  },
                  "accessToken": {
                    "type": "string",
                    "description": "JWT token to verify (required for jwt/regeneratejwt strategies)"
                  },
                  "link": {
                    "type": "string",
                    "description": "30-character link token (required for magicLink strategy)"
                  }
                },
                "example": {
                  "strategy": "local",
                  "loginName": "user@example.com",
                  "password": "password123"
                }
              }
            }
          }
        }
      }
    },
    "/authentication/{id}": {
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "Token to invalidate (must match the Bearer token in Authorization header)"
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully logged out",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accessToken": {
                      "type": "string",
                      "description": "The invalidated token"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - Invalid or expired token"
          }
        },
        "description": "Logout endpoint - invalidates the current session. **Note**: JWTs cannot be truly revoked, but this endpoint provides a standard logout mechanism. The same token used in the Authorization header must be provided as the ID parameter",
        "summary": "",
        "tags": [
          "authentication"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/tasktemplates": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for task title translation",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Search term for title (full-text search)",
            "name": "searchTerm",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Parent template ID to retrieve child templates",
            "name": "parentRef",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by task progress state. Supports ongoing/open, completed/done, overdue, late, withApproval, planned, and expired. `expired` is a query alias for overdue templates with `template.strictDueDate=true`.",
            "name": "taskState",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "ongoing",
                  "completed",
                  "open",
                  "overdue",
                  "done",
                  "late",
                  "expired",
                  "approval",
                  "withApproval",
                  "planned"
                ]
              }
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by template type",
            "name": "type",
            "schema": {
              "type": "string",
              "enum": [
                "daily",
                "weekly",
                "monthly1",
                "monthly2",
                "monthly3",
                "monthly4",
                "monthlyLast",
                "monthly",
                "yearly",
                "child",
                "single",
                "custom"
              ]
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of tasktemplates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tasktemplatesList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve task templates. Returns root templates by default, or child templates when parentRef is provided",
        "summary": "",
        "tags": [
          "tasktemplates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "tasktemplates created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tasktemplates"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new task template with targeting and scheduling. Periodic templates generate child templates automatically",
        "summary": "",
        "tags": [
          "tasktemplates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tasktemplates"
              }
            }
          }
        }
      }
    },
    "/tasktemplates/{id}": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for task title translation",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "tasktemplates retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tasktemplates"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single task template by ID with progress breakdown",
        "summary": "",
        "tags": [
          "tasktemplates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "query",
            "description": "Action to execute (pause, resume, complete, restart)",
            "name": "action",
            "schema": {
              "type": "string",
              "enum": [
                "pause",
                "resume",
                "complete",
                "restart"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Apply to single iteration or all active iterations",
            "name": "iteration",
            "schema": {
              "type": "string",
              "enum": [
                "single",
                "all"
              ]
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "tasktemplates retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tasktemplates"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Execute custom actions on task template. Supports: pause, resume, complete, restart. Use `iteration` query param to affect single or all iterations",
        "summary": "",
        "tags": [
          "tasktemplates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tasktemplates"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "query",
            "description": "Apply changes to single iteration or all active iterations",
            "name": "iteration",
            "schema": {
              "type": "string",
              "enum": [
                "single",
                "all"
              ]
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "tasktemplates retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tasktemplates"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update task template fields. Use `iteration` query param to update single or all active child templates",
        "summary": "",
        "tags": [
          "tasktemplates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tasktemplates"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "query",
            "description": "Delete single iteration or all active iterations",
            "name": "iteration",
            "schema": {
              "type": "string",
              "enum": [
                "single",
                "all"
              ]
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "tasktemplates deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tasktemplates"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete task template. Use `iteration` query param to delete single or all active child templates",
        "summary": "",
        "tags": [
          "tasktemplates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/tasktemplatesview": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for task title translation",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Search term for title (full-text search)",
            "name": "searchTerm",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Parent template ID to retrieve child templates",
            "name": "parentRef",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Management mode - returns additional statistics. **[Admin/Supervisor only]**",
            "name": "management",
            "schema": {
              "type": "boolean"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Enable detailed filter counts (overdue, open, completed, planned). Use with management=true",
            "name": "superviseFilterCounts",
            "schema": {
              "type": "boolean"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by template status",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "completed",
                "paused",
                "ongoing"
              ]
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Task templates with progress statistics retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Total number of task templates matching query"
                    },
                    "limit": {
                      "type": "integer",
                      "description": "Page size limit"
                    },
                    "skip": {
                      "type": "integer",
                      "description": "Number of results skipped"
                    },
                    "data": {
                      "type": "array",
                      "description": "Task template data with progress",
                      "items": {
                        "type": "object",
                        "properties": {
                          "_id": {
                            "type": "string",
                            "format": "objectId",
                            "description": "Task template ID"
                          },
                          "statuses": {
                            "type": "array",
                            "description": "Aggregated status values from all task instances",
                            "items": {
                              "type": "string"
                            }
                          }
                        }
                      }
                    },
                    "taskTemplateCount": {
                      "type": "object",
                      "description": "Breakdown counts (only when management=true and superviseFilterCounts=true)",
                      "properties": {
                        "isOverdueCount": {
                          "type": "integer",
                          "description": "Number of overdue templates"
                        },
                        "isCompletedCount": {
                          "type": "integer",
                          "description": "Number of completed templates"
                        },
                        "isOpenCount": {
                          "type": "integer",
                          "description": "Number of open templates"
                        },
                        "isPlannedCount": {
                          "type": "integer",
                          "description": "Number of planned (future) templates"
                        },
                        "isWithApprovalCount": {
                          "type": "integer",
                          "description": "Number of templates requiring approval"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Server error"
          }
        },
        "description": "Retrieve task templates with aggregated progress data. Supports management mode for additional statistics (overdue, planned, with approval counts)",
        "summary": "",
        "tags": [
          "tasktemplatesview"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/tasks": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for task title translation",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter tasks starting from this date/time (ISO 8601)",
            "name": "fromDateTime",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter tasks up to this date/time (ISO 8601)",
            "name": "toDateTime",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by task status",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "open",
                "rejected",
                "pendingApproval",
                "othersPendingApproval",
                "done",
                "draft"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Legacy alias for filtering by related tag IDs using a comma-separated list",
            "name": "relatedTags",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by related tag IDs using indexed query params such as `template.relatedTags[0]=<tagId>`. Can be combined with widget date, status, and `$or` filters",
            "name": "template.relatedTags",
            "schema": {
              "type": "array",
              "items": {
                "type": "string",
                "format": "objectId"
              }
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter tasks created from this template. **[Admin/Template Creator only]**",
            "name": "templateRef",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter tasks assigned to specific user. Non-admins can only filter their own tasks",
            "name": "userId",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of tasks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tasksList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve tasks assigned to the current user or created by the user (for admins/template creators). Without `templateRef`, returns all personal tasks. With `templateRef`, returns tasks created from that template (admin/creator only)",
        "summary": "",
        "tags": [
          "tasks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/tasks/{id}": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for task title translation",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "tasks retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tasks"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single task by ID. Only accessible to the assigned user or admins",
        "summary": "",
        "tags": [
          "tasks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of tasks to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "tasks retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tasks"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update task progress, answers, or status. Used to submit task completion. Submission is rejected when the due date has passed and the task or live task template enforces strictDueDate.",
        "summary": "",
        "tags": [
          "tasks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "answers": {
                    "type": "array",
                    "description": "Task form answers/responses",
                    "items": {
                      "type": "object"
                    }
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "open",
                      "rejected",
                      "pendingApproval",
                      "othersPendingApproval",
                      "done",
                      "draft"
                    ],
                    "description": "Update task status (auto-updated on submission)"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/groups": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for group name translation (e.g., \"en\", \"nl\", \"de\"). Defaults to system language",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter groups by content exclusion flag. Set to `true` for groups excluded from content targeting",
            "name": "excludeFromContent",
            "schema": {
              "type": "boolean"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of groups",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/groupsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve all groups with optional filtering. Group names are returned in the requested language (via `lang` header)",
        "summary": "",
        "tags": [
          "groups"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "groups created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/groups"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new group. `imported` defaults to `false` when omitted. Changing `imported` is allowed only for keephubAdmin and system user. System users can manually set the group ID for imported groups.",
        "summary": "",
        "tags": [
          "groups"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/groups"
              }
            }
          }
        }
      }
    },
    "/groups/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for group name translation",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "groups retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/groups"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single group by ID. Returns group with all translations",
        "summary": "",
        "tags": [
          "groups"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of groups to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "groups retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/groups"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire group record. Internal calls only. Changing `imported` is allowed only for keephubAdmin and system user. **[Internal only]**",
        "summary": "",
        "tags": [
          "groups"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/groups"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of groups to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "groups retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/groups"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Partially update group information. Changing `imported` is allowed only for keephubAdmin and system user.",
        "summary": "",
        "tags": [
          "groups"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/groups"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of groups to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "groups deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/groups"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a group. Also removes group membership from all users",
        "summary": "",
        "tags": [
          "groups"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/users": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Return count instead of user objects. Use with `countType` to specify count method",
            "name": "count",
            "schema": {
              "type": "boolean"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Type of count to perform (requires `count=true`):\n- `contentReach`: Count users that will be reached by content (filters: orgunits, groups, orgtype, attributes, firstLoginDone)\n- `orgUnitBelong`: Count users belonging directly to selected orgunit(s) based on current user zone of influence",
            "name": "countType",
            "schema": {
              "type": "string",
              "enum": [
                "contentReach",
                "orgUnitBelong"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by group ID(s). Supports comma-separated values for multiple groups",
            "name": "groups",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by organization unit ID(s). Supports comma-separated values for multiple orgunits. Automatically expands to include descendants",
            "name": "orgunits",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by organizational attributes. Supports AND/OR logic with nested arrays",
            "name": "attributes",
            "schema": {
              "type": "array"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by organization type ID",
            "name": "orgtype",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter users who have completed first login. Set to `true` for users who logged in at least once",
            "name": "firstLoginDone",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Enable management mode for admin panel access. **[Admin only]**",
            "name": "management",
            "schema": {
              "type": "boolean"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Find users within a specific orgunit. Validates permissions against searchable org units preset. Returns limited user data fields for privacy. **[Requires orgunit visibility permissions]**",
            "name": "usersInOrgUnit",
            "schema": {
              "type": "boolean"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter only active users (active=true). Used with count queries and usersInOrgUnit",
            "name": "searchForActiveUsers",
            "schema": {
              "type": "boolean"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Include deleted users in results. **[Admin only]**",
            "name": "deleted",
            "schema": {
              "type": "boolean"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Full-text search across name, email, employeeID fields",
            "name": "searchTerm",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of users",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/usersList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve users with optional filtering by groups, orgunits, attributes, and other criteria. Supports count queries and zone of influence filtering.",
        "summary": "",
        "tags": [
          "users"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "users created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/users"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new user account. Password is hashed automatically. Email verification is sent if enabled. Requires appropriate role permissions to create users with specific roles",
        "summary": "",
        "tags": [
          "users"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/users"
              }
            }
          }
        }
      }
    },
    "/users/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of users to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "users retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/users"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single user by ID. Includes populated points, impersonation permissions, and related data",
        "summary": "",
        "tags": [
          "users"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of users to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "users retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/users"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire user record. **[Internal only]** Not available via external API",
        "summary": "",
        "tags": [
          "users"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/users"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of users to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "users retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/users"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Partially update user information. Protected fields cannot be modified: points, deleted, loginMethod and imported can be changed only by keephubAdmin or system. Password is automatically hashed if provided. Role upgrades require appropriate permissions",
        "summary": "",
        "tags": [
          "users"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/users"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of users to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "users deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/users"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Soft delete a user (sets deleted=true and active=false). Cannot delete system users or keephub accounts. Clears user cache",
        "summary": "",
        "tags": [
          "users"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/contentpools": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Search content pool name by prefix in specific language (e.g., `name.en[$search]=News`)",
            "name": "name.en[$search]",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by content pool type reference",
            "name": "contentPoolType",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "header",
            "description": "Language code for content pool name translation",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of contentpools",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentpoolsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve all content pools. Supports name search across different languages",
        "summary": "",
        "tags": [
          "contentpools"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "contentpools created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentpools"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new content pool with access rights and default configurations",
        "summary": "",
        "tags": [
          "contentpools"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contentpools"
              }
            }
          }
        }
      }
    },
    "/contentpools/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for content pool name translation",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "contentpools retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentpools"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single content pool by ID",
        "summary": "",
        "tags": [
          "contentpools"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of contentpools to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "contentpools retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentpools"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire content pool configuration",
        "summary": "",
        "tags": [
          "contentpools"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contentpools"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of contentpools to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "contentpools retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentpools"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Partially update content pool configuration",
        "summary": "",
        "tags": [
          "contentpools"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contentpools"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of contentpools to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "contentpools deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentpools"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a content pool. Warning: This will affect all content in this pool",
        "summary": "",
        "tags": [
          "contentpools"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/contents": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by content pool ID(s). Supports comma-separated values for multiple pools (e.g., `poolId1,poolId2`)",
            "name": "contentPool",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by folder ID. Use `null` as string to filter content without folders",
            "name": "folder",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "When set to `true` together with `folder`, returns all content items stored in that accessible folder without applying the normal audience visibility filters for the child items. This affects `find` only and does not grant additional `get`, `patch`, or `remove` access.",
            "name": "contentsInFolder",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by content type. `externalNotificationContent` is used for custom external push scenarios (for example approval/decline flows from external modules).",
            "name": "contentType",
            "schema": {
              "type": "string",
              "enum": [
                "news",
                "event",
                "poll",
                "manual",
                "faq",
                "form",
                "training",
                "externalNotificationContent"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by derived content webhook status. Supports `active`, `inactive`, and `none`. The legacy `hookurls` filter alias is also accepted, including inside `$and` filters.",
            "name": "webhookStatus",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "none"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by tag ID(s). Supports comma-separated values for multiple tags (e.g., `tagId1,tagId2`)",
            "name": "tags",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by planning status. Controls visibility based on online/offline dates",
            "name": "planningStatus",
            "schema": {
              "type": "string",
              "enum": [
                "all",
                "planned",
                "active",
                "inactive"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by approval status",
            "name": "approvedStatus",
            "schema": {
              "type": "string",
              "enum": [
                "n/a",
                "pending",
                "approved",
                "rejected"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Full-text search across title, message, content pool name, and orgchart selection names in all languages",
            "name": "searchTerm",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by organization node and all its descendants. Expands to include all child nodes",
            "name": "filterByNode",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter content with online dates greater than or equal to this date. **[Admin/Supervisor only]**",
            "name": "onlineDate",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter content with offline dates less than or equal to this date. **[Admin/Supervisor only]**",
            "name": "offlineDate",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Skip content with future online dates (excludes planned content). **[Admin/Supervisor only]**",
            "name": "skipPlannedContent",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by content creator user ID. When filtering others' content, only specific fields are returned",
            "name": "createdBy",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by origin reference (template or flow content ID)",
            "name": "originRef",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter content with sticky dates (pinned content)",
            "name": "stickyDate",
            "schema": {
              "type": "string",
              "enum": [
                "true"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Special flag for content reports. Requires `ref` parameter. **[Admin/Supervisor only]**",
            "name": "contentReport",
            "schema": {
              "type": "string",
              "enum": [
                "true"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Reference node for content reports. Used with `contentReport` flag",
            "name": "ref",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter blueprint/template content",
            "name": "isBlueprint",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by recipient user ID or `null` for non-targeted content. **[Admin/Supervisor only]**",
            "name": "recipient",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter content saved/bookmarked by specific user ID",
            "name": "savedBy",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter events by deactivation date",
            "name": "event.deactivationDate",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by content status",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "published"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Management mode flag - removes some audience restrictions. **[Admin/Supervisor only]**",
            "name": "management",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Calculate training progress statistics. **[Admin/Supervisor only]**",
            "name": "calculateTrainingProgress",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of contents",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Query contents. Supports `$sort[webhookStatus]` for the derived content webhook status. The legacy `hookurls` alias is also accepted for filtering and sorting.",
        "summary": "",
        "tags": [
          "contents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "contents created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contents"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create new content. Requires content pool and content type. For `externalNotificationContent`, push text is generated as: title = content creator full name, body = content title.",
        "summary": "",
        "tags": [
          "contents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contents"
              }
            }
          }
        }
      }
    },
    "/contents/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Management mode flag - removes some audience restrictions. **[Admin/Supervisor only]**",
            "name": "management",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "contents retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contents"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieves a single resource with the given id from the service.",
        "summary": "",
        "tags": [
          "contents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of contents to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "contents retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contents"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire content record",
        "summary": "",
        "tags": [
          "contents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contents"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of contents to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "contents retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contents"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Partially update content record",
        "summary": "",
        "tags": [
          "contents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contents"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of contents to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "contents deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contents"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete content and all associated data (comments, likes, votes, etc.)",
        "summary": "",
        "tags": [
          "contents"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/orgchart": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by parent node ID (null for root nodes)",
            "name": "parent",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by ancestor node ID (returns all descendants)",
            "name": "ancestors",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter nodes accessible to specific user ID (based on user permissions)",
            "name": "filterByUser",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by organization type ID",
            "name": "type",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Include all fields in response (by default, returns limited fields for performance)",
            "name": "allFields",
            "schema": {
              "type": "boolean"
            },
            "required": false
          },
          {
            "in": "header",
            "description": "Language code for translated fields",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of orgchart",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgchartList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve organization chart nodes with optional filtering by parent, ancestors, type, or user access",
        "summary": "",
        "tags": [
          "orgchart"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "orgchart created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgchart"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new organization chart node. Automatically updates hierarchical structure (ancestors, children). **[Admin only]**",
        "summary": "",
        "tags": [
          "orgchart"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/orgchart"
              }
            }
          }
        }
      }
    },
    "/orgchart/{id}": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for translated fields",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "orgchart retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgchart"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single organization chart node by ID",
        "summary": "",
        "tags": [
          "orgchart"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of orgchart to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "orgchart retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgchart"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Bulk update multiple nodes in a single operation (max 100 nodes). Avoids multiple structure rebuilds. Provide `_id` in each object to update. **[Admin only]**",
        "summary": "",
        "tags": [
          "orgchart"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "maxItems": 100,
                "items": {
                  "$ref": "#/components/schemas/orgchart"
                }
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of orgchart to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "orgchart retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgchart"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update specific fields of an organization chart node. **[Admin/Supervisor only]**",
        "summary": "",
        "tags": [
          "orgchart"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/orgchart"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "query",
            "description": "Force deletion even if references exist (orphans related data)",
            "name": "force",
            "schema": {
              "type": "boolean"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Dry run - check if node can be deleted without making changes. Returns validation report",
            "name": "dryrun",
            "schema": {
              "type": "boolean"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "orgchart deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgchart"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete an organization chart node. Validates no references exist (users, content, etc.) unless `force=true`. Use `dryrun=true` to check if deletion is possible. **[Admin only]**",
        "summary": "",
        "tags": [
          "orgchart"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/authManagement": {
      "post": {
        "parameters": [],
        "responses": {
          "200": {
            "description": "Action completed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "string",
                      "example": "Success",
                      "description": "Operation result message returned by some authManagement actions such as generateSelfServeLink; validateToken does not include this field"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "valid",
                        "expired",
                        "used"
                      ],
                      "description": "Returned by validateToken to indicate whether the self-serve token can still be used"
                    },
                    "message": {
                      "type": "string",
                      "description": "Returned by validateToken for expired or already used setup links"
                    },
                    "link": {
                      "type": "string",
                      "description": "Optional link returned by actions that expose a URL directly"
                    },
                    "tokenExpires": {
                      "type": "string",
                      "format": "date-time",
                      "description": "Optional expiration timestamp returned by actions that expose token metadata, including validateToken for a still-valid self-serve token"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid action or missing required fields"
          },
          "403": {
            "description": "Forbidden - User not found, missing required email, invalid credentials, or a self-serve setup link that is expired or already used during resetPwdLong"
          },
          "500": {
            "description": "Server error - consult server logs"
          }
        },
        "description": "Perform various authentication management actions:\n\n**checkUnique**: Verify if username/email is available\n```json\n{\"action\": \"checkUnique\", \"value\": {\"loginName\": \"user@example.com\"}}\n```\n\n**resendVerifySignup**: Resend email verification link\n```json\n{\"action\": \"resendVerifySignup\", \"value\": {\"loginName\": \"user@example.com\"}}\n```\n\n**sendResetPwd**: Request password reset (sends email with token)\n```json\n{\"action\": \"sendResetPwd\", \"value\": {\"loginName\": \"user@example.com\"}}\n```\n\n**magicLink**: Request passwordless email sign-in link\n```json\n{\"action\": \"magicLink\", \"value\": {\"loginName\": \"user@example.com\"}}\n```\n\n**generateSelfServeLink**: Generate one-time password setup link for self-serve onboarding\n```json\n{\"action\": \"generateSelfServeLink\", \"value\": {\"loginName\": \"user@example.com\"}}\n```\nSends a password setup email to the user. If there is an existing unused setup token that is still valid, it is reused; otherwise a new token is generated. The emailed button links directly to the frontend password setup page with the one-time token attached.\n\n**validateToken**: Validate a self-serve setup link before submitting a new password\n```json\n{\"action\": \"validateToken\", \"value\": {\"loginName\": \"user@example.com\", \"oneTimeToken\": \"[TOKEN_FROM_EMAIL]\"}}\n```\nReturns `status: valid`, `status: expired`, or `status: used` without the generic `value: \"Success\"` field used by some other authManagement actions. For expired/used links the response also includes the same user-facing message that `resetPwdLong` uses.\n\n**resetPwdLong**: Complete password reset with token from email\n```json\n{\"action\": \"resetPwdLong\", \"value\": {\"token\": \"[TOKEN_FROM_EMAIL]\", \"password\": \"[NEW_PASSWORD]\"}}\n```\nFor self-serve setup links, the backend validates whether the token exists, is still valid, and has not already been used when the password is submitted.\n\n**passwordChange**: Change password (requires authentication)\n```json\n{\"action\": \"passwordChange\", \"value\": {\"user\": {\"loginName\": \"user@example.com\"}, \"oldPassword\": \"[CURRENT]\", \"password\": \"[NEW]\"}}\n```",
        "summary": "",
        "tags": [
          "authManagement"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/authManagement"
              }
            }
          }
        }
      }
    },
    "/translations": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Client ID (tenant identifier)",
            "name": "cid",
            "schema": {
              "type": "integer"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Language code filter",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of translations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/translationsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve translation overrides for client and language",
        "summary": "",
        "tags": [
          "translations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "translations created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/translations"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create new translation overrides for a client/language. **[Admin only]**",
        "summary": "",
        "tags": [
          "translations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/translations"
              }
            }
          }
        }
      }
    },
    "/translations/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of translations to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "translations retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/translations"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve specific translation override by ID",
        "summary": "",
        "tags": [
          "translations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of translations to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "translations retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/translations"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire translation override set. **[Admin only]**",
        "summary": "",
        "tags": [
          "translations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/translations"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of translations to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "translations retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/translations"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update specific translation keys. **[Admin only]**",
        "summary": "",
        "tags": [
          "translations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/translations"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of translations to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "translations deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/translations"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete translation overrides. **[Admin only]**",
        "summary": "",
        "tags": [
          "translations"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/orgtypes": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by parent type ID (for hierarchical types)",
            "name": "parent",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of orgtypes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgtypesList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve all organization types. Accessible to all users",
        "summary": "",
        "tags": [
          "orgtypes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "orgtypes created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgtypes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new organization type. **[System only]**",
        "summary": "",
        "tags": [
          "orgtypes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/orgtypes"
              }
            }
          }
        }
      }
    },
    "/orgtypes/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of orgtypes to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "orgtypes retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgtypes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single organization type by ID. Accessible to all users",
        "summary": "",
        "tags": [
          "orgtypes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of orgtypes to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "orgtypes retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgtypes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire organization type. **[System only]**",
        "summary": "",
        "tags": [
          "orgtypes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/orgtypes"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of orgtypes to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "orgtypes retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgtypes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Partially update organization type. **[System only]**",
        "summary": "",
        "tags": [
          "orgtypes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/orgtypes"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of orgtypes to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "orgtypes deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgtypes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete an organization type. Warning: Cannot delete if nodes are using this type. **[System only]**",
        "summary": "",
        "tags": [
          "orgtypes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/reactions": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by content ID (for content reactions)",
            "name": "contentsref",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by comment ID (for comment reactions)",
            "name": "commentref",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Reaction type",
            "name": "type",
            "schema": {
              "type": "string",
              "enum": [
                "messageReaction",
                "commentReaction"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by reaction creator user ID",
            "name": "createdBy",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by reaction emoji/icon",
            "name": "reaction",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of reactions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/reactionsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve reactions for specific content or comment. Must provide either `contentsref` or `commentref` with `type`",
        "summary": "",
        "tags": [
          "reactions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "reactions created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/reactions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Add a new reaction to content or comment. Requirements:\n- Content/comment must have reactions enabled\n- User cannot have existing reaction on the same item\n- Valid type and reference must be provided",
        "summary": "",
        "tags": [
          "reactions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/reactions"
              }
            }
          }
        }
      }
    },
    "/reactions/{id}": {
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of reactions to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/reactions"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Updates the resource identified by id using data.",
        "summary": "",
        "tags": [
          "reactions"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/reactions"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of reactions to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "reactions deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/reactions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Remove a reaction by reaction ID. Only the creator or admins can remove reactions",
        "summary": "",
        "tags": [
          "reactions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/comments": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by content ID or parent comment ID",
            "name": "refId",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by comment creator user ID",
            "name": "createdBy",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by comment type",
            "name": "type",
            "schema": {
              "type": "string",
              "enum": [
                "onContent",
                "onCommentOnContent",
                "onFormvalue",
                "onCommentOnFormvalue"
              ]
            },
            "required": false
          },
          {
            "in": "header",
            "description": "Language code for comment text",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of comments",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/commentsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve comments for a specific content or parent comment. Returns all comment levels in a flat structure",
        "summary": "",
        "tags": [
          "comments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for the comment",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "201": {
            "description": "comments created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/comments"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new comment on content, form value, or another comment (reply). Maximum 2 nesting levels allowed. For event contents, top-level comments can notify subscribed attendees when the event `notifyAttendeesOnComment` setting is enabled.",
        "summary": "",
        "tags": [
          "comments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/comments"
              }
            }
          }
        }
      }
    },
    "/comments/{id}": {
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of comments to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "comments retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/comments"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update a comment. Only the creator or admins can edit comments",
        "summary": "",
        "tags": [
          "comments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "Updated comment text"
                  },
                  "images": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "Updated image attachments"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of comments to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "comments deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/comments"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a comment. Only the creator or admins can delete comments. Also removes all child comments",
        "summary": "",
        "tags": [
          "comments"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/notifications": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by exact notification type",
            "name": "notificationType",
            "schema": {
              "type": "string",
              "enum": [
                "contentNotification",
                "contentUpdateNotification",
                "contentApprovalNotification",
                "commentOnContentNotification",
                "commentOnEventContentNotification",
                "commentOnFormvalueNotification",
                "commentOnCommentOnContentNotification",
                "commentOnCommentOnFormvalueNotification",
                "updateOnFormValuesNotification",
                "reactionOnContentNotification",
                "reactionOnCommentNotification",
                "usersRewardNotification",
                "usersLevelNotification",
                "mentionOnContentNotification",
                "mentionOnCommentOnContentNotification",
                "mentionOnCommentOnFormvalueNotification",
                "taskApproval",
                "translationRequestNotification",
                "deleteFormSubmissionsNotification",
                "removeAttendeesNotification",
                "userAttendanceStatusNotification"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by read status",
            "name": "read",
            "schema": {
              "type": "boolean"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by new status (unseen notifications)",
            "name": "new",
            "schema": {
              "type": "boolean"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of notifications",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/notificationsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve notifications for the current user. Automatically filtered by recipient (logged-in user)",
        "summary": "",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "notifications created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/notifications"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new notification. **[Internal only]** Notifications are typically created by system events",
        "summary": "",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/notifications"
              }
            }
          }
        }
      }
    },
    "/notifications/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of notifications to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "notifications retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/notifications"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single notification by ID",
        "summary": "",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of notifications to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "notifications retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/notifications"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Bulk update notification statuses for current user. Supports two actions:\n- `markAllRead`: Mark all notifications as read\n- `markAllNonNew`: Mark all notifications as seen (not new)",
        "summary": "",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/notificationAction"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of notifications to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "notifications retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/notifications"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update a single notification status (mark as read or seen)",
        "summary": "",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "read": {
                    "type": "boolean",
                    "description": "Set read status"
                  },
                  "new": {
                    "type": "boolean",
                    "description": "Set new/seen status"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of notifications to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "notifications deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/notifications"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a notification",
        "summary": "",
        "tags": [
          "notifications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/votes": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by content (poll) ID",
            "name": "contentRef",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by poll option ID",
            "name": "pollOptId",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by voter user ID",
            "name": "createdBy",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of votes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/votesList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve votes for a specific poll. Must provide content reference",
        "summary": "",
        "tags": [
          "votes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "votes created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/votes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Submit a vote for a poll option. Requirements:\n- User must not have an existing vote on the poll (unless multiple choice is enabled)\n- Content reference must be valid poll content\n- Poll option ID must be valid for the poll",
        "summary": "",
        "tags": [
          "votes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/votes"
              }
            }
          }
        }
      }
    },
    "/votes/{id}": {
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of votes to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "votes deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/votes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Remove a vote by vote ID. Only the vote creator or admins can remove votes",
        "summary": "",
        "tags": [
          "votes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/version": {
      "get": {
        "parameters": [
          {
            "description": "Number of results to return",
            "in": "query",
            "name": "$limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of results to skip",
            "in": "query",
            "name": "$skip",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Property to sort results",
            "in": "query",
            "name": "$sort",
            "style": "deepObject",
            "schema": {
              "type": "object"
            }
          },
          {
            "description": "Query parameters to filter",
            "in": "query",
            "name": "filter",
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/version"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Version information retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/version"
                      }
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Server error"
          }
        },
        "description": "Get application version and system information. No authentication required",
        "summary": "",
        "tags": [
          "version"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/configs": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Configuration type (required)",
            "name": "configType",
            "schema": {
              "type": "string",
              "enum": [
                "app",
                "theme",
                "features",
                "integrations",
                "notifications"
              ]
            },
            "required": true
          },
          {
            "in": "query",
            "description": "Subdomain to filter configuration",
            "name": "subdomain",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Environment filter",
            "name": "environment",
            "schema": {
              "type": "string",
              "enum": [
                "production",
                "staging",
                "development"
              ]
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of configs",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/configsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve client configuration by type and subdomain",
        "summary": "",
        "tags": [
          "configs"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "configs created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/configs"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create new client configuration. **[Admin only]**",
        "summary": "",
        "tags": [
          "configs"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/configs"
              }
            }
          }
        }
      }
    },
    "/configs/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of configs to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "configs retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/configs"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve specific configuration by ID",
        "summary": "",
        "tags": [
          "configs"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of configs to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "configs retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/configs"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire configuration. **[Admin only]**",
        "summary": "",
        "tags": [
          "configs"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/configs"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of configs to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "configs retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/configs"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update specific configuration fields. **[Admin only]**",
        "summary": "",
        "tags": [
          "configs"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/configs"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of configs to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "configs deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/configs"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a configuration. **[Admin only]**",
        "summary": "",
        "tags": [
          "configs"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pushsubscriptions": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by user ID (restricted to current user)",
            "name": "createdBy",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by platform",
            "name": "platform",
            "schema": {
              "type": "string",
              "enum": [
                "ios",
                "android",
                "web"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by logged on status",
            "name": "loggedOn",
            "schema": {
              "type": "boolean"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of pushsubscriptions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushsubscriptionsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve user push subscriptions. Users can only see their own subscriptions",
        "summary": "",
        "tags": [
          "pushsubscriptions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "pushsubscriptions created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushsubscriptions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Register device for push notifications. Creates subscription with device tokens and platform info",
        "summary": "",
        "tags": [
          "pushsubscriptions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pushsubscriptions"
              }
            }
          }
        }
      }
    },
    "/pushsubscriptions/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of pushsubscriptions to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "pushsubscriptions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushsubscriptions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single push subscription by ID",
        "summary": "",
        "tags": [
          "pushsubscriptions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of pushsubscriptions to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "pushsubscriptions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushsubscriptions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire push subscription",
        "summary": "",
        "tags": [
          "pushsubscriptions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pushsubscriptions"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of pushsubscriptions to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "pushsubscriptions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushsubscriptions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update push subscription (e.g., update tokens, logged on status, permissions)",
        "summary": "",
        "tags": [
          "pushsubscriptions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pushsubscriptions"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of pushsubscriptions to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "pushsubscriptions deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushsubscriptions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Unregister device from push notifications",
        "summary": "",
        "tags": [
          "pushsubscriptions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/authchat": {
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/authchat"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Authenticate user to chat service, just send empty object since we only need jwt token",
        "summary": "",
        "tags": [
          "authchat"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/authchat"
              }
            }
          }
        }
      }
    },
    "/pushmessages": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by message status",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "new",
                "converted",
                "processed",
                "failed"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by origin type",
            "name": "origin",
            "schema": {
              "type": "string",
              "enum": [
                "content",
                "task",
                "comment",
                "system"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by origin entity ID",
            "name": "originId",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of pushmessages",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushmessagesList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve push messages with status tracking",
        "summary": "",
        "tags": [
          "pushmessages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "pushmessages created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushmessages"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create push message(s) for delivery. Supports batch creation with array input. **[Internal only]**",
        "summary": "",
        "tags": [
          "pushmessages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/pushmessages"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/pushmessages"
                    }
                  }
                ]
              }
            }
          }
        }
      },
      "put": {
        "parameters": [],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushmessagesList"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Updates multiple resources.",
        "summary": "",
        "tags": [
          "pushmessages"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pushmessagesList"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "description": "Query parameters to filter",
            "in": "query",
            "name": "filter",
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/pushmessages"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushmessagesList"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Updates multiple resources queried by given filters.",
        "summary": "",
        "tags": [
          "pushmessages"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pushmessages"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "description": "Query parameters to filter",
            "in": "query",
            "name": "filter",
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/pushmessages"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushmessagesList"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Removes multiple resources queried by given filters.",
        "summary": "",
        "tags": [
          "pushmessages"
        ],
        "security": []
      }
    },
    "/pushmessages/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of pushmessages to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "pushmessages retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushmessages"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single push message by ID",
        "summary": "",
        "tags": [
          "pushmessages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of pushmessages to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "pushmessages retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushmessages"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire push message. **[Internal only]**",
        "summary": "",
        "tags": [
          "pushmessages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pushmessages"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of pushmessages to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "pushmessages retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushmessages"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update push message status or fields. **[Internal only]**",
        "summary": "",
        "tags": [
          "pushmessages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pushmessages"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of pushmessages to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "pushmessages deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushmessages"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a push message. **[Internal only]**",
        "summary": "",
        "tags": [
          "pushmessages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/pushmessagesqueue": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by queue entry status",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "sent",
                "failed",
                "retry"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by push message reference",
            "name": "pushMessage",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by user ID",
            "name": "userId",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of pushmessagesqueue",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushmessagesqueueList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve push message queue entries with status tracking",
        "summary": "",
        "tags": [
          "pushmessagesqueue"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "pushmessagesqueue created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushmessagesqueue"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create queue entry for push delivery. **[Internal only]**",
        "summary": "",
        "tags": [
          "pushmessagesqueue"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pushmessagesqueue"
              }
            }
          }
        }
      }
    },
    "/pushmessagesqueue/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of pushmessagesqueue to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "pushmessagesqueue retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushmessagesqueue"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single queue entry by ID",
        "summary": "",
        "tags": [
          "pushmessagesqueue"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of pushmessagesqueue to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "pushmessagesqueue retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushmessagesqueue"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire queue entry. **[Internal only]**",
        "summary": "",
        "tags": [
          "pushmessagesqueue"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pushmessagesqueue"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of pushmessagesqueue to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "pushmessagesqueue retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushmessagesqueue"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update queue entry status. **[Internal only]**",
        "summary": "",
        "tags": [
          "pushmessagesqueue"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pushmessagesqueue"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of pushmessagesqueue to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "pushmessagesqueue deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushmessagesqueue"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a queue entry. **[Internal only]**",
        "summary": "",
        "tags": [
          "pushmessagesqueue"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/formvalues": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by content (form) reference ID",
            "name": "contentRef",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by submitter user ID",
            "name": "createdBy",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by content type",
            "name": "contentType",
            "schema": {
              "type": "string",
              "enum": [
                "form",
                "event"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by confidential status",
            "name": "confidential",
            "schema": {
              "type": "boolean"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of formvalues",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/formvaluesList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve form submissions. Automatically filtered by permissions - confidential forms only visible to confidants and form creator",
        "summary": "",
        "tags": [
          "formvalues"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "formvalues created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/formvalues"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Submit form values. Triggers webhooks and email notifications if configured on the form",
        "summary": "",
        "tags": [
          "formvalues"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/formvalues"
              }
            }
          }
        }
      }
    },
    "/formvalues/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of formvalues to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "formvalues retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/formvalues"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single form submission by ID. Access restricted for confidential forms",
        "summary": "",
        "tags": [
          "formvalues"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of formvalues to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "formvalues retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/formvalues"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire form submission. Only creator or confidants can update. **[Rarely used]**",
        "summary": "",
        "tags": [
          "formvalues"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/formvalues"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of formvalues to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "formvalues retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/formvalues"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update specific fields of a form submission. Only creator or confidants can update",
        "summary": "",
        "tags": [
          "formvalues"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/formvalues"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of formvalues to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "formvalues deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/formvalues"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a form submission. Only creator, confidants, or admins can delete",
        "summary": "",
        "tags": [
          "formvalues"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/permissions": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter permissions by category. Leading and trailing whitespace is trimmed.",
            "name": "category",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Boolean filter for super-admin permissions. When set to `true`, only Keephub admins can request the expanded categorized result set.",
            "name": "isSuperAdminPermission",
            "schema": {
              "type": "boolean"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/permissionsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve available permissions in the system. Access is limited to users with `roles.admin` or `configs.admin`. Permissions in the `Users Default Permissions` category are returned only to users with `configs.admin`; all other callers will not receive them even when matched by other filters.",
        "summary": "",
        "tags": [
          "permissions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "permissions created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/permissions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new permission. **[System only]**",
        "summary": "",
        "tags": [
          "permissions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/permissions"
              }
            }
          }
        }
      }
    },
    "/permissions/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of permissions to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "permissions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/permissions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single permission by ID. Permissions in the `Users Default Permissions` category are available only to users with `configs.admin`; other callers receive a not-found response.",
        "summary": "",
        "tags": [
          "permissions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of permissions to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "permissions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/permissions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire permission. **[System only]**",
        "summary": "",
        "tags": [
          "permissions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/permissions"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of permissions to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "permissions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/permissions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Partially update permission. **[System only]**",
        "summary": "",
        "tags": [
          "permissions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/permissions"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of permissions to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "permissions deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/permissions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a permission. Warning: Roles using this permission will lose access. **[System only]**",
        "summary": "",
        "tags": [
          "permissions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/roles": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by an exact role name.",
            "name": "name",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Case-insensitive partial search on role name. Minimum length: 3 characters.",
            "name": "name.$search",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Legacy alias for `name.$search`.",
            "name": "roleTitle.$search",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter roles by whether they are default roles.",
            "name": "default",
            "schema": {
              "type": "boolean"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter roles by whether they are protected from modification/deletion.",
            "name": "isProtected",
            "schema": {
              "type": "boolean"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "When `true`, include `userCount` in each returned role.",
            "name": "management",
            "schema": {
              "type": "boolean"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of roles",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/rolesList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve roles. Results are filtered by the current user level to prevent privilege escalation unless the caller already has full role access. When `management=true`, each returned role also includes `userCount`.",
        "summary": "",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "roles created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/roles"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new role with specified permissions. **[Requires `admin` or `system`]** Assigning the `Keephub Admin` permission to a role is additionally restricted to callers who already have `Keephub Admin`.",
        "summary": "",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/roles"
              }
            }
          }
        }
      }
    },
    "/roles/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of roles to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "roles retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/roles"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single role by ID",
        "summary": "",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of roles to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "roles retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/roles"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire role configuration. **[Requires `admin` or `system`]** Assigning the `Keephub Admin` permission to a role is additionally restricted to callers who already have `Keephub Admin`.",
        "summary": "",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/roles"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of roles to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "roles retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/roles"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Partially update role permissions. **[Requires `admin` or `system`]** Assigning the `Keephub Admin` permission to a role is additionally restricted to callers who already have `Keephub Admin`.",
        "summary": "",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/roles"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of roles to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "roles deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/roles"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a role. Warning: Users with this role will lose associated permissions. **[Requires `admin` or `system`]**",
        "summary": "",
        "tags": [
          "roles"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/signurl": {
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "Signed URL generated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "signedUrl": {
                      "type": "string",
                      "format": "uri",
                      "description": "Pre-signed S3 URL (valid for limited time)"
                    },
                    "storageId": {
                      "type": "string",
                      "description": "Storage identifier (for putObject)"
                    },
                    "expiresIn": {
                      "type": "integer",
                      "description": "URL expiration time in seconds"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - User does not have access to this resource"
          },
          "404": {
            "description": "Resource not found"
          },
          "500": {
            "description": "Server error"
          }
        },
        "description": "Generate signed URL for S3 operations or external plugin access.\n\n**For getObject (download):**\n- Requires `origin` and `originId` for access verification\n- Requires `storageId` to identify the file\n- Verifies user has access to the content/task/form\n\n**For putObject (upload):**\n- Requires `contentType` and `fileType`\n- Optional `subFolder` and `fileName`\n- Optional `textractDisable` to skip PDF text extraction\n\n**For externalPlugin:**\n- Supports `externalPluginUrl` and `externalPluginProfile`",
        "summary": "",
        "tags": [
          "signurl"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/signurl"
              }
            }
          }
        }
      }
    },
    "/contentviews": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Number of results to return",
            "name": "$limit",
            "type": "integer",
            "required": false
          },
          {
            "in": "query",
            "description": "Number of results to skip",
            "name": "$skip",
            "type": "integer",
            "required": false
          },
          {
            "in": "query",
            "description": "Property to sort results",
            "name": "$sort",
            "type": "string",
            "required": false
          },
          {
            "in": "query",
            "description": "Select list of fields for results",
            "name": "$select[]",
            "collectionFormat": "multi",
            "type": "array",
            "required": false,
            "items": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "description": "Disable translation filter for this service (if present)",
            "name": "disableTranslationsFilter",
            "type": "boolean",
            "required": false
          },
          {
            "in": "query",
            "description": "Content ID for which viewer summaries should be returned. Required for external requests.",
            "name": "contentRef",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": true
          },
          {
            "in": "query",
            "description": "Optional filter to return a single viewer by user ID",
            "name": "createdBy",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Optional case-insensitive viewer-name search. Use `searchTerm=Jane Doe`. Requires `contentRef` and matches against the persisted `createdByFullName` field.",
            "name": "searchTerm",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Optional date filter for the original content view timestamp (supports Feathers query syntax like `createdAt[$gte]`)",
            "name": "createdAt[$gte]",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of contentviewViewer",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentviewViewerList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a paginated list of users who have viewed a specific content item. External callers must provide `contentRef`; raw contentview listing without `contentRef` is reserved for internal server-side calls. When `contentRef` is provided, the response data contains populated viewer summaries instead of raw content view records. **[Content creator/Admin/Supervisor only]**",
        "summary": "",
        "tags": [
          "contentviews"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "contentviews created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentviews"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Record a content view. Automatically prevents duplicate views from same user. Updates content viewsCount",
        "summary": "",
        "tags": [
          "contentviews"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contentviews"
              }
            }
          }
        }
      }
    },
    "/contentviews/{id}": {
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of contentviews to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "contentviews deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentviews"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a content view record. **[Not allowed by service hooks]**",
        "summary": "",
        "tags": [
          "contentviews"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/blacklisttoken": {
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/blacklisttoken"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Puts valid token on blacklist",
        "summary": "",
        "tags": [
          "blacklisttoken"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/blacklisttoken"
              }
            }
          }
        }
      }
    },
    "/search": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Search term for full-text search",
            "name": "searchTerm",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Search type - determines what to search for",
            "name": "searchType",
            "schema": {
              "type": "string",
              "enum": [
                "contents",
                "contacts",
                "anniversary",
                "externalcontents",
                "folders",
                "all"
              ]
            },
            "required": true
          },
          {
            "in": "query",
            "description": "Contact types filter (only for searchType=contacts). Multiple types comma-separated",
            "name": "contactTypes",
            "schema": {
              "type": "string",
              "enum": [
                "users",
                "orgunits",
                "externalcontacts",
                "all"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Anniversary type filter (only for searchType=anniversary)",
            "name": "anniversaryType",
            "schema": {
              "type": "string",
              "enum": [
                "birthdays"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Content type filter (only for searchType=contents), including `externalNotificationContent`",
            "name": "contentType",
            "schema": {
              "type": "string",
              "enum": [
                "news",
                "event",
                "poll",
                "manual",
                "faq",
                "form",
                "training",
                "externalNotificationContent"
              ]
            },
            "required": false
          },
          {
            "in": "header",
            "description": "Language code for search results",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Exclude current user from search results",
            "name": "skipCurrentUser",
            "schema": {
              "type": "boolean"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Search results retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "total": {
                      "type": "integer",
                      "description": "Total number of results"
                    },
                    "limit": {
                      "type": "integer",
                      "description": "Results per page"
                    },
                    "skip": {
                      "type": "integer",
                      "description": "Results skipped"
                    },
                    "data": {
                      "type": "array",
                      "description": "Search results (structure varies by searchType)",
                      "items": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Missing required parameters"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Server error"
          }
        },
        "description": "Execute search across specified type with full-text search capabilities",
        "summary": "",
        "tags": [
          "search"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/levels": {
      "get": {
        "parameters": [
          {
            "description": "Number of results to return",
            "in": "query",
            "name": "$limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of results to skip",
            "in": "query",
            "name": "$skip",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Property to sort results",
            "in": "query",
            "name": "$sort",
            "style": "deepObject",
            "schema": {
              "type": "object"
            }
          },
          {
            "description": "Query parameters to filter",
            "in": "query",
            "name": "filter",
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/levels"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of levels",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/levelsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve all levels in the system",
        "summary": "",
        "tags": [
          "levels"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/rewards": {
      "get": {
        "parameters": [
          {
            "description": "Number of results to return",
            "in": "query",
            "name": "$limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of results to skip",
            "in": "query",
            "name": "$skip",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Property to sort results",
            "in": "query",
            "name": "$sort",
            "style": "deepObject",
            "schema": {
              "type": "object"
            }
          },
          {
            "description": "Query parameters to filter",
            "in": "query",
            "name": "filter",
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/rewards"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of rewards",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/rewardsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve all reward definitions",
        "summary": "",
        "tags": [
          "rewards"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "rewards created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/rewards"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new reward definition with query pipeline. **[Admin only]**",
        "summary": "",
        "tags": [
          "rewards"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/rewards"
              }
            }
          }
        }
      }
    },
    "/rewards/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of rewards to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "rewards retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/rewards"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a specific reward by ID",
        "summary": "",
        "tags": [
          "rewards"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of rewards to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "rewards retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/rewards"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire reward configuration. **[Admin only]**",
        "summary": "",
        "tags": [
          "rewards"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/rewards"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of rewards to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "rewards retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/rewards"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update specific reward fields. **[Admin only]**",
        "summary": "",
        "tags": [
          "rewards"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/rewards"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of rewards to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "rewards deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/rewards"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a reward definition. **[Admin only]**",
        "summary": "",
        "tags": [
          "rewards"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/badges": {
      "get": {
        "parameters": [
          {
            "description": "Number of results to return",
            "in": "query",
            "name": "$limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of results to skip",
            "in": "query",
            "name": "$skip",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Property to sort results",
            "in": "query",
            "name": "$sort",
            "style": "deepObject",
            "schema": {
              "type": "object"
            }
          },
          {
            "description": "Query parameters to filter",
            "in": "query",
            "name": "filter",
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/badges"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of badges",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/badgesList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve all badges in the system",
        "summary": "",
        "tags": [
          "badges"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "badges created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/badges"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new badge with criteria. **[Admin only]**",
        "summary": "",
        "tags": [
          "badges"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/badges"
              }
            }
          }
        }
      }
    },
    "/badges/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of badges to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "badges retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/badges"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single badge by ID",
        "summary": "",
        "tags": [
          "badges"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of badges to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "badges retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/badges"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire badge configuration. **[Admin only]**",
        "summary": "",
        "tags": [
          "badges"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/badges"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of badges to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "badges retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/badges"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Partially update badge properties. **[Admin only]**",
        "summary": "",
        "tags": [
          "badges"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/badges"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of badges to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "badges deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/badges"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a badge. Users who earned this badge will lose it. **[Admin only]**",
        "summary": "",
        "tags": [
          "badges"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/usersrewards": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by user ID",
            "name": "userRef",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by reward ID",
            "name": "rewardRef",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of usersrewards",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/usersrewardsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve user reward history. Users can see their own rewards",
        "summary": "",
        "tags": [
          "usersrewards"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "usersrewards created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/usersrewards"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Grant a reward to a user. **[Internal/Admin only]**",
        "summary": "",
        "tags": [
          "usersrewards"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/usersrewards"
              }
            }
          }
        }
      }
    },
    "/usersrewards/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of usersrewards to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "usersrewards retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/usersrewards"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a specific user reward record by ID",
        "summary": "",
        "tags": [
          "usersrewards"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of usersrewards to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "usersrewards retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/usersrewards"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire user reward record. **[Internal only]**",
        "summary": "",
        "tags": [
          "usersrewards"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/usersrewards"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of usersrewards to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "usersrewards retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/usersrewards"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update user reward record fields. **[Internal only]**",
        "summary": "",
        "tags": [
          "usersrewards"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/usersrewards"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of usersrewards to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "usersrewards deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/usersrewards"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a user reward record. **[Admin only]**",
        "summary": "",
        "tags": [
          "usersrewards"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/translate": {
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "Text translated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "translations": {
                      "type": "array",
                      "description": "Translated text results",
                      "items": {
                        "type": "object",
                        "properties": {
                          "translatedText": {
                            "type": "string",
                            "description": "Translated text"
                          },
                          "detectedSourceLanguage": {
                            "type": "string",
                            "description": "Auto-detected source language (if not specified)"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Translation API error"
          }
        },
        "description": "Translate text from source language to target language using Google Translate",
        "summary": "",
        "tags": [
          "translate"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/translate"
              }
            }
          }
        }
      }
    },
    "/userspointsbalances": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by user ID",
            "name": "userRef",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of userspointsbalances",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/userspointsbalancesList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve user points transaction history",
        "summary": "",
        "tags": [
          "userspointsbalances"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "userspointsbalances created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/userspointsbalances"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create points transaction. **[Internal only]**",
        "summary": "",
        "tags": [
          "userspointsbalances"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/userspointsbalances"
              }
            }
          }
        }
      }
    },
    "/userspointsbalances/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of userspointsbalances to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "userspointsbalances retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/userspointsbalances"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a specific points transaction by ID",
        "summary": "",
        "tags": [
          "userspointsbalances"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of userspointsbalances to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "userspointsbalances retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/userspointsbalances"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire transaction record. **[Internal only]**",
        "summary": "",
        "tags": [
          "userspointsbalances"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/userspointsbalances"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of userspointsbalances to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "userspointsbalances retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/userspointsbalances"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update transaction record fields. **[Internal only]**",
        "summary": "",
        "tags": [
          "userspointsbalances"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/userspointsbalances"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of userspointsbalances to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "userspointsbalances deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/userspointsbalances"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a transaction record. **[Admin only]**",
        "summary": "",
        "tags": [
          "userspointsbalances"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/attachmentdetails": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by storage ID",
            "name": "storageId",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of attachmentdetails",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/attachmentdetailsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve attachment details. **[Internal only]**",
        "summary": "",
        "tags": [
          "attachmentdetails"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "attachmentdetails created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/attachmentdetails"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create attachment details with extracted text from PDF. **[Lambda trigger only]** Used by AWS Lambda to store processed attachment metadata and searchable text content",
        "summary": "",
        "tags": [
          "attachmentdetails"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/attachmentdetails"
              }
            }
          }
        }
      }
    },
    "/attachmentdetails/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of attachmentdetails to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "attachmentdetails retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/attachmentdetails"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single attachment detail by ID. **[Internal only]**",
        "summary": "",
        "tags": [
          "attachmentdetails"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of attachmentdetails to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/attachmentdetails"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Updates the resource identified by id using data.",
        "summary": "",
        "tags": [
          "attachmentdetails"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/attachmentdetails"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of attachmentdetails to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/attachmentdetails"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Updates the resource identified by id using data.",
        "summary": "",
        "tags": [
          "attachmentdetails"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/attachmentdetails"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of attachmentdetails to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/attachmentdetails"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Removes the resource with id.",
        "summary": "",
        "tags": [
          "attachmentdetails"
        ],
        "security": []
      }
    },
    "/awstrigger": {
      "post": {
        "parameters": [],
        "responses": {
          "200": {
            "description": "awstrigger retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/awstrigger"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Execute trigger",
        "summary": "",
        "tags": [
          "awstrigger"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/awstrigger"
              }
            }
          }
        }
      }
    },
    "/chatgroups": {
      "get": {
        "parameters": [
          {
            "description": "Number of results to return",
            "in": "query",
            "name": "$limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of results to skip",
            "in": "query",
            "name": "$skip",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Property to sort results",
            "in": "query",
            "name": "$sort",
            "style": "deepObject",
            "schema": {
              "type": "object"
            }
          },
          {
            "description": "Query parameters to filter",
            "in": "query",
            "name": "filter",
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/chatgroups"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/chatgroupsPagination"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Retrieves a list of all resources from the service.",
        "summary": "",
        "tags": [
          "chatgroups"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/chatgroups"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Make new chat group, only name, type=external and users are mandatory filed",
        "summary": "",
        "tags": [
          "chatgroups"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/chatgroups"
              }
            }
          }
        }
      }
    },
    "/chatgroups/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of chatgroups to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/chatgroups"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Retrieves a single resource with the given id from the service.",
        "summary": "",
        "tags": [
          "chatgroups"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of chatgroups to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/chatgroups"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Updates the resource identified by id using data.",
        "summary": "",
        "tags": [
          "chatgroups"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/chatgroups"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of chatgroups to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/chatgroups"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Updates the resource identified by id using data.",
        "summary": "",
        "tags": [
          "chatgroups"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/chatgroups"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of chatgroups to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/chatgroups"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Removes the resource with id.",
        "summary": "",
        "tags": [
          "chatgroups"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/tags": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Search tags containing this text (must include # as first character, e.g., \"#marketing\"). Minimum 3 characters. With isExactMatch=true, returns only the tag with this exact text.",
            "name": "text[$search]",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "When true, performs an exact match on text[$search] instead of a partial search. Returns at most one result.",
            "name": "isExactMatch",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by tag type",
            "name": "type",
            "schema": {
              "type": "string",
              "enum": [
                "content",
                "task",
                "event"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by exact tag text",
            "name": "text",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of tags",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tagsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Search tags by text. Supports partial (fuzzy) search by default, or exact match when isExactMatch is enabled.",
        "summary": "",
        "tags": [
          "tags"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "200": {
            "description": "tags retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tags"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new tag. Restricted to system users only.",
        "summary": "",
        "tags": [
          "tags"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/tags"
              }
            }
          }
        }
      }
    },
    "/tags/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of tags to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "tags retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/tags"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single tag by ID with usage statistics",
        "summary": "",
        "tags": [
          "tags"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/exports": {
      "post": {
        "parameters": [
          {
            "in": "query",
            "description": "Export type",
            "name": "type",
            "schema": {
              "type": "string",
              "enum": [
                "poll",
                "form",
                "tasktemplate",
                "flowTaskTemplate",
                "event",
                "taskMonthlyReport",
                "activeUsersBasedOnLastActivity",
                "contentReportsExport",
                "contentWeeklyReport",
                "learningProgress"
              ]
            },
            "required": true
          },
          {
            "in": "query",
            "description": "Export file format",
            "name": "exportFileType",
            "schema": {
              "type": "string",
              "enum": [
                "csv",
                "xlsx"
              ],
              "default": "csv"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Reference ID of the object to export (content ID, task template ID). Optional for report-style exports such as `contentReportsExport`; when provided there, the orgchart node scope is expanded to descendant nodes like the management content reports view.",
            "name": "ref",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Indicates export via API (affects filename)",
            "name": "apiExport",
            "schema": {
              "type": "boolean"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Export file generated successfully",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string",
                  "format": "binary",
                  "description": "CSV file content"
                }
              },
              "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet": {
                "schema": {
                  "type": "string",
                  "format": "binary",
                  "description": "Excel file content"
                }
              }
            }
          },
          "204": {
            "description": "No data to export"
          },
          "400": {
            "description": "Bad Request - Invalid parameters"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - Insufficient permissions to export this data"
          },
          "500": {
            "description": "Server error"
          }
        },
        "description": "Generate and download an export file. Returns the file directly with the appropriate content-type header. For `learningProgress`, both active and inactive users are included, while soft-deleted users are excluded. For `contentReportsExport`, the generated file includes the `Content Pool Name` localized pool label column and no longer includes the raw content pool identifier column.",
        "summary": "",
        "tags": [
          "exports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Optional filters for export data. For `contentReportsExport`, logical `$and`/`$or` groups are merged with fixed server-side constraints such as non-draft content, `recipient: null`, orgchart descendant scoping derived from `ref`, and `onlineDate`.",
                "properties": {
                  "contentType": {
                    "description": "For `contentReportsExport`, filter exported content by content type. Supports either a plain string or an operator object using `$eq`, `$ne`, `$in`, or `$nin`.",
                    "oneOf": [
                      {
                        "type": "string",
                        "example": "news"
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "$eq": {
                            "type": "string",
                            "example": "news"
                          },
                          "$ne": {
                            "type": "string",
                            "example": "form"
                          },
                          "$in": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "example": "manual"
                            }
                          },
                          "$nin": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "example": "faq"
                            }
                          }
                        }
                      }
                    ]
                  },
                  "contentPool": {
                    "description": "For `contentReportsExport`, content pool filter. Supports an ObjectId string or an operator object using `$eq`, `$ne`, `$in`, or `$nin`.",
                    "oneOf": [
                      {
                        "type": "string",
                        "example": "620e2b9ec76b632110eb2b6a"
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "$eq": {
                            "type": "string",
                            "example": "620e2b9ec76b632110eb2b6a"
                          },
                          "$ne": {
                            "type": "string",
                            "example": "620e2b9ec76b632110eb2b6a"
                          },
                          "$in": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "example": "620e2b9ec76b632110eb2b6a"
                            }
                          },
                          "$nin": {
                            "type": "array",
                            "items": {
                              "type": "string",
                              "example": "620e2b9ec76b632110eb2b6a"
                            }
                          }
                        }
                      }
                    ]
                  },
                  "sendPushNotification": {
                    "description": "For `contentReportsExport`, filter by whether the content is configured to send push notifications. Supports a boolean or an operator object using `$eq`, `$ne`, `$in`, or `$nin`.",
                    "oneOf": [
                      {
                        "type": "boolean"
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "$eq": {
                            "type": "boolean"
                          },
                          "$ne": {
                            "type": "boolean"
                          },
                          "$in": {
                            "type": "array",
                            "items": {
                              "type": "boolean"
                            }
                          },
                          "$nin": {
                            "type": "array",
                            "items": {
                              "type": "boolean"
                            }
                          }
                        }
                      }
                    ]
                  },
                  "onlineDate": {
                    "description": "For `contentReportsExport`, optional publish date filter. Send an object with `$gte` and/or `$lte` ISO timestamps. An empty object is treated as no date filter.",
                    "oneOf": [
                      {
                        "type": "string",
                        "format": "date-time"
                      },
                      {
                        "type": "object",
                        "additionalProperties": false,
                        "properties": {
                          "$gte": {
                            "type": "string",
                            "format": "date-time"
                          },
                          "$lte": {
                            "type": "string",
                            "format": "date-time"
                          }
                        }
                      }
                    ]
                  },
                  "$and": {
                    "type": "array",
                    "description": "For `contentReportsExport`, combine multiple safe field filters with logical AND. Each item may contain `contentType`, `contentPool`, `sendPushNotification`, or a nested `$and`/`$or` group.",
                    "items": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "example": [
                      {
                        "contentType": "news"
                      },
                      {
                        "sendPushNotification": {
                          "$ne": true
                        }
                      }
                    ]
                  },
                  "$or": {
                    "type": "array",
                    "description": "For `contentReportsExport`, combine multiple safe field filters with logical OR. Each item may contain `contentType`, `contentPool`, `sendPushNotification`, or a nested `$and`/`$or` group.",
                    "items": {
                      "type": "object",
                      "additionalProperties": true
                    },
                    "example": [
                      {
                        "contentType": "news"
                      },
                      {
                        "contentType": "manual"
                      },
                      {
                        "sendPushNotification": {
                          "$ne": true
                        }
                      }
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/contentpooltypes": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by content type",
            "name": "type",
            "schema": {
              "type": "string",
              "enum": [
                "news",
                "event",
                "poll",
                "manual",
                "faq",
                "form",
                "training",
                "externalNotificationContent"
              ]
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of contentpooltypes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentpooltypesList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve all content pool types available in the system",
        "summary": "",
        "tags": [
          "contentpooltypes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "contentpooltypes created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentpooltypes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new content pool type template. **[Admin only]**",
        "summary": "",
        "tags": [
          "contentpooltypes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contentpooltypes"
              }
            }
          }
        }
      }
    },
    "/contentpooltypes/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of contentpooltypes to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "contentpooltypes retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentpooltypes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single content pool type by ID",
        "summary": "",
        "tags": [
          "contentpooltypes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of contentpooltypes to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "contentpooltypes retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentpooltypes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire content pool type configuration. **[Admin only]**",
        "summary": "",
        "tags": [
          "contentpooltypes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contentpooltypes"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of contentpooltypes to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "contentpooltypes retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentpooltypes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update specific fields of a content pool type. **[Admin only]**",
        "summary": "",
        "tags": [
          "contentpooltypes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contentpooltypes"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of contentpooltypes to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "contentpooltypes deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentpooltypes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a content pool type. Warning: Cannot delete if content pools exist using this type. **[Admin only]**",
        "summary": "",
        "tags": [
          "contentpooltypes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/orgattributes": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for attribute name translation",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by category ID",
            "name": "category",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of orgattributes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgattributesList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve all organization attributes with optional language filtering",
        "summary": "",
        "tags": [
          "orgattributes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "orgattributes created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgattributes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new organization attribute. `imported` defaults to `false` when omitted. Setting `imported: true` is allowed only for keephubAdmin and system user. **[Admin only]**",
        "summary": "",
        "tags": [
          "orgattributes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/orgattributes"
              }
            }
          }
        }
      }
    },
    "/orgattributes/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for attribute name translation",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "orgattributes retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgattributes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single organization attribute by ID",
        "summary": "",
        "tags": [
          "orgattributes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of orgattributes to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "orgattributes retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgattributes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire organization attribute. Internal calls only. Changing `imported` is allowed only for keephubAdmin and system user. **[Internal only]**",
        "summary": "",
        "tags": [
          "orgattributes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/orgattributes"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of orgattributes to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "orgattributes retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgattributes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Partially update organization attribute. Changing `imported` is allowed only for keephubAdmin and system user. **[Admin only]**",
        "summary": "",
        "tags": [
          "orgattributes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/orgattributes"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of orgattributes to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "orgattributes deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgattributes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete an organization attribute. Warning: Removes from all org chart nodes using it. **[Admin only]**",
        "summary": "",
        "tags": [
          "orgattributes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/orgattributecategories": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for category name translation",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of orgattributecategories",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgattributecategoriesList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve all organization attribute categories",
        "summary": "",
        "tags": [
          "orgattributecategories"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "orgattributecategories created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgattributecategories"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new organization attribute category. `imported` defaults to `false` when omitted. Setting `imported: true` is allowed only for keephubAdmin and system user. **[Admin only]**",
        "summary": "",
        "tags": [
          "orgattributecategories"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/orgattributecategories"
              }
            }
          }
        }
      }
    },
    "/orgattributecategories/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for category name translation",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "orgattributecategories retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgattributecategories"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single organization attribute category by ID",
        "summary": "",
        "tags": [
          "orgattributecategories"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of orgattributecategories to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "orgattributecategories retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgattributecategories"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire organization attribute category. Internal calls only. Changing `imported` is allowed only for keephubAdmin and system user. **[Internal only]**",
        "summary": "",
        "tags": [
          "orgattributecategories"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/orgattributecategories"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of orgattributecategories to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "orgattributecategories retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgattributecategories"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Partially update organization attribute category. Changing `imported` is allowed only for keephubAdmin and system user. **[Admin only]**",
        "summary": "",
        "tags": [
          "orgattributecategories"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/orgattributecategories"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of orgattributecategories to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "orgattributecategories deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/orgattributecategories"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete an organization attribute category. Warning: Cannot delete if attributes exist in this category. **[Admin only]**",
        "summary": "",
        "tags": [
          "orgattributecategories"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/talkjshook": {
      "post": {
        "parameters": [
          {
            "in": "header",
            "description": "HMAC-SHA256 signature for request validation",
            "name": "X-Talkjs-Signature",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "in": "header",
            "description": "Unix timestamp in milliseconds (must be within 5 minutes)",
            "name": "X-TalkJS-Timestamp",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook processed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "value": {
                      "type": "string",
                      "example": "Success"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid payload or missing required fields"
          },
          "401": {
            "description": "Unauthorized - Invalid or expired signature"
          },
          "405": {
            "description": "Method Not Allowed - Only POST is supported"
          },
          "500": {
            "description": "Server error"
          }
        },
        "description": "Process TalkJS webhook notification. Validates signature and triggers push notifications for chat messages",
        "summary": "",
        "tags": [
          "talkjshook"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "type",
                  "createdAt",
                  "data"
                ],
                "properties": {
                  "type": {
                    "type": "string",
                    "enum": [
                      "notification.triggered"
                    ],
                    "description": "Webhook event type (only notification.triggered is processed)"
                  },
                  "createdAt": {
                    "type": "integer",
                    "description": "Unix timestamp in milliseconds when event was created"
                  },
                  "data": {
                    "type": "object",
                    "required": [
                      "notificationId",
                      "recipient",
                      "sender",
                      "conversation",
                      "messages"
                    ],
                    "properties": {
                      "notificationId": {
                        "type": "string",
                        "description": "TalkJS notification ID"
                      },
                      "recipient": {
                        "type": "string",
                        "format": "objectId",
                        "description": "User ID of notification recipient"
                      },
                      "sender": {
                        "type": "string",
                        "format": "objectId",
                        "description": "User ID of message sender"
                      },
                      "conversation": {
                        "type": "string",
                        "description": "Conversation ID"
                      },
                      "messages": {
                        "type": "array",
                        "description": "Message IDs that triggered the notification",
                        "items": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/folders": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for folder name translation",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by content pool ID",
            "name": "contentPool",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by parent folder ID (`null` for root folders)",
            "name": "parentRef",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "When set to `true` together with `parentRef`, returns all direct subfolders in that accessible parent folder without applying the normal audience visibility filters for the child folders. This affects `find` only and does not grant additional `patch` or `remove` access.",
            "name": "contentsInFolder",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of folders",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/foldersList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve folders with optional filtering by content pool. When `contentsInFolder=true` is combined with `parentRef`, all subfolders in that accessible parent folder are returned without applying the normal child-folder audience filters. This affects `find` only and does not change edit or remove permissions.",
        "summary": "",
        "tags": [
          "folders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "folders created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/folders"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new folder with targeting rules",
        "summary": "",
        "tags": [
          "folders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/folders"
              }
            }
          }
        }
      }
    },
    "/folders/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for folder name translation",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "folders retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/folders"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single folder by ID with item count",
        "summary": "",
        "tags": [
          "folders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of folders to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "folders retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/folders"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire folder configuration",
        "summary": "",
        "tags": [
          "folders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/folders"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of folders to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "folders retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/folders"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Partially update folder information",
        "summary": "",
        "tags": [
          "folders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/folders"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of folders to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "folders deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/folders"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a folder. Content within the folder will be unlinked",
        "summary": "",
        "tags": [
          "folders"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/loginoptions/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "description": "login name of user for whom we request login options",
            "name": "id",
            "type": "string",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "loginoptions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/loginoptions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieves a single resource with the given id from the service.",
        "summary": "",
        "tags": [
          "loginoptions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/impersonate": {
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "Impersonation successful - returns JWT or magic link",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "accessToken": {
                      "type": "string",
                      "description": "JWT token for impersonated user (if method=jwt)"
                    },
                    "magicLink": {
                      "type": "string",
                      "description": "Magic link URL for impersonated user (if method=magiclink)"
                    },
                    "user": {
                      "type": "object",
                      "description": "Impersonated user details"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid user ID or login name"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - Requires administrator permission"
          },
          "404": {
            "description": "User not found"
          },
          "500": {
            "description": "Server error"
          }
        },
        "description": "Impersonate a user and receive authentication token. Requires administrator permission",
        "summary": "",
        "tags": [
          "impersonate"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/impersonate"
              }
            }
          }
        }
      }
    },
    "/reach": {
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "Reach calculation completed successfully. Response shape depends on the requested `type`.",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/reachCalculateReachResponse"
                    },
                    {
                      "$ref": "#/components/schemas/reachOrgUnitBelongResponse"
                    },
                    {
                      "$ref": "#/components/schemas/reachRelevantParamsResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid parameters"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Server error"
          }
        },
        "description": "Calculate reach based on targeting parameters. Supports three query types:\n- `orgUnitBelong`: Count users in specific org units\n- `relevantParams`: Get suggested targeting parameters\n- `calculateReach`: Calculate total reach with all filters applied\n\nIf `contentPool` is present, `calculateReach` behaves as a content-style preview and returns the matching user count, including support for `groups: { selection, exclude }`. Content-style previews always use personal reach semantics even if `completionType=\"person\"` is sent, and they ignore `excludeFromTasks` because that flag is only relevant for task assignment. If `contentPool` is absent, `calculateReach` behaves as a task preview and uses task-assignment rules: users must be active, have completed first login, not be ghost/deleted, and not be excluded from tasks. Personal reach is the default task mode and returns the number of personal tasks that would actually be created. Send `completionType=\"group\"` only when previewing group task completion to return the eligible orgunit count. Task previews do not support excluded groups.",
        "summary": "",
        "tags": [
          "reach"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/reach"
              }
            }
          }
        }
      }
    },
    "/workflow": {
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "Workflow action executed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/workflow"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid action or reference"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - User not authorized for this workflow action"
          },
          "404": {
            "description": "Referenced document not found"
          },
          "500": {
            "description": "Server error"
          }
        },
        "description": "Execute workflow action (approve, reject, etc.). Content approve/reject actions trigger active content hook URLs and send IDs-only payload fields: `_id`, `approvedBy`, and `createdBy`.",
        "summary": "",
        "tags": [
          "workflow"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/workflow"
              }
            }
          }
        }
      }
    },
    "/drive": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Number of results to return per page",
            "name": "$limit",
            "schema": {
              "type": "integer",
              "default": 50
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Continuation token for pagination (returned in previous response)",
            "name": "continuationToken",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Organization unit ID to browse",
            "name": "orgunit",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": true
          },
          {
            "in": "query",
            "description": "Folder path to navigate to. If not provided, returns root level (organization units)",
            "name": "path",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully retrieved drive contents",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/drive"
                      }
                    },
                    "continuationToken": {
                      "type": "string",
                      "description": "Token for fetching next page"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Missing required orgunit parameter"
          },
          "401": {
            "description": "Unauthorized - Invalid or missing authentication"
          },
          "403": {
            "description": "Forbidden - No access to specified organization unit"
          },
          "500": {
            "description": "Server error"
          }
        },
        "description": "Browse drive contents by organization unit and path. Returns files, folders, and child organization units",
        "summary": "",
        "tags": [
          "drive"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "Signed URL generated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "type": "string",
                      "format": "uri",
                      "description": "Pre-signed S3 URL for file download"
                    },
                    "expiresIn": {
                      "type": "integer",
                      "description": "URL expiration time in seconds"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid storageId"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "File not found"
          },
          "500": {
            "description": "Server error"
          }
        },
        "description": "Generate signed URL for downloading a specific drive file",
        "summary": "",
        "tags": [
          "drive"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/drive_sign"
              }
            }
          }
        }
      }
    },
    "/marketplace": {
      "get": {
        "parameters": [
          {
            "description": "Number of results to return",
            "in": "query",
            "name": "$limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of results to skip",
            "in": "query",
            "name": "$skip",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Property to sort results",
            "in": "query",
            "name": "$sort",
            "style": "deepObject",
            "schema": {
              "type": "object"
            }
          },
          {
            "description": "Query parameters to filter",
            "in": "query",
            "name": "filter",
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/marketplace"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of marketplace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/marketplaceList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve all marketplace plugins",
        "summary": "",
        "tags": [
          "marketplace"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "marketplace created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/marketplace"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Add a new plugin to marketplace. **[Admin only]**",
        "summary": "",
        "tags": [
          "marketplace"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/marketplace"
              }
            }
          }
        }
      }
    },
    "/marketplace/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of marketplace to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "marketplace retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/marketplace"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a specific marketplace plugin by ID",
        "summary": "",
        "tags": [
          "marketplace"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of marketplace to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "marketplace retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/marketplace"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire plugin configuration. **[Admin only]**",
        "summary": "",
        "tags": [
          "marketplace"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/marketplace"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of marketplace to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "marketplace retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/marketplace"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update specific plugin fields. **[Admin only]**",
        "summary": "",
        "tags": [
          "marketplace"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/marketplace"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of marketplace to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "marketplace deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/marketplace"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a marketplace plugin. **[Admin only]**",
        "summary": "",
        "tags": [
          "marketplace"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/reports": {
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "Report generated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/reportsList"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid report type or parameters"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - Insufficient permissions to generate reports"
          },
          "500": {
            "description": "Server error"
          }
        },
        "description": "Generate a report based on specified parameters. Supports various report types:\n- Report Types: activeUsersBasedOnLastActivity, contentWeeklyReport, taskMonthlyReport, usersForUsageReport, turnoverRate, adoptionRate, userActivityHeatMap, searchResults, averageResults, averageUseStats\n- Time Intervals (pointType): all, ever, 24h, 7d, 30d, month, never, last12weeks\n\nCommon report types include:\n- `activeUsersBasedOnLastActivity`: User login activity percentages\n- `contentEngagement`: Content view and interaction metrics\n- `taskCompletion`: Task completion rates over time\n- `pointsDistribution`: Gamification points distribution",
        "summary": "",
        "tags": [
          "reports"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/reports"
              }
            }
          }
        }
      }
    },
    "/chat": {
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/chat"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Please use appropriate action and provide value and ref if needed.\n\n        [authenticate]\n         * No data needed, just provide valid JWT token. Returns chatUserId, chatSignature, and appId.\n\n        \n\n\n        [token]\n         * No data needed, just provide valid JWT token.\n\n         * Returns a signed HS256 JWT for TalkJS token-based authentication (sub = chatUserId, 24h expiry).\n\n         * Use this with TalkJS Session.setToken() instead of the legacy signature flow.\n\n        \n\n\n        [removeFromGroup]\n         * value - List of users IDs that should be removed from the group. \n\n         * ref - Reference to the group on whick we need to remove user, this is TalkJS ID. \n\n        \n\n\n        [setNewGroupAdmin]\n         * value - User ID of new group admin. \n\n         * ref - Reference to the group on which we need to change group admin, this is TalkJS ID. \n",
        "summary": "",
        "tags": [
          "chat"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/chat"
              }
            }
          }
        }
      }
    },
    "/externalcontacts": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Search by name (case-insensitive)",
            "name": "name",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of externalcontacts",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/externalcontactsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve all external contacts with search support",
        "summary": "",
        "tags": [
          "externalcontacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "externalcontacts created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/externalcontacts"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new external contact. **[Admin only]**",
        "summary": "",
        "tags": [
          "externalcontacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/externalcontacts"
              }
            }
          }
        }
      }
    },
    "/externalcontacts/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of externalcontacts to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "externalcontacts retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/externalcontacts"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a specific external contact by ID",
        "summary": "",
        "tags": [
          "externalcontacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of externalcontacts to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "externalcontacts retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/externalcontacts"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire external contact. **[Admin only]**",
        "summary": "",
        "tags": [
          "externalcontacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/externalcontacts"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of externalcontacts to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "externalcontacts retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/externalcontacts"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update specific contact fields. **[Admin only]**",
        "summary": "",
        "tags": [
          "externalcontacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/externalcontacts"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of externalcontacts to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "externalcontacts deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/externalcontacts"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete an external contact. **[Admin only]**",
        "summary": "",
        "tags": [
          "externalcontacts"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/lessons": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by training content ID (required)",
            "name": "contentRef",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": true
          },
          {
            "in": "query",
            "description": "Management mode flag - returns all lesson data including answers. **[Admin only]**",
            "name": "management",
            "schema": {
              "type": "boolean"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by lesson creator user ID",
            "name": "createdBy",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "header",
            "description": "Language code for lesson content translation",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of lessons",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/lessonsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve lessons for a specific training. Results include user completion status when accessed by end users",
        "summary": "",
        "tags": [
          "lessons"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "lessons created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/lessons"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new lesson for a training. **[Admin/Content Creator only]**",
        "summary": "",
        "tags": [
          "lessons"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/lessons"
              }
            }
          }
        }
      }
    },
    "/lessons/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for lesson content translation",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "lessons retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/lessons"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single lesson by ID. Answers are hidden from end users",
        "summary": "",
        "tags": [
          "lessons"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of lessons to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "lessons retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/lessons"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire lesson. **[Admin/Content Creator only]**",
        "summary": "",
        "tags": [
          "lessons"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/lessons"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of lessons to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "lessons retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/lessons"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update specific fields of a lesson. **[Admin/Content Creator only]**",
        "summary": "",
        "tags": [
          "lessons"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/lessons"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of lessons to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "lessons deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/lessons"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a lesson. Also removes associated user submissions. **[Admin/Content Creator only]**",
        "summary": "",
        "tags": [
          "lessons"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/lessonsubmissions": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by lesson ID",
            "name": "lessonRef",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by user ID. Non-admins can only filter for themselves",
            "name": "userId",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by submission status",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "passed",
                "failed"
              ]
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of lessonsubmissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/lessonsubmissionsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve lesson submissions. Users can only see their own submissions unless they are admins/trainers",
        "summary": "",
        "tags": [
          "lessonsubmissions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "lessonsubmissions created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/lessonsubmissions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Submit answers for a lesson. Automatically calculates score and determines pass/fail status. The service requires `answers[].value.key` to identify the selected lesson option and cross-checks the submitted numeric `value`. `answers[].value.text` is optional display metadata only and is ignored for validation.",
        "summary": "",
        "tags": [
          "lessonsubmissions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/lessonsubmissions"
              }
            }
          }
        }
      }
    },
    "/lessonsubmissions/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of lessonsubmissions to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "lessonsubmissions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/lessonsubmissions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single lesson submission by ID",
        "summary": "",
        "tags": [
          "lessonsubmissions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of lessonsubmissions to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "lessonsubmissions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/lessonsubmissions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire submission. **[Rarely used - typically users create new submissions for retries]**",
        "summary": "",
        "tags": [
          "lessonsubmissions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/lessonsubmissions"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of lessonsubmissions to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "lessonsubmissions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/lessonsubmissions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update specific fields of a submission. **[Admin only]**",
        "summary": "",
        "tags": [
          "lessonsubmissions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/lessonsubmissions"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of lessonsubmissions to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "lessonsubmissions deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/lessonsubmissions"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a lesson submission. Only creator or admins can delete",
        "summary": "",
        "tags": [
          "lessonsubmissions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/themes": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by default theme",
            "name": "default",
            "schema": {
              "type": "boolean"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of themes",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/themesList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve all themes. Returns default theme first",
        "summary": "",
        "tags": [
          "themes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "themes created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/themes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new theme. **[Admin only]**",
        "summary": "",
        "tags": [
          "themes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/themes"
              }
            }
          }
        }
      }
    },
    "/themes/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of themes to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "themes retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/themes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a specific theme by ID",
        "summary": "",
        "tags": [
          "themes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of themes to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "themes retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/themes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire theme. **[Admin only]**",
        "summary": "",
        "tags": [
          "themes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/themes"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of themes to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "themes retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/themes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update specific theme fields. **[Admin only]**",
        "summary": "",
        "tags": [
          "themes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/themes"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of themes to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "themes deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/themes"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a theme. Cannot delete default theme. **[Admin only]**",
        "summary": "",
        "tags": [
          "themes"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/maintenance/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of maintenance to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "maintenance retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/maintenance"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Get maintenance mode status by ID",
        "summary": "",
        "tags": [
          "maintenance"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/maintenance": {
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "maintenance created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/maintenance"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Enable or disable maintenance mode. Broadcasts to all application instances. **[System user only]**",
        "summary": "",
        "tags": [
          "maintenance"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/maintenance"
              }
            }
          }
        }
      }
    },
    "/trainingprogress": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by training content ID",
            "name": "contentsRef",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by user ID. Non-admins can only filter for themselves",
            "name": "userRef",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by completion status",
            "name": "completed",
            "schema": {
              "type": "boolean"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of trainingprogress",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/trainingprogressList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve training progress records for non-deleted users. Inactive users remain visible; only soft-deleted users are excluded. Users can only see their own progress unless they are admins/trainers.",
        "summary": "",
        "tags": [
          "trainingprogress"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/videos": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by reference ID (content, task, etc.). Use with `type` parameter",
            "name": "refId",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Type of reference entity. Allowed values: contents,flowtemplates,tasktemplates,lessons",
            "name": "type",
            "schema": {
              "type": "string",
              "enum": [
                "contents",
                "flowtemplates",
                "tasktemplates",
                "lessons"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by S3 storage ID",
            "name": "storageId",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by processing status. Allowed values: draft,new,done",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "draft",
                "new",
                "done"
              ]
            },
            "required": false
          },
          {
            "in": "header",
            "description": "Language code to filter videos by language",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of videos",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/videosList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve videos with optional filtering by reference, type, or language",
        "summary": "",
        "tags": [
          "videos"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "videos created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/videos"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create video metadata record after S3 upload. Triggers video processing pipeline. Supports multi-create for batch operations",
        "summary": "",
        "tags": [
          "videos"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/videos"
                  },
                  {
                    "type": "array",
                    "items": {
                      "$ref": "#/components/schemas/videos"
                    }
                  }
                ]
              }
            }
          }
        }
      },
      "put": {
        "parameters": [],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/videosList"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Updates multiple resources.",
        "summary": "",
        "tags": [
          "videos"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/videosList"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "description": "Query parameters to filter",
            "in": "query",
            "name": "filter",
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/videos"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/videosList"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Updates multiple resources queried by given filters.",
        "summary": "",
        "tags": [
          "videos"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/videos"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "description": "Query parameters to filter",
            "in": "query",
            "name": "filter",
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/videos"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/videosList"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Removes multiple resources queried by given filters.",
        "summary": "",
        "tags": [
          "videos"
        ],
        "security": []
      }
    },
    "/videos/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of videos to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "videos retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/videos"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single video by ID with processing status",
        "summary": "",
        "tags": [
          "videos"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of videos to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "videos retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/videos"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire video record. **[Internal only]**",
        "summary": "",
        "tags": [
          "videos"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/videos"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of videos to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "videos retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/videos"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update video metadata or processing status. **[Internal only]**",
        "summary": "",
        "tags": [
          "videos"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/videos"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of videos to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "videos deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/videos"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete video metadata and trigger S3 cleanup. Supports multi-delete for batch operations",
        "summary": "",
        "tags": [
          "videos"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/automaticflows": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Search flow name (partial match)",
            "name": "name[$regex]",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by exact name",
            "name": "name",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by active status",
            "name": "active",
            "schema": {
              "type": "boolean"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of automaticflows",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/automaticflowsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve all automatic flows with optional name filtering",
        "summary": "",
        "tags": [
          "automaticflows"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "automaticflows created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/automaticflows"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new automatic flow with template sequence. **[Admin only]**",
        "summary": "",
        "tags": [
          "automaticflows"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/automaticflows"
              }
            }
          }
        }
      }
    },
    "/automaticflows/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of automaticflows to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "automaticflows retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/automaticflows"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single automatic flow by ID",
        "summary": "",
        "tags": [
          "automaticflows"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of automaticflows to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "automaticflows retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/automaticflows"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire flow configuration. **[Admin only]**",
        "summary": "",
        "tags": [
          "automaticflows"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/automaticflows"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of automaticflows to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "automaticflows retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/automaticflows"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update specific fields of a flow. **[Admin only]**",
        "summary": "",
        "tags": [
          "automaticflows"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/automaticflows"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of automaticflows to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "automaticflows deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/automaticflows"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete an automatic flow. Does not affect already created content/tasks. **[Admin only]**",
        "summary": "",
        "tags": [
          "automaticflows"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/flowtemplates": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by flow reference ID",
            "name": "flowRef",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by active status",
            "name": "active",
            "schema": {
              "type": "boolean"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of flowtemplates",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/flowtemplatesList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve all flow templates with optional filtering",
        "summary": "",
        "tags": [
          "flowtemplates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "flowtemplates created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/flowtemplates"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new flow template with targeting and scheduling. **[Admin only]**",
        "summary": "",
        "tags": [
          "flowtemplates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/flowtemplates"
              }
            }
          }
        }
      }
    },
    "/flowtemplates/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of flowtemplates to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "flowtemplates retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/flowtemplates"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single flow template by ID",
        "summary": "",
        "tags": [
          "flowtemplates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of flowtemplates to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "flowtemplates retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/flowtemplates"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire flow template configuration. **[Admin only]**",
        "summary": "",
        "tags": [
          "flowtemplates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/flowtemplates"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of flowtemplates to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "flowtemplates retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/flowtemplates"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update specific fields of a flow template. **[Admin only]**",
        "summary": "",
        "tags": [
          "flowtemplates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/flowtemplates"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of flowtemplates to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "flowtemplates deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/flowtemplates"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a flow template. Does not affect already generated content/tasks. **[Admin only]**",
        "summary": "",
        "tags": [
          "flowtemplates"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/translationservice": {
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "Translation added/updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean",
                      "description": "Whether translation was successful"
                    },
                    "entityId": {
                      "type": "string",
                      "description": "ID of the translated entity"
                    },
                    "language": {
                      "type": "string",
                      "description": "Language code that was translated"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid entity type or missing required fields"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - User not authorized to translate this entity"
          },
          "404": {
            "description": "Entity not found"
          },
          "500": {
            "description": "Server error"
          }
        },
        "description": "Add or update translations for various entities. Supports:\n- Content (news, events, polls, forms, etc.)\n- Tasks and task templates\n- Groups, folders, and other translatable entities\n\nAutomatically tracks translator and timestamp in translators array",
        "summary": "",
        "tags": [
          "translationservice"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/translationservice"
              }
            }
          }
        }
      }
    },
    "/translationservice/{id}": {
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of translationservice to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/translationservice"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Updates the resource identified by id using data.",
        "summary": "",
        "tags": [
          "translationservice"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/translationservice"
              }
            }
          }
        }
      }
    },
    "/feed/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": true,
            "description": "Content pool ID to generate feed for"
          },
          {
            "in": "query",
            "description": "Filter by organization unit IDs (comma-separated or multiple params)",
            "name": "orgunits",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by group IDs (comma-separated or multiple params)",
            "name": "groups",
            "schema": {
              "type": "array",
              "items": {
                "type": "string"
              }
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Language code for content (e.g., \"en\", \"nl\", \"de\")",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "If true, excludes specified groups instead of including them",
            "name": "excludeGroups",
            "schema": {
              "type": "boolean"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Number of content items to include in feed (max: 50)",
            "name": "limit",
            "schema": {
              "type": "integer",
              "maximum": 50,
              "default": 20
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "Successfully generated RSS feed",
            "content": {
              "application/rss+xml": {
                "schema": {
                  "type": "string",
                  "description": "RSS 2.0 XML formatted feed with content items"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - Invalid content pool ID or parameters"
          },
          "404": {
            "description": "Content pool not found"
          },
          "500": {
            "description": "Server error"
          }
        },
        "description": "Generate RSS feed for a specific content pool with optional filtering. Returns XML formatted as RSS 2.0",
        "summary": "",
        "tags": [
          "feed"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/eventattendees": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by event content ID (required for practical use)",
            "name": "contentRef",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by attendance status",
            "name": "status",
            "schema": {
              "type": "string",
              "enum": [
                "going",
                "notgoing",
                "maybe"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by user ID",
            "name": "createdBy",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of eventattendees",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/eventattendeesList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve attendee list for an event. Requires content reference (event ID)",
        "summary": "",
        "tags": [
          "eventattendees"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "eventattendees created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/eventattendees"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "RSVP to an event. Only one record per event/user combination. Users can only RSVP for themselves",
        "summary": "",
        "tags": [
          "eventattendees"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/eventattendees"
              }
            }
          }
        }
      }
    },
    "/eventattendees/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of eventattendees to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "eventattendees retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/eventattendees"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single attendee record by ID",
        "summary": "",
        "tags": [
          "eventattendees"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of eventattendees to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/eventattendees"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Updates the resource identified by id using data.",
        "summary": "",
        "tags": [
          "eventattendees"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/eventattendees"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of eventattendees to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "eventattendees retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/eventattendees"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update RSVP status. Users can only update their own status",
        "summary": "",
        "tags": [
          "eventattendees"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "going",
                      "notgoing",
                      "maybe"
                    ],
                    "description": "Updated attendance status"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of eventattendees to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "eventattendees deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/eventattendees"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Remove RSVP. Users can only remove their own RSVP",
        "summary": "",
        "tags": [
          "eventattendees"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/systemtasks": {
      "get": {
        "parameters": [
          {
            "description": "Number of results to return",
            "in": "query",
            "name": "$limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of results to skip",
            "in": "query",
            "name": "$skip",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Property to sort results",
            "in": "query",
            "name": "$sort",
            "style": "deepObject",
            "schema": {
              "type": "object"
            }
          },
          {
            "description": "Query parameters to filter",
            "in": "query",
            "name": "filter",
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/systemtasks"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of systemtasks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/systemtasksList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve all system task definitions. **[Admin only]**",
        "summary": "",
        "tags": [
          "systemtasks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "systemtasks created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/systemtasks"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new system task with query definition. **[Admin only]**",
        "summary": "",
        "tags": [
          "systemtasks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/systemtasks"
              }
            }
          }
        }
      }
    },
    "/systemtasks/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of systemtasks to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "systemtasks retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/systemtasks"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single system task definition by ID. **[Admin only]**",
        "summary": "",
        "tags": [
          "systemtasks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of systemtasks to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "systemtasks retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/systemtasks"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire system task definition. **[Admin only]**",
        "summary": "",
        "tags": [
          "systemtasks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/systemtasks"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of systemtasks to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "systemtasks retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/systemtasks"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update specific fields of a system task. **[Admin only]**",
        "summary": "",
        "tags": [
          "systemtasks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/systemtasks"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of systemtasks to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "systemtasks deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/systemtasks"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete a system task definition. **[Admin only]**",
        "summary": "",
        "tags": [
          "systemtasks"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/keymetrics": {
      "get": {
        "parameters": [
          {
            "description": "Number of results to return",
            "in": "query",
            "name": "$limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of results to skip",
            "in": "query",
            "name": "$skip",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Property to sort results",
            "in": "query",
            "name": "$sort",
            "style": "deepObject",
            "schema": {
              "type": "object"
            }
          },
          {
            "description": "Query parameters to filter",
            "in": "query",
            "name": "filter",
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/keymetrics"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/keymetricsPagination"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Call to one of key metrics service queries",
        "summary": "",
        "tags": [
          "keymetrics"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/healthcheck": {
      "get": {
        "parameters": [
          {
            "description": "Number of results to return",
            "in": "query",
            "name": "$limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of results to skip",
            "in": "query",
            "name": "$skip",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Property to sort results",
            "in": "query",
            "name": "$sort",
            "style": "deepObject",
            "schema": {
              "type": "object"
            }
          },
          {
            "description": "Query parameters to filter",
            "in": "query",
            "name": "filter",
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/healthcheck"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/healthcheckList"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Retrieves a list of all resources from the service.",
        "summary": "",
        "tags": [
          "healthcheck"
        ],
        "security": []
      }
    },
    "/sentimentanalysis": {
      "post": {
        "parameters": [
          {
            "in": "query",
            "description": "Number of results to return",
            "name": "$limit",
            "type": "integer",
            "required": false
          },
          {
            "in": "query",
            "description": "Number of results to skip",
            "name": "$skip",
            "type": "integer",
            "required": false
          },
          {
            "in": "query",
            "description": "Property to sort results",
            "name": "$sort",
            "type": "string",
            "required": false
          },
          {
            "in": "query",
            "description": "Select list of fields for results",
            "name": "$select[]",
            "collectionFormat": "multi",
            "type": "array",
            "required": false,
            "items": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "description": "Disable translation filter for this service (if present)",
            "name": "disableTranslationsFilter",
            "type": "boolean",
            "required": false
          },
          {
            "in": "body",
            "name": "body",
            "required": true,
            "schema": {
              "$ref": "#/components/schemas/sentimentanalysis"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "sentimentanalysis retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/sentimentanalysis"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Creates a new resource with data.",
        "summary": "",
        "tags": [
          "sentimentanalysis"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/sentimentanalysis"
              }
            }
          }
        }
      }
    },
    "/contentsview": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for content title and message",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Search term for full-text search in content titles",
            "name": "searchTerm",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by content type, including `externalNotificationContent` for custom external push content items",
            "name": "contentType",
            "schema": {
              "type": "string",
              "enum": [
                "news",
                "event",
                "poll",
                "manual",
                "faq",
                "form",
                "training",
                "externalNotificationContent"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by content pool ID",
            "name": "contentPool",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by folder ID. Use `null` as string to filter content without folders",
            "name": "folder",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "When set to `true` together with `folder`, returns all content items stored in that accessible folder without applying the normal audience visibility filters for the child items. This affects `find` only and does not grant additional `get`, `patch`, or `remove` access.",
            "name": "contentsInFolder",
            "schema": {
              "type": "string",
              "enum": [
                "true",
                "false"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by derived form webhook status. Supports `active`, `inactive`, and `none`. The legacy `hookurls` filter alias is also accepted, including inside `$and` filters.",
            "name": "webhookStatus",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "none"
              ]
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of contentsview",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentsviewList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Query contents with denormalized data for improved performance. Supports search, filtering, and `$sort[webhookStatus]` for the derived form webhook status. The legacy `hookurls` alias is also accepted for filtering and sorting.",
        "summary": "",
        "tags": [
          "contentsview"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentsview"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Creates a new resource with data.",
        "summary": "",
        "tags": [
          "contentsview"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contentsview"
              }
            }
          }
        }
      }
    },
    "/contentsview/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "header",
            "description": "Language code for content title and message",
            "name": "lang",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "contentsview retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentsview"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a single content from the view collection by ID",
        "summary": "",
        "tags": [
          "contentsview"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of contentsview to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentsview"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Updates the resource identified by id using data.",
        "summary": "",
        "tags": [
          "contentsview"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contentsview"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of contentsview to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentsview"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Updates the resource identified by id using data.",
        "summary": "",
        "tags": [
          "contentsview"
        ],
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/contentsview"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of contentsview to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/contentsview"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Removes the resource with id.",
        "summary": "",
        "tags": [
          "contentsview"
        ],
        "security": []
      }
    },
    "/pages": {
      "get": {
        "parameters": [
          {
            "description": "Number of results to return",
            "in": "query",
            "name": "$limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of results to skip",
            "in": "query",
            "name": "$skip",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Property to sort results",
            "in": "query",
            "name": "$sort",
            "style": "deepObject",
            "schema": {
              "type": "object"
            }
          },
          {
            "description": "Query parameters to filter",
            "in": "query",
            "name": "filter",
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/pages"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of pages",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pagesList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve page configuration. Returns pages filtered by current user permissions unless user has navigation.admin role",
        "summary": "",
        "tags": [
          "pages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "pages created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pages"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create page configuration. **[Admin only]**",
        "summary": "",
        "tags": [
          "pages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pages"
              }
            }
          }
        }
      }
    },
    "/pages/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of pages to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "pages retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pages"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve specific page configuration by ID",
        "summary": "",
        "tags": [
          "pages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of pages to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "pages retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pages"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire page configuration. Triggers pagesChanged event. **[Admin only]**",
        "summary": "",
        "tags": [
          "pages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pages"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of pages to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "pages retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pages"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update specific fields in page configuration. Triggers pagesChanged event. **[Admin only]**",
        "summary": "",
        "tags": [
          "pages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pages"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of pages to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "pages deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pages"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete page configuration. **[Admin only]**",
        "summary": "",
        "tags": [
          "pages"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/widgets": {
      "get": {
        "parameters": [
          {
            "description": "Number of results to return",
            "in": "query",
            "name": "$limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of results to skip",
            "in": "query",
            "name": "$skip",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Property to sort results",
            "in": "query",
            "name": "$sort",
            "style": "deepObject",
            "schema": {
              "type": "object"
            }
          },
          {
            "description": "Query parameters to filter",
            "in": "query",
            "name": "filter",
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/widgets"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of widgets",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/widgetsList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve widget configuration. Returns pages filtered by current user permissions unless user has navigation.admin role",
        "summary": "",
        "tags": [
          "widgets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "widgets created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/widgets"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create widget configuration. **[Admin only]** `relatedTags` accepts either tag ids or objects with a `text` field; object entries are normalized to tag references before save.",
        "summary": "",
        "tags": [
          "widgets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/widgets"
              }
            }
          }
        }
      }
    },
    "/widgets/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of widgets to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "widgets retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/widgets"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve specific widget configuration by ID",
        "summary": "",
        "tags": [
          "widgets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of widgets to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "widgets retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/widgets"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire widget configuration. Triggers widgetsChanged event. **[Admin only]** `relatedTags` accepts either tag ids or objects with a `text` field; object entries are normalized to tag references before save.",
        "summary": "",
        "tags": [
          "widgets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/widgets"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of widgets to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "widgets retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/widgets"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update specific fields in widget configuration. Triggers widgetsChanged event. **[Admin only]** `relatedTags` accepts either tag ids or objects with a `text` field; object entries are normalized to tag references before save.",
        "summary": "",
        "tags": [
          "widgets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/widgets"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of widgets to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "widgets deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/widgets"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete widget configuration. **[Admin only]**",
        "summary": "",
        "tags": [
          "widgets"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/welcomewidget": {
      "post": {
        "parameters": [],
        "responses": {
          "200": {
            "description": "Welcome widget data generated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/welcomewidgetList"
                }
              }
            }
          },
          "400": {
            "description": "Bad request - Invalid widget type or missing required fields"
          },
          "401": {
            "description": "Unauthorized"
          },
          "500": {
            "description": "Server error"
          }
        },
        "description": "Generate welcome widget data with unseen content for the authenticated user. Returns a paginated list of unseen content that matches the user visibility rules.",
        "summary": "",
        "tags": [
          "welcomewidget"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/welcomewidget"
              }
            }
          }
        }
      }
    },
    "/download": {
      "get": {
        "parameters": [
          {
            "description": "Number of results to return",
            "in": "query",
            "name": "$limit",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Number of results to skip",
            "in": "query",
            "name": "$skip",
            "schema": {
              "type": "integer"
            }
          },
          {
            "description": "Property to sort results",
            "in": "query",
            "name": "$sort",
            "style": "deepObject",
            "schema": {
              "type": "object"
            }
          },
          {
            "description": "Query parameters to filter",
            "in": "query",
            "name": "filter",
            "style": "form",
            "explode": true,
            "schema": {
              "$ref": "#/components/schemas/download"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of download",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/downloadList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve all download pages. **[Admin only]**",
        "summary": "",
        "tags": [
          "download"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "download created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/download"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create new download page with unique path and URL. **[Admin only]**",
        "summary": "",
        "tags": [
          "download"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/download"
              }
            }
          }
        }
      }
    },
    "/download/{id}": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Download page path for lookup",
            "name": "path",
            "schema": {
              "type": "string"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "download retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/download"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve download page by ID or path. **[Public access]** No authentication required for GET",
        "summary": "",
        "tags": [
          "download"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of download to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "download retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/download"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Replace entire download page. **[Admin only]**",
        "summary": "",
        "tags": [
          "download"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/download"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of download to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "download retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/download"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Update download page fields. downloadPageUrl cannot be changed once set. **[Admin only]**",
        "summary": "",
        "tags": [
          "download"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/download"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of download to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "download deleted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/download"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Delete download page by ID. **[Admin only]**",
        "summary": "",
        "tags": [
          "download"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/activitylogs": {
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "activitylogs created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/activitylogs"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create a new activity log entry. The request body can be empty - the service automatically populates `userId`, `connectionOrigin`, and `orgunits` from the authenticated user context and request headers.\n\nAfter creating the activity log, the service automatically updates the `lastActivity` timestamp in the users collection.",
        "summary": "",
        "tags": [
          "activitylogs"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "Empty object or additional metadata (all fields are auto-populated by the server)",
                "properties": {}
              }
            }
          }
        }
      }
    },
    "/pushnotificationsettings": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Number of results to return",
            "name": "$limit",
            "type": "integer",
            "required": false
          },
          {
            "in": "query",
            "description": "Number of results to skip",
            "name": "$skip",
            "type": "integer",
            "required": false
          },
          {
            "in": "query",
            "description": "Property to sort results",
            "name": "$sort",
            "type": "string",
            "required": false
          },
          {
            "in": "query",
            "description": "Select list of fields for results",
            "name": "$select[]",
            "collectionFormat": "multi",
            "type": "array",
            "required": false,
            "items": {
              "type": "string"
            }
          },
          {
            "in": "query",
            "description": "Disable translation filter for this service (if present)",
            "name": "disableTranslationsFilter",
            "type": "boolean",
            "required": false
          },
          {
            "in": "query",
            "description": "Client ID",
            "name": "cid",
            "type": "integer",
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "pushnotificationsettings retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushnotificationsettings"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Get client specific translations overrides for push notifications",
        "summary": "",
        "tags": [
          "pushnotificationsettings"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushnotificationsettings"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Creates a new resource with data.",
        "summary": "",
        "tags": [
          "pushnotificationsettings"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pushnotificationsettings"
              }
            }
          }
        }
      }
    },
    "/pushnotificationsettings/{_id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of pushnotificationsettings to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushnotificationsettings"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Retrieves a single resource with the given id from the service.",
        "summary": "",
        "tags": [
          "pushnotificationsettings"
        ],
        "security": []
      },
      "put": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of pushnotificationsettings to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushnotificationsettings"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Updates the resource identified by id using data.",
        "summary": "",
        "tags": [
          "pushnotificationsettings"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pushnotificationsettings"
              }
            }
          }
        }
      },
      "patch": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of pushnotificationsettings to update",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushnotificationsettings"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Updates the resource identified by id using data.",
        "summary": "",
        "tags": [
          "pushnotificationsettings"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/pushnotificationsettings"
              }
            }
          }
        }
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "_id",
            "description": "ID of pushnotificationsettings to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/pushnotificationsettings"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Removes the resource with id.",
        "summary": "",
        "tags": [
          "pushnotificationsettings"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/audittrail": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "description": "Filter by user ID who performed the action",
            "name": "userId",
            "schema": {
              "type": "string",
              "format": "objectId"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by object ID that was modified",
            "name": "objectId",
            "schema": {
              "type": "string"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by object type",
            "name": "objectType",
            "schema": {
              "type": "string",
              "enum": [
                "configs",
                "contents",
                "flowtemplates",
                "groups",
                "orgattributes",
                "orgchart",
                "pages",
                "tasks",
                "tasktemplates",
                "users",
                "widgets",
                "contentpools",
                "contentpooltypes",
                "folders",
                "roles"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter by change type",
            "name": "changeType",
            "schema": {
              "type": "string",
              "enum": [
                "Create",
                "Update",
                "Patch",
                "Remove"
              ]
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter from specific date",
            "name": "createdAt[$gte]",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false
          },
          {
            "in": "query",
            "description": "Filter from specific date",
            "name": "updatedAt[$gte]",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "required": false
          }
        ],
        "responses": {
          "200": {
            "description": "List of audittrail",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/audittrailList"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve audit trail entries with filtering. **[Admin only]** Useful for compliance and security auditing",
        "summary": "",
        "tags": [
          "audittrail"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "audittrail created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/audittrail"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Create audit trail entry. **[Internal only - managed by hooks]** Do not use directly",
        "summary": "",
        "tags": [
          "audittrail"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/audittrail"
              }
            }
          }
        }
      }
    },
    "/audittrail/{id}": {
      "get": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of audittrail to return",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "audittrail retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/audittrail"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Retrieve a specific audit trail entry by ID. **[Admin only]**",
        "summary": "",
        "tags": [
          "audittrail"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "delete": {
        "parameters": [
          {
            "in": "path",
            "name": "id",
            "description": "ID of audittrail to remove",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "success",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/audittrail"
                }
              }
            }
          },
          "401": {
            "description": "not authenticated"
          },
          "404": {
            "description": "not found"
          },
          "500": {
            "description": "general error"
          }
        },
        "description": "Removes the resource with id.",
        "summary": "",
        "tags": [
          "audittrail"
        ],
        "security": []
      }
    },
    "/ai-assistant": {
      "get": {
        "parameters": [
          {
            "in": "query",
            "name": "type",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "messages",
                "analytics",
                "analytics-categories",
                "analytics-subcategories",
                "analytics-unanswered"
              ]
            },
            "description": "Determines which upstream endpoint to call."
          },
          {
            "in": "query",
            "name": "startDate",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Filter results from this date (inclusive). Applies to both `messages` and `analytics`.",
            "example": "2026-01-01T00:00:00Z"
          },
          {
            "in": "query",
            "name": "endDate",
            "required": false,
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "description": "Filter results up to this date (inclusive). Applies to both `messages` and `analytics`.",
            "example": "2026-03-31T23:59:59Z"
          },
          {
            "in": "query",
            "name": "reaction",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "like",
                "dislike"
              ]
            },
            "description": "Filter messages by user reaction. Only applies when `type=messages`."
          },
          {
            "in": "query",
            "name": "limit",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 10
            },
            "description": "Maximum number of records to return. Applies to `messages`, `analytics-subcategories`, and `analytics-unanswered`. Defaults to 10."
          },
          {
            "in": "query",
            "name": "skip",
            "required": false,
            "schema": {
              "type": "integer",
              "default": 0
            },
            "description": "Number of records to skip (for pagination). Applies to `messages`, `analytics-subcategories`, and `analytics-unanswered`. Defaults to 0."
          },
          {
            "in": "query",
            "name": "categoryId",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Category ObjectId as a string. Required for `analytics-subcategories` and `analytics-unanswered`.",
            "example": "6869e0c3f4e7f3f4f1a1b2c3"
          }
        ],
        "responses": {
          "200": {
            "description": "ai-assistant retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ai-assistant"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Query the MCP Agent API. The `type` parameter determines which upstream endpoint is called.\n\n- `type=messages` → proxies to `GET /messages`\n- `type=analytics` → proxies to `GET /analytics/summary`\n- `type=analytics-categories` → proxies to `GET /analytics/categories`\n- `type=analytics-subcategories` → proxies to `GET /analytics/subcategories`\n- `type=analytics-unanswered` → proxies to `GET /analytics/unanswered`",
        "summary": "",
        "tags": [
          "ai-assistant"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ]
      },
      "post": {
        "parameters": [],
        "responses": {
          "201": {
            "description": "ai-assistant created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ai-assistant"
                }
              }
            }
          },
          "400": {
            "description": "Request validation failed, consult response body for more details"
          },
          "401": {
            "description": "User credentials not provided, invalid for the action, consult response body for more details"
          },
          "405": {
            "description": "Method not allowed, this method is not available for this service."
          },
          "500": {
            "description": "System error, consult server log"
          }
        },
        "description": "Generate multiple-choice field from a PDF file stored in S3 using AI.\n\nThe service fetches the PDF from S3, extracts its text, and uses an LLM to generate the specified number of questions. The response contains a `questions.fields` array that is ready to be used directly as lesson question fields.\n\n**Language**: Generated questions and answers are written in the authenticated user's preferred language.",
        "summary": "",
        "tags": [
          "ai-assistant"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "storageId",
                  "numQuestions",
                  "numAnswersPerQuestion",
                  "pointsPerAnswer"
                ],
                "properties": {
                  "storageId": {
                    "type": "string",
                    "description": "Path to the PDF file within the S3 bucket (e.g. live/attachment/dev/contents/123/file.pdf)",
                    "example": "live/attachment/dev/contents/68822541a277562210a5f335/TypeScriptNotes.pdf"
                  },
                  "numQuestions": {
                    "type": "integer",
                    "description": "Number of questions to generate",
                    "minimum": 1,
                    "example": 5
                  },
                  "numAnswersPerQuestion": {
                    "type": "integer",
                    "description": "Number of answer options per question",
                    "minimum": 2,
                    "example": 4
                  },
                  "pointsPerAnswer": {
                    "type": "integer",
                    "description": "Points awarded for each correct answer",
                    "minimum": 1,
                    "example": 10
                  },
                  "insideSection": {
                    "type": "boolean",
                    "description": "Whether the generated questions will be placed inside a section. Defaults to false for top level fields.",
                    "default": false,
                    "example": false
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "openapi": "3.0.3",
  "x-tagGroups": [
    {
      "name": "Services",
      "tags": [
        "activitylogs",
        "ai-assistant",
        "attachmentdetails",
        "audittrail",
        "authManagement",
        "authchat",
        "authentication",
        "automaticflows",
        "awstrigger",
        "badges",
        "blacklisttoken",
        "chat",
        "chatgroups",
        "comments",
        "configs",
        "contentpools",
        "contentpooltypes",
        "contents",
        "contentsview",
        "contentviews",
        "download",
        "drive",
        "eventattendees",
        "exports",
        "externalcontacts",
        "feed",
        "flowtemplates",
        "folders",
        "formvalues",
        "groups",
        "healthcheck",
        "impersonate",
        "keymetrics",
        "lessons",
        "lessonsubmissions",
        "levels",
        "loginoptions",
        "maintenance",
        "marketplace",
        "notifications",
        "orgattributecategories",
        "orgattributes",
        "orgchart",
        "orgtypes",
        "pages",
        "permissions",
        "pushmessages",
        "pushmessagesqueue",
        "pushnotificationsettings",
        "pushsubscriptions",
        "reach",
        "reactions",
        "reports",
        "rewards",
        "roles",
        "search",
        "sentimentanalysis",
        "signurl",
        "systemtasks",
        "tags",
        "talkjshook",
        "tasks",
        "tasktemplates",
        "tasktemplatesview",
        "themes",
        "trainingprogress",
        "translate",
        "translations",
        "translationservice",
        "users",
        "userspointsbalances",
        "usersrewards",
        "version",
        "videos",
        "votes",
        "welcomewidget",
        "widgets",
        "workflow"
      ]
    }
  ],
  "x-docsMetadata": {
    "schemaVersion": 1,
    "lastUpdated": "2026-07-09T12:37:35.000Z",
    "formattedLastUpdated": "09 Jul 2026, 12:37 UTC",
    "latestSummary": "Documented externalNotificationContent usage and push text behavior across content-related API docs.",
    "latestNotes": [
      "Added externalNotificationContent to contentType enum documentation where supported by content services.",
      "Clarified that externalNotificationContent is intended for custom external push scenarios.",
      "Documented push text mapping for externalNotificationContent: title uses content creator full name and body uses content title."
    ],
    "latestScope": [
      "api-docs",
      "contents",
      "contentsview",
      "search",
      "contentpooltypes",
      "swaggerdoc"
    ],
    "changelogUrl": "/api-docs/changelog/",
    "entries": [
      {
        "date": "2026-07-09T12:37:35.000Z",
        "summary": "Documented externalNotificationContent usage and push text behavior across content-related API docs.",
        "notes": [
          "Added externalNotificationContent to contentType enum documentation where supported by content services.",
          "Clarified that externalNotificationContent is intended for custom external push scenarios.",
          "Documented push text mapping for externalNotificationContent: title uses content creator full name and body uses content title."
        ],
        "scope": [
          "api-docs",
          "contents",
          "contentsview",
          "search",
          "contentpooltypes",
          "swaggerdoc"
        ]
      },
      {
        "date": "2026-07-08T10:38:38.354Z",
        "summary": "Expanded aiassistant API docs for analytics category, subcategory, and unanswered query variants.",
        "notes": [
          "Documented new find type values for analytics categories, subcategories, and unanswered topics.",
          "Added categoryId query parameter usage and clarified pagination parameter applicability across analytics variants.",
          "Extended OpenAPI response schema coverage for categories, subcategories, and unanswered analytics payloads."
        ],
        "scope": [
          "aiassistant",
          "api-docs"
        ]
      },
      {
        "date": "2026-07-08T09:41:58.000Z",
        "summary": "Clarified imported-field restrictions and create defaults for groups, orgattributes, and orgattributecategories.",
        "notes": [
          "Documented that the imported field defaults to false on create when omitted.",
          "Documented that imported can only be changed by keephubAdmin or the system user.",
          "Marked update behavior as internal-only where applicable."
        ],
        "scope": [
          "api-docs",
          "groups",
          "orgattributes",
          "orgattributecategories"
        ]
      },
      {
        "date": "2026-07-07T09:27:43.537Z",
        "summary": "Clarified users patch permissions and aligned users schema docs for loginMethod/imported fields.",
        "notes": [
          "Updated users patch operation docs to state imported field access for keephubAdmin and system.",
          "Added users.imported schema property and aligned loginMethod access wording with current permissions.",
          "Removed readOnly from users.loginMethod and users.imported so privileged patch behavior matches the shared users schema."
        ],
        "scope": [
          "api-docs",
          "users"
        ]
      },
      {
        "date": "2026-07-03T12:23:55.585Z",
        "summary": "Added top-level content hookurls for workflow approval/rejection callbacks and clarified webhook status derivation in contents and workflow API docs.",
        "notes": [
          "Added top-level hookurls field to abstractContent schema (array of { url, active }) used for workflow content approval/rejection callbacks; payload sends _id, approvedBy, and createdBy.",
          "Updated form.hookurls description to clarify it is a dedicated form-model abstraction separate from top-level content hookurls.",
          "Updated contents find operation and webhookStatus query param description: top-level hookurls is now the primary source; form.hookurls serves as fallback for form content.",
          "Updated workflow create operation to document that approve/reject actions trigger active content hook URLs with IDs-only payload."
        ],
        "scope": [
          "contents",
          "workflow",
          "swaggerdoc",
          "api-docs"
        ]
      },
      {
        "date": "2026-07-03T12:23:55.585Z",
        "summary": "Added top-level content hookurls for workflow approval/rejection callbacks and clarified webhook status derivation in contents and workflow API docs.",
        "notes": [
          "Added top-level hookurls field to abstractContent schema (array of { url, active }) used for workflow content approval/rejection callbacks; payload sends _id, approvedBy, and createdBy.",
          "Updated form.hookurls description to clarify it is a dedicated form-model abstraction separate from top-level content hookurls.",
          "Updated contents find operation and webhookStatus query param description: top-level hookurls is now the primary source; form.hookurls serves as fallback for form content.",
          "Updated workflow create operation to document that approve/reject actions trigger active content hook URLs with IDs-only payload."
        ],
        "scope": [
          "contents",
          "workflow",
          "swaggerdoc",
          "api-docs"
        ]
      },
      {
        "date": "2026-07-03T08:58:51.490Z",
        "summary": "Refreshed Keephub API docs layout and styling for improved navigation and changelog presentation.",
        "notes": [
          "Updated the Redoc template, theme styling, and generated docs header and changelog presentation."
        ],
        "scope": [
          "generateDocumentation",
          "api-docs"
        ]
      },
      {
        "date": "2026-07-02T12:39:39.135Z",
        "summary": "Updated audittrail Swagger docs to include roles in objectType enum filters.",
        "notes": [
          "Added roles as an accepted objectType value in audittrail query documentation."
        ],
        "scope": [
          "audittrail",
          "api-docs"
        ]
      },
      {
        "date": "2026-06-25T09:09:18.906Z",
        "summary": "Refreshed Keephub API docs styling for smoother sidebar navigation, search, buttons, and response panels.",
        "notes": [
          "Applied a visual polish pass across the sidebar, navigation, search, button treatments, and response panels."
        ],
        "scope": [
          "api-docs"
        ]
      },
      {
        "date": "2026-06-24T13:00:00.000Z",
        "summary": "Test changelog rendering locally",
        "scope": [
          "api-docs"
        ]
      },
      {
        "date": "2026-06-24T12:00:00.000Z",
        "summary": "Initialized the API docs metadata source for last-updated timestamps and changelog tracking.",
        "notes": [
          "Added the canonical docs metadata JSON source under documentation/.",
          "Defined the initial public changelog entry for the docs metadata workflow."
        ],
        "scope": [
          "generateDocumentation",
          "swaggerInitConf",
          "api-docs"
        ]
      }
    ]
  }
}