{
  "openapi": "3.1.0",
  "info": {
    "title": "Dashera agent API",
    "version": "1",
    "description": "Every organization route a Dashera agent key may call, generated from the connector's endpoint catalog. Requests carry the key as Authorization: Bearer <key>. The MCP server at /api/mcp offers the same through named tools; the tool list is at /agents/tools.json."
  },
  "servers": [
    {
      "url": "https://dashera.com"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "security": [
    {
      "bearer": []
    }
  ],
  "paths": {
    "/api/workspaces/{workspaceId}/activity": {
      "get": {
        "summary": "Cursor-paginated recent-activity feed for the whole workspace",
        "x-dashera-module": "any (answers from the modules you hold)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "actorUserId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "kinds",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "after",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/data-imports": {
      "get": {
        "summary": "Import history: recent imports of the kinds this caller may import, newest first, with counts, Undo and background progress (kind, limit)",
        "x-dashera-module": "any (answers from the modules you hold)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/data-imports/{runId}": {
      "get": {
        "summary": "One import run: status, counts, background progress (rows done, rate, time left, paused) and which of Pause, Resume, Cancel, Undo apply",
        "x-dashera-module": "any (answers from the modules you hold)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/data-imports/{runId}/cancel": {
      "post": {
        "summary": "Cancel a background import for good; what it saved stays until Undo",
        "x-dashera-module": "any (answers from the modules you hold)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/data-imports/{runId}/finish": {
      "post": {
        "summary": "Finish an import started in the request with the lines saved (and new ids) and the lines that failed; the one who started it only",
        "x-dashera-module": "any (answers from the modules you hold)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "saved": {},
                  "failed": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/data-imports/{runId}/pause": {
      "post": {
        "summary": "Pause a background import after its current batch; it keeps its place (optional reason)",
        "x-dashera-module": "any (answers from the modules you hold)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/data-imports/{runId}/problems": {
      "get": {
        "summary": "The error file: refused rows as they were plus a Problem column; csv (default), xlsx, or format=json",
        "x-dashera-module": "any (answers from the modules you hold)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/data-imports/{runId}/resume": {
      "post": {
        "summary": "Resume a paused background import from where it stopped (waits during maintenance; 409 reconnect_app when its app lost access)",
        "x-dashera-module": "any (answers from the modules you hold)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/data-imports/{runId}/undo": {
      "post": {
        "summary": "Undo a finished import: what it added goes to the Trash, what it changed goes back (the one who ran it or an admin; an agent its own)",
        "x-dashera-module": "any (answers from the modules you hold)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/search": {
      "get": {
        "summary": "Global search across the caller's visible content in a workspace",
        "x-dashera-module": "any (answers from the modules you hold)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "type",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "personId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "audience",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "audienceUserId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "browse",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/calendar/events": {
      "get": {
        "summary": "List calendar events visible to the caller, normalized across sources (manual, meetings, bookings, milestones, todos, billing). Admins see Org+Team+all proje...",
        "x-dashera-module": "calendar",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {}
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {}
          },
          {
            "name": "scopes",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "sources",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "upcoming",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Create a manual calendar event. Admin may target any scope; member may target team/project/personal; clients are read-only.",
        "x-dashera-module": "calendar",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "scope": {},
                  "projectId": {},
                  "title": {},
                  "description": {},
                  "startsAt": {},
                  "endsAt": {},
                  "allDay": {},
                  "clientVisible": {},
                  "colorHex": {},
                  "linkUrl": {},
                  "location": {},
                  "reminders": {},
                  "myReminders": {},
                  "onOwnersCalendar": {},
                  "reminderMinutes": {},
                  "mentionSessions": {},
                  "timeZone": {},
                  "rrule": {},
                  "attendeeUserIds": {}
                },
                "required": [
                  "scope",
                  "title",
                  "startsAt"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/calendar/events/{eventId}": {
      "delete": {
        "summary": "Delete a manual calendar event. Sealed events reject with 403. Clients cannot mutate.",
        "x-dashera-module": "calendar",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Update a manual calendar event. Sealed events (e.g. billing-managed) reject with 403. Clients cannot mutate.",
        "x-dashera-module": "calendar",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {},
                  "description": {},
                  "startsAt": {},
                  "endsAt": {},
                  "allDay": {},
                  "clientVisible": {},
                  "colorHex": {},
                  "linkUrl": {},
                  "location": {},
                  "reminderMinutes": {},
                  "mentionSessions": {},
                  "reminders": {},
                  "myReminders": {},
                  "applyTo": {},
                  "occurrenceStart": {},
                  "skipOccurrences": {},
                  "unskipOccurrences": {},
                  "onOwnersCalendar": {},
                  "timeZone": {},
                  "rrule": {},
                  "attendeeUserIds": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/calendar/events/{eventId}/rsvp": {
      "post": {
        "summary": "The caller answers their own invitation to a manual event (accepted, tentative, declined). 404 unless the caller is on the guest list.",
        "x-dashera-module": "calendar",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "eventId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "status": {}
                },
                "required": [
                  "status"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/calendar": {
      "get": {
        "summary": "Tasks across all visible projects with due dates (gated by calendar module)",
        "x-dashera-module": "calendar+projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/connection-requests": {
      "get": {
        "summary": "This organization's connection requests with their status and how many organizations ask",
        "x-dashera-module": "crm",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Request a connection to a company not in the directory (companyName, dataKind, module; optional sample file up to 5 MB)",
        "x-dashera-module": "crm",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "companyName": {},
                  "website": {},
                  "dataKind": {},
                  "module": {},
                  "notes": {},
                  "sample": {}
                },
                "required": [
                  "companyName",
                  "dataKind",
                  "module"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/connections": {
      "get": {
        "summary": "The connections directory: this organization's company connections, suggestions, matches for q, and its connection requests",
        "x-dashera-module": "crm",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "module",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/crm/migrations/{source}/runs": {
      "post": {
        "summary": "Start a whole-CRM migration or dry run (dry_run: true writes nothing) from an upload or the saved connection (admin only)",
        "x-dashera-module": "crm",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uploadId": {},
                  "stageMap": {},
                  "ownerMap": {},
                  "match": {},
                  "skipObjects": {},
                  "lifecycleMap": {},
                  "conflicts": {},
                  "dryRun": {},
                  "dry_run": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/crm/migrations/{source}/runs/{runId}/report": {
      "get": {
        "summary": "The report of a CRM migration run or dry run (admin only): counts, completeness, linking, conflicts, problems; format=csv per record",
        "x-dashera-module": "crm",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "source",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/crm/samples/settings": {
      "get": {
        "summary": "How the CRM marks samples: the rules, the sample price and each sample product's linked product (admins and an admin's Chief of Staff)",
        "x-dashera-module": "crm",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "summary": "Set how the CRM marks samples and the linked products; what is left out is kept (admins and an admin's Chief of Staff, audited)",
        "x-dashera-module": "crm",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rules": {},
                  "samplePriceCents": {},
                  "links": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/import-kits": {
      "get": {
        "summary": "What this person can import and export: each kind with its columns, match rules and export formats, plus CRM migration sources (admins)",
        "x-dashera-module": "crm",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/import-kits/{kind}/export": {
      "get": {
        "summary": "Export a kind in its template's columns, filtered like the view: xlsx (default), csv, json, vcf or ics; inline=true wraps the file in JSON",
        "x-dashera-module": "crm",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "inline",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "timeZone",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "ids",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "accountId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "listId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "from",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "to",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "includeArchived",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "assignee",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "priority",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "createdFrom",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "createdTo",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "noProject",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "territory",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "teamId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "lastOrderFrom",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "lastOrderTo",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "lastActivityFrom",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "lastActivityTo",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "licenseExpired",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "licenseExpiresWithinDays",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "distributorRepId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "distributorManagerId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "collectionsContactId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "onHold",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "paymentTerms",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "deliveryWeekday",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "sizeGrade",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "segment",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "warehouse",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "notBuying",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Export a kind with the filters or a selection of ids in the body (format, inline, timeZone, filter); the same answer as the GET",
        "x-dashera-module": "crm",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "format": {},
                  "inline": {},
                  "timeZone": {},
                  "filter": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/import-kits/{kind}/mappings": {
      "get": {
        "summary": "Column mappings saved by name for a kind",
        "x-dashera-module": "crm",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Save a column mapping by name for a kind (an existing name is replaced)",
        "x-dashera-module": "crm",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "mapping": {}
                },
                "required": [
                  "name",
                  "mapping"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/import-kits/{kind}/mappings/{mappingId}": {
      "delete": {
        "summary": "Delete a saved column mapping",
        "x-dashera-module": "crm",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mappingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/import-kits/{kind}/preview": {
      "post": {
        "summary": "Dry-run a file or rows for a kind (csv, xlsxBase64, ics, rows, uploadId or fileId): row statuses, problems, column mapping, fixes",
        "x-dashera-module": "crm",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fileName": {},
                  "csv": {},
                  "xlsxBase64": {},
                  "ics": {},
                  "rows": {},
                  "uploadId": {},
                  "fileId": {},
                  "fileProjectId": {},
                  "projectId": {},
                  "background": {},
                  "waitMs": {},
                  "timeZone": {},
                  "fixes": {},
                  "mapping": {},
                  "mode": {},
                  "matchRule": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/import-kits/{kind}/runs": {
      "post": {
        "summary": "Start an import (same body as preview): up to 5,000 rows answers 200 with runId and saveTo; big files, uploadId or fileId run in the background (202)",
        "x-dashera-module": "crm",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fileName": {},
                  "csv": {},
                  "xlsxBase64": {},
                  "ics": {},
                  "rows": {},
                  "uploadId": {},
                  "fileId": {},
                  "fileProjectId": {},
                  "projectId": {},
                  "background": {},
                  "waitMs": {},
                  "timeZone": {},
                  "fixes": {},
                  "mapping": {},
                  "mode": {},
                  "matchRule": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/import-kits/{kind}/template": {
      "get": {
        "summary": "A kind's import template in the organization's column names: xlsx (default), csv, or format=json (columns and a CSV to fill)",
        "x-dashera-module": "crm",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/import-kits/{kind}/uploads": {
      "post": {
        "summary": "Big imports: upload the file itself as the body (CSV, xlsx or JSON lines, up to 100 MB); pass the uploadId to preview and runs",
        "x-dashera-module": "crm",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "kind",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/all-files": {
      "get": {
        "summary": "Every file the caller may see across the organization, newest first (gated by fileUploads module)",
        "x-dashera-module": "files",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/files-unread-summary": {
      "get": {
        "summary": "Docs, sheets and files across the workspace holding replies the caller hasn't read (gated by fileUploads module)",
        "x-dashera-module": "files",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/documents": {
      "post": {
        "summary": "Start a doc in the project's Files tab. Created as a draft (visible only to its author) unless `post` is set. Gated by the fileUploads module, exactly like a...",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {},
                  "body": {},
                  "clientVisible": {},
                  "attachments": {}
                },
                "required": [
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/documents/{documentId}": {
      "delete": {
        "summary": "Delete a doc (its author, or a workspace admin/member)",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "summary": "Read one doc, with its body, attachments and change record",
        "x-dashera-module": "files",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Save a doc. Every save that changes the title or body records a revision so \"edited by X\" and prior versions stay recoverable. Doc editing is single-writer: ...",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {},
                  "body": {},
                  "clientVisible": {},
                  "baseVersion": {},
                  "attachments": {},
                  "removeAttachmentIds": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/documents/{documentId}/post": {
      "post": {
        "summary": "Post a draft to the project, choosing who to notify: the project's team, specific people, or no one.",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "notify": {},
                  "notifyUserIds": {},
                  "clientVisible": {}
                },
                "required": [
                  "notify"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/documents/{documentId}/revisions": {
      "get": {
        "summary": "Prior versions of a doc, newest first",
        "x-dashera-module": "files",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/documents/{documentId}/revisions/{revisionId}/restore": {
      "post": {
        "summary": "Put an earlier version's title and body back. Nothing is destroyed: the restore is saved as a new version, attributed to the caller.",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revisionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/files": {
      "get": {
        "summary": "List every file attached in a project (tasks, comments, tickets), newest first (gated by fileUploads module)",
        "x-dashera-module": "files",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Upload a file straight into the project's general files bucket, unattached to any task or ticket (gated by fileUploads module)",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "contentType": {},
                  "sizeBytes": {},
                  "objectPath": {}
                },
                "required": [
                  "name",
                  "sizeBytes",
                  "objectPath"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/files/unread": {
      "get": {
        "summary": "How many Files-tab items have replies the caller hasn't read (gated by fileUploads module)",
        "x-dashera-module": "files",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/items/{itemType}/{itemId}/editors": {
      "get": {
        "summary": "Who may edit one doc or sheet, and why.",
        "x-dashera-module": "files",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "itemType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Invite someone to edit this one doc or sheet.",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "itemType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {}
                },
                "required": [
                  "userId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/items/{itemType}/{itemId}/editors/{userId}": {
      "delete": {
        "summary": "Withdraw a per-item edit invitation.",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "itemType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "itemId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/sheets": {
      "post": {
        "summary": "Start a sheet in the project's Files tab: body {title, columns [{id, name, type}], rows [{position, cells {columnId: value}}]}.",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {},
                  "clientVisible": {},
                  "columns": {},
                  "rows": {}
                },
                "required": [
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/sheets/{sheetId}": {
      "delete": {
        "summary": "Delete a sheet (its author, or a workspace admin/member)",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sheetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "summary": "Read one sheet, with its columns, rows and last-editor record",
        "x-dashera-module": "files",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sheetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Save a sheet. Every field is optional so a keystroke autosave can send just the one row it changed; cell values are validated against their column's type on ...",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sheetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {},
                  "clientVisible": {},
                  "columns": {},
                  "upsertRows": {},
                  "deleteRowIds": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/sheets/{sheetId}/export": {
      "get": {
        "summary": "The sheet as a CSV or Excel file. Formulas export as their computed value, and number/currency/percent/date columns keep their formatting.",
        "x-dashera-module": "files",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sheetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "query",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/sheets/{sheetId}/revisions": {
      "get": {
        "summary": "Earlier versions of a sheet, newest first. Sheets autosave, so versions are coalesced rather than kept per keystroke. Rows are omitted here - read one versio...",
        "x-dashera-module": "files",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sheetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/sheets/{sheetId}/revisions/{revisionId}": {
      "get": {
        "summary": "One earlier version of a sheet, with its columns and rows, for preview",
        "x-dashera-module": "files",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sheetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revisionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/sheets/{sheetId}/revisions/{revisionId}/restore": {
      "post": {
        "summary": "Put an earlier version's title, columns and rows back. Nothing is destroyed: the sheet as it stands is captured as a new version first, so a restore can itse...",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sheetId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "revisionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/sheets/import": {
      "post": {
        "summary": "Turn an already-uploaded CSV or Excel file in this project into a new editable sheet, inferring a type for each column. The original upload is left untouched.",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "fileId": {},
                  "title": {}
                },
                "required": [
                  "fileId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/threads/{subjectType}/{subjectId}/comments": {
      "get": {
        "summary": "Conversation thread under one item in the project's Files tab - an uploaded file or a doc. Visible to exactly the callers who can see that item in the Files ...",
        "x-dashera-module": "files",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Add a comment to a file's or doc's conversation thread",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {},
                  "mentionedUserIds": {},
                  "attachments": {}
                },
                "required": [
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/threads/{subjectType}/{subjectId}/comments-window": {
      "get": {
        "summary": "The conversation under a file, doc or sheet, a window at a time (recent first).",
        "x-dashera-module": "files",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "older",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "newer",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "around",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/threads/{subjectType}/{subjectId}/comments/{commentId}": {
      "delete": {
        "summary": "Delete your own comment (workspace admins/members may delete anyone's, mirroring task comments).",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Edit your own comment in a file's or doc's conversation",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {},
                  "mentionedUserIds": {},
                  "attachments": {}
                },
                "required": [
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/threads/{subjectType}/{subjectId}/comments/{commentId}/boosts": {
      "delete": {
        "summary": "Remove your boost from a comment in a file's or doc's conversation",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "content",
            "in": "query",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Boost a comment in a file's or doc's conversation",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {}
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/threads/{subjectType}/{subjectId}/read": {
      "post": {
        "summary": "Mark a Files-tab conversation as seen by the caller.",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/threads/{subjectType}/{subjectId}/unread": {
      "post": {
        "summary": "Flag a Files-tab conversation to come back to.",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectType",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "subjectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/recent-files-summary": {
      "get": {
        "summary": "Up to 5 recently-uploaded files (gated by fileUploads module)",
        "x-dashera-module": "files",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/storage/uploads/discard": {
      "post": {
        "summary": "Delete a just-uploaded object that was never attached to anything",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "objectPath": {}
                },
                "required": [
                  "objectPath"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/storage/uploads/request-url": {
      "post": {
        "summary": "Request a presigned URL for direct upload (gated by fileUploads module)",
        "x-dashera-module": "files",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "size": {},
                  "contentType": {}
                },
                "required": [
                  "name",
                  "size",
                  "contentType"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/knowledge/platform": {
      "get": {
        "summary": "Read-only list of Dashera's own guidance about how Dashera works, shown in the Knowledge tab apart from the organization's own knowledge. Filtered to the cal...",
        "x-dashera-module": "knowledge",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/knowledge/search": {
      "get": {
        "summary": "Search learned notes and knowledge-base documents the caller can see (admins and team members). Read-only; used by the agent search_knowledge tool.",
        "x-dashera-module": "knowledge",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "query",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "forClients",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "includePlatform",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/livechat/sessions": {
      "get": {
        "summary": "List live-chat sessions. Agents (admin/member) see every session in the workspace; clients see only their own.",
        "x-dashera-module": "liveChat",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Open (or resume the caller's open) live-chat session. Returns an existing open session for the same visitor when present.",
        "x-dashera-module": "liveChat",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {},
                  "visitorName": {},
                  "visitorEmail": {},
                  "initialMessage": {},
                  "botTranscript": {}
                },
                "required": [
                  "visitorName",
                  "visitorEmail"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/livechat/sessions/{sessionId}": {
      "get": {
        "summary": "Fetch a single session with its messages.",
        "x-dashera-module": "liveChat",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Assign an agent or close a session. Admin/member only; assigning auto-claims when agentUserId is omitted.",
        "x-dashera-module": "liveChat",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "action": {},
                  "agentUserId": {}
                },
                "required": [
                  "action"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/livechat/sessions/{sessionId}/messages": {
      "post": {
        "summary": "Append a message to a session. Visitors and assigned/admin agents may post.",
        "x-dashera-module": "liveChat",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {}
                },
                "required": [
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/meetings": {
      "get": {
        "summary": "List meetings the caller may reach. Admins see every meeting in the workspace; staff additionally reach meetings on projects they belong to or with no projec...",
        "x-dashera-module": "meetings",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Schedule a meeting. The creator is always added as a host attendee. Invitees must be members of this workspace. Invitations are emailed to the guest list, su...",
        "x-dashera-module": "meetings",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {},
                  "description": {},
                  "projectId": {},
                  "scheduledStart": {},
                  "scheduledEnd": {},
                  "allowedJoinModes": {},
                  "capacity": {},
                  "recordingEnabled": {},
                  "rrule": {},
                  "attendees": {}
                },
                "required": [
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/meetings/{meetingId}": {
      "delete": {
        "summary": "Delete (cancel) a meeting and notify its guest list. Same authority as update.",
        "x-dashera-module": "meetings",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "summary": "Meeting detail with its guest list. 404 when the caller cannot reach the meeting - including an admin who was not invited to a conversation-started one.",
        "x-dashera-module": "meetings",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Update a meeting. Creator or admin only - except a conversation-started meeting, which only its starter may change. Moving the time or flipping the status to...",
        "x-dashera-module": "meetings",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {},
                  "description": {},
                  "projectId": {},
                  "scheduledStart": {},
                  "scheduledEnd": {},
                  "allowedJoinModes": {},
                  "capacity": {},
                  "recordingEnabled": {},
                  "rrule": {},
                  "status": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/meetings/{meetingId}/attendees": {
      "post": {
        "summary": "Invite somebody to an existing meeting. Same authority as update: creator or admin, except a conversation-started meeting, whose guest list only its starter ...",
        "x-dashera-module": "meetings",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {},
                  "email": {},
                  "name": {},
                  "role": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/meetings/{meetingId}/attendees/{attendeeId}": {
      "delete": {
        "summary": "Take somebody off a meeting's guest list. Anybody may remove themselves; removing somebody else needs the same authority as update. The person removed gets t...",
        "x-dashera-module": "meetings",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attendeeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/meetings/{meetingId}/guests": {
      "get": {
        "summary": "Outside people who have been given a link to this meeting. Only whoever may change the roster may read it - creator or admin, and for a conversation-started ...",
        "x-dashera-module": "meetings",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Invite someone outside the workspace by email and mint them a link to this one meeting. The link is emailed to them and also returned here so the host can sh...",
        "x-dashera-module": "meetings",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {},
                  "name": {}
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/meetings/{meetingId}/guests/{attendeeId}": {
      "delete": {
        "summary": "Revoke a guest link. The link stops working immediately, and a guest who is already in the call is disconnected from it.",
        "x-dashera-module": "meetings",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "attendeeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/meetings/{meetingId}/recordings": {
      "get": {
        "summary": "Recordings captured for a meeting. 404 when the caller cannot reach the meeting. Recordings, transcripts and notes are for the people who were in the meeting...",
        "x-dashera-module": "meetings",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/meetings/{meetingId}/recordings/{recordingId}": {
      "get": {
        "summary": "One recording, with its transcript. Same rule as the list: the people who were in the meeting plus admins; 404 for anyone else.",
        "x-dashera-module": "meetings",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recordingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/meetings/{meetingId}/recordings/{recordingId}/playback-url": {
      "get": {
        "summary": "Mint a short-lived signed GET URL for a stored recording. 409 with the reason when there is nothing to play - still composing, failed, or past its retention ...",
        "x-dashera-module": "meetings",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "recordingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/meetings/{meetingId}/response": {
      "post": {
        "summary": "Accept or decline an invitation to this meeting, as the calling user. Only a guest on the list may answer, and only while the meeting is still upcoming - a s...",
        "x-dashera-module": "meetings",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "meetingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "response": {}
                },
                "required": [
                  "response"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/catch-up": {
      "get": {
        "summary": "Aggregate every unread conversation the caller can still enter (agent tools)",
        "x-dashera-module": "messages",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/channels": {
      "get": {
        "summary": "List non-DM channels in this workspace the caller can see",
        "x-dashera-module": "messages",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "archived",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Create a new channel (admin only)",
        "x-dashera-module": "messages",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "projectId": {},
                  "clientVisible": {},
                  "memberIds": {},
                  "allStaff": {}
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/channels/{channelId}": {
      "delete": {
        "summary": "Delete a thread: it moves to the Trash for 30 days with its messages, members and files and can be restored from there. The person who started it or an organ...",
        "x-dashera-module": "messages",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Edit a thread's name/topic (project admins, project Editors and the person who started it) or its \"hide from clients\" master switch",
        "x-dashera-module": "messages",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "clientVisible": {},
                  "name": {},
                  "topic": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/channels/{channelId}/join": {
      "post": {
        "summary": "Add the caller to a non-DM channel",
        "x-dashera-module": "messages",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/channels/{channelId}/members": {
      "post": {
        "summary": "Add a workspace member to a non-DM channel (admin or member)",
        "x-dashera-module": "messages",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {}
                },
                "required": [
                  "userId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/channels/{channelId}/members/{userId}": {
      "delete": {
        "summary": "Remove a member from a non-DM channel (admin or member)",
        "x-dashera-module": "messages",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/channels/{channelId}/messages": {
      "get": {
        "summary": "Read a channel's messages, under the organization's prefix",
        "x-dashera-module": "messages",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Post a message to a channel, under the organization's prefix",
        "x-dashera-module": "messages",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "channelId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {},
                  "mentionedUserIds": {},
                  "mentionSessions": {},
                  "attachments": {},
                  "broadcast": {},
                  "quiet": {},
                  "wakeNow": {},
                  "wakeNowReason": {}
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/dm-channels": {
      "get": {
        "summary": "List DM channels the caller belongs to (gated by directMessaging module)",
        "x-dashera-module": "messages",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/dm-channels/find-or-create": {
      "post": {
        "summary": "Get or create a 1:1 DM channel with another workspace member",
        "x-dashera-module": "messages",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "peerUserId": {}
                },
                "required": [
                  "peerUserId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/dm-targets": {
      "get": {
        "summary": "List workspace members the caller is allowed to DM",
        "x-dashera-module": "messages",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/inbox": {
      "get": {
        "summary": "The caller's Chat Threads Inbox, newest first",
        "x-dashera-module": "messages",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filter",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/inbox/count": {
      "get": {
        "summary": "How many Inbox items are unread",
        "x-dashera-module": "messages",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/inbox/items/{messageId}/read": {
      "post": {
        "summary": "Mark one Inbox item read",
        "x-dashera-module": "messages",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/inbox/items/{messageId}/unread": {
      "post": {
        "summary": "Mark one Inbox item unread",
        "x-dashera-module": "messages",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/inbox/read-all": {
      "post": {
        "summary": "Mark everything the Inbox filter shows as read",
        "x-dashera-module": "messages",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "filter": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/messages/search": {
      "get": {
        "summary": "Full-text search across the caller's visible channels and DMs",
        "x-dashera-module": "messages",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {}
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/project-channels": {
      "get": {
        "summary": "A bounded page of the project chat rooms visible to the caller",
        "x-dashera-module": "messages",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "channelId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "archived",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "historical",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/channel": {
      "post": {
        "summary": "Get (or lazily create) the project's dedicated chat room and join the caller to it. Anyone who can see the project may join.",
        "x-dashera-module": "messages",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/thread-message-search": {
      "get": {
        "summary": "Find this project's threads by what was SAID in them, not just their name",
        "x-dashera-module": "messages",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "required": true,
            "schema": {}
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/recent-chats-summary": {
      "get": {
        "summary": "Up to 5 recent chat channels with last-message previews",
        "x-dashera-module": "messages",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/recent-dms-summary": {
      "get": {
        "summary": "Up to 5 recent direct-message conversations (gated by directMessaging module)",
        "x-dashera-module": "messages",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/saved-messages": {
      "get": {
        "summary": "List the caller's still-readable saved messages",
        "x-dashera-module": "messages",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/ai-usage": {
      "get": {
        "summary": "This month's AI usage by feature (admin only; the ai_usage agent tool)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/attention": {
      "get": {
        "summary": "What needs attention (red and amber alerts for the menu and For you)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/attention/snooze": {
      "post": {
        "summary": "Snooze an amber alert for yourself for 7 days, or clear the snooze",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "key": {},
                  "action": {}
                },
                "required": [
                  "key"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/audit-events": {
      "get": {
        "summary": "List recent audit events (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "action",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/comms/audit-log": {
      "get": {
        "summary": "Recent comms audit entries (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/comms/caps": {
      "get": {
        "summary": "List per-module monthly cost caps for the workspace (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "summary": "Set or clear a monthly cost cap for one comms module (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "moduleKey": {},
                  "monthlyCostCapCents": {}
                },
                "required": [
                  "moduleKey"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/comms/chat-message": {
      "post": {
        "summary": "Server-mediated, metered chat message send",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "uniqueName": {},
                  "body": {}
                },
                "required": [
                  "uniqueName",
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/comms/chat-token": {
      "post": {
        "summary": "Mint a short-lived Twilio Conversations (chat) token for the caller",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/comms/conversations/get-or-create": {
      "post": {
        "summary": "Server-mediated lookup-or-create of a support conversation",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "peerUserId": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/comms/support-agents": {
      "get": {
        "summary": "List support-agent assignments for clients in the workspace",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Assign a support agent to a client (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "clientUserId": {},
                  "agentUserId": {}
                },
                "required": [
                  "clientUserId",
                  "agentUserId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/comms/support-agents/{assignmentId}": {
      "delete": {
        "summary": "Remove a client/support-agent assignment (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "assignmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/comms/usage": {
      "get": {
        "summary": "Aggregated per-module comms spend for the current month (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/comms/video-invite": {
      "post": {
        "summary": "Email a video-meeting invite to selected workspace members",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "roomName": {},
                  "toUserIds": {},
                  "message": {}
                },
                "required": [
                  "toUserIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/comms/video-token": {
      "post": {
        "summary": "Mint a short-lived Twilio Video access token for a room",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "roomName": {},
                  "peerUserId": {}
                },
                "required": [
                  "peerUserId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/companies": {
      "get": {
        "summary": "List client companies in this workspace",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Create a client company (admin/member)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "notes": {}
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/companies/{companyId}": {
      "delete": {
        "summary": "Delete a client company (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Update a client company (admin/member)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "notes": {},
                  "primaryContactUserId": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/companies/{companyId}/members": {
      "post": {
        "summary": "Link a client user to this company",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {}
                },
                "required": [
                  "userId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/dashboard-layout": {
      "get": {
        "summary": "Get the caller's saved dashboard card order for this workspace",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "summary": "Replace the caller's dashboard card order for this workspace",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "layout": {},
                  "collapsedSections": {},
                  "sortMode": {},
                  "markSeen": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/export-window": {
      "get": {
        "summary": "After a plan ends: until when admins can still export add-on data (null otherwise)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/imports/{provider}/authorize-url": {
      "get": {
        "summary": "Build the provider OAuth authorization URL (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "returnTo",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/imports/{provider}/connection": {
      "delete": {
        "summary": "Disconnect a provider and delete stored credentials (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/imports/{provider}/projects": {
      "get": {
        "summary": "List importable projects from the connected provider (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "targetWorkspaceId",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/imports/{provider}/runs": {
      "post": {
        "summary": "Start an import run for the selected projects (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "selectedProjectIds": {},
                  "targetWorkspaceId": {},
                  "uploadId": {},
                  "targetProjectId": {},
                  "historicalBefore": {},
                  "filesSince": {},
                  "ticketFilter": {},
                  "socialMediaCategory": {},
                  "combineAmazonConversations": {},
                  "sourceAuthorityConfirmed": {}
                },
                "required": [
                  "selectedProjectIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/imports/basecamp/document-conversion": {
      "post": {
        "summary": "Turn every Basecamp document an earlier import put in chat into a project doc - body, comments, attachments, authors and dates moved, chat copy removed (admi...",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/imports/basecamp/document-conversion/preview": {
      "get": {
        "summary": "Preview moving Basecamp documents that earlier imports put in chat into the project's Files feed as project docs (admin only). Read-only; changes nothing.",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/imports/basecamp/thread-split": {
      "post": {
        "summary": "Move each Basecamp board post previously imported into a project's single chat room, with its comments, into a thread of its own (admin only). Covers every B...",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/imports/basecamp/thread-split/preview": {
      "get": {
        "summary": "Preview the re-split of Basecamp board posts that were imported into a project's single chat room, into one thread per post (admin only). Read-only; changes ...",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/imports/overview": {
      "get": {
        "summary": "Provider status matrix + recent import runs (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/imports/runs/{runId}": {
      "get": {
        "summary": "Poll the status/progress of an import run (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/imports/runs/{runId}/pause": {
      "post": {
        "summary": "Pause a pending or running import run (admin only). The worker stops after the current ticket or step, saves its place and keeps every count; resume carries ...",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/imports/runs/{runId}/resume": {
      "post": {
        "summary": "Carry a paused import run on from where it stopped, at once (admin only). During platform maintenance it waits for maintenance instead and the answer carries...",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "runId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/imports/slack/upload": {
      "post": {
        "summary": "Upload a Slack workspace export ZIP for import (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/imports/zendesk/connection": {
      "post": {
        "summary": "Connect Zendesk with a subdomain + OAuth client ID and secret, or an admin email + API token (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subdomain": {},
                  "clientId": {},
                  "clientSecret": {},
                  "email": {},
                  "apiToken": {}
                },
                "required": [
                  "subdomain"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/imports/zendesk/help-center-categories": {
      "get": {
        "summary": "The connected Zendesk help center's categories with their published article counts, for choosing what to import (admin only). looksInternal marks names such ...",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/imports/zendesk/help-center-import": {
      "get": {
        "summary": "The workspace's latest help-center import, running or finished (admin only). Kept in memory, so null after a server restart.",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Start importing the published Zendesk help-center (Guide) articles as knowledge-base documents, in the background (admin only). Answers 202 with the job; rea...",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "categoryIds": {},
                  "skipSamples": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/kb/documents": {
      "get": {
        "summary": "List knowledge-base documents (admins and team members, gated by clientSupportBot module). A member sees org-wide documents plus those of projects they are on.",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/kb/documents/{documentId}/signed-url": {
      "get": {
        "summary": "Mint a short-lived signed URL to download a KB document's source file",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/meeting-recordings": {
      "get": {
        "summary": "Kept meeting recordings for the Files \"Meeting recordings\" section: one project's meetings, or (projectId=none) the organization's meetings with no project. ...",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "query",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/modules": {
      "get": {
        "summary": "Get the module-toggle flags for a workspace (any member)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/needs-you": {
      "get": {
        "summary": "What is waiting on the caller across the organization (Workspace page)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/org-export": {
      "get": {
        "summary": "The organization export: the latest one, a size estimate and the export window (admins)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Start an export of the whole organization as one ZIP (admins; 409 while one runs)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/org-export/{exportId}": {
      "delete": {
        "summary": "Delete a ready organization export's ZIP now; its links stop working",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/org-export/{exportId}/cancel": {
      "post": {
        "summary": "Stop a running organization export and delete what it wrote",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/org-export/{exportId}/link": {
      "post": {
        "summary": "A download link for a ready organization export (audit-logged; works until the ZIP is deleted)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "exportId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/kb/documents": {
      "get": {
        "summary": "List a project's knowledge-base documents (project admin, gated by clientSupportBot)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Register an uploaded file as a project KB document and index it",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {},
                  "contentType": {},
                  "sizeBytes": {},
                  "objectPath": {}
                },
                "required": [
                  "title",
                  "contentType",
                  "sizeBytes",
                  "objectPath"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/kb/documents/{documentId}": {
      "delete": {
        "summary": "Delete a project KB document and all of its chunks",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/kb/documents/{documentId}/reindex": {
      "post": {
        "summary": "Re-extract text and re-embed all chunks for a project KB document",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/kb/uploads/request-url": {
      "post": {
        "summary": "Get a presigned upload URL for a project KB document (project admin, gated by clientSupportBot)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "size": {},
                  "contentType": {}
                },
                "required": [
                  "name",
                  "size",
                  "contentType"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/reply-threads": {
      "get": {
        "summary": "The caller's Replies view",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "before",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/since-away/summary": {
      "get": {
        "summary": "Stream the AI \"Since you were away\" summary (Server-Sent Events)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "since",
            "in": "query",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/summary": {
      "get": {
        "summary": "Org-wide overview of a workspace - member count by role, recent joiners (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/team-profiles": {
      "get": {
        "summary": "List workspace members with their self-authored profile fields (admin only)",
        "x-dashera-module": "organization (needs every standard module)",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/build/limit": {
      "post": {
        "summary": "A builder agent reports that its AI company's usage limit stopped it: the subscription account (by a name, never a credential) is limited until the reset tim...",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "vendor": {},
                  "accountLabel": {},
                  "resetAt": {},
                  "limitKind": {},
                  "session": {}
                },
                "required": [
                  "vendor",
                  "accountLabel"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/builds-status": {
      "get": {
        "summary": "For agents in a Build Room (beta): the builds one of your sessions is in, or one build by its id or room channelId (build). Lead, backup, agents, repo and ba...",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "build",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/builds/{buildId}": {
      "get": {
        "summary": "One Build Room (beta): name, project, room, connections, agents, plan, code and approvals.",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "buildId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Make another live session the lead of a Build Room (beta); the old lead stays as a helper. The build's owner, an org admin or an admin's Chief of Staff conne...",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "buildId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "lead": {}
                },
                "required": [
                  "lead"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/builds/{buildId}/access": {
      "post": {
        "summary": "An agent in a Build Room (beta) reports its own no-op repo access check: reachable, can push, can open a PR (null when unchecked).",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "buildId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "repoReachable": {},
                  "canPush": {},
                  "canOpenPr": {},
                  "note": {},
                  "session": {}
                },
                "required": [
                  "repoReachable",
                  "canPush",
                  "canOpenPr"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/builds/{buildId}/agents": {
      "post": {
        "summary": "Add a session to a running Build Room (beta), as a helper (agent) or the backup lead (backup), by its code (session) or id (sessionId). The build's owner, an...",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "buildId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session": {},
                  "sessionId": {},
                  "role": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/builds/{buildId}/agents/{sessionId}": {
      "delete": {
        "summary": "Take a helper or the backup lead out of a Build Room (beta), by session id or code. The lead stays (a lead change is PATCH with lead).",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "buildId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sessionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/builds/{buildId}/messages": {
      "get": {
        "summary": "A Build Room's messages (beta), with who each is from and to.",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "buildId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Post to a Build Room (beta), to the lead, backup, one session, the owner or everyone, with text, files or both. Secret-like text is refused.",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "buildId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {},
                  "attachments": {},
                  "to": {},
                  "parentMessageId": {},
                  "wakeNow": {},
                  "wakeNowReason": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/builds/{buildId}/tasks": {
      "post": {
        "summary": "Tie plan tasks to a Build Room (beta), so only that build's pushes count toward its release. Tasks in the build's project only.",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "buildId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taskIds": {}
                },
                "required": [
                  "taskIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/favorite-projects": {
      "get": {
        "summary": "Get the caller's starred (\"frequent\") project ids, in saved order",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "summary": "Replace the caller's starred project ids for this workspace",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectIds": {}
                },
                "required": [
                  "projectIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/gantt": {
      "get": {
        "summary": "Workspace-wide Gantt - every task in projects the caller can see, including the project name for grouping/filtering.",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "upcoming",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/my-projects-summary": {
      "get": {
        "summary": "Up to 5 projects the caller can access in this workspace",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/my-tasks-summary": {
      "get": {
        "summary": "Up to 5 tasks assigned to the caller in this workspace",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/my-work": {
      "get": {
        "summary": "My Work - every task assigned to the caller across the projects they can see, with project + list context.",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/project-templates": {
      "get": {
        "summary": "List project templates",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Create a project template (admin only)",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "description": {},
                  "payload": {}
                },
                "required": [
                  "name",
                  "payload"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/project-templates/{templateId}": {
      "delete": {
        "summary": "Delete a project template (admin only)",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/project-templates/{templateId}/use": {
      "post": {
        "summary": "Create a new project from a template",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {}
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects": {
      "get": {
        "summary": "List projects visible to the caller in this workspace",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "includeArchived",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Create a new project (admin or member)",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "description": {},
                  "clientAccessEnabled": {},
                  "colorHex": {},
                  "icon": {},
                  "layoutTemplate": {},
                  "templateId": {},
                  "moduleKeys": {},
                  "defaultModuleKey": {},
                  "memberUserIds": {},
                  "teamInviteEmails": {},
                  "clientInviteEmails": {}
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}": {
      "delete": {
        "summary": "Delete a project and its tasks (admin only)",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "summary": "Get a single project",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Update project metadata (admin or member)",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "description": {},
                  "status": {},
                  "clientAccessEnabled": {},
                  "colorHex": {},
                  "icon": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/activity": {
      "get": {
        "summary": "Cursor-paginated recent-activity feed for one project",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "kind",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "listId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "commentsOnly",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/archive": {
      "post": {
        "summary": "Archive a project (workspace admin only; restorable)",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/assignable-members": {
      "get": {
        "summary": "List users who can be assigned to tasks on this project: all project members (team + clients) plus workspace admins/owner (who have blanket project access bu...",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/import-people": {
      "get": {
        "summary": "Source-tool participants of an imported project (invite prompt)",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/import-people/dismiss": {
      "post": {
        "summary": "Permanently dismiss the invite-previous-participants prompt",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/invite-client": {
      "post": {
        "summary": "Invite a client by email straight onto a specific project (admin/member)",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {},
                  "name": {},
                  "projectRole": {},
                  "workspaceRole": {}
                },
                "required": [
                  "email"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/members": {
      "get": {
        "summary": "List members of a project (any caller who can see the project)",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Add one or more workspace users to this project (admin only)",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "members": {}
                },
                "required": [
                  "members"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/members/{memberId}": {
      "delete": {
        "summary": "Remove a member from this project (admin only)",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "memberId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Change a project member's role (admin only)",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "memberId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "role": {}
                },
                "required": [
                  "role"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/members/{memberId}/editor": {
      "put": {
        "summary": "Grant or revoke the Editor capability for a project member",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "memberId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "isEditor": {}
                },
                "required": [
                  "isEditor"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/modules": {
      "get": {
        "summary": "Per-project module enablement (Task",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "summary": "Replace per-project module selection (admin/member)",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {},
                  "modules": {},
                  "defaultModuleKey": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/task-lists": {
      "get": {
        "summary": "List the to-do lists in a project",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Create a new to-do list in a project",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "clientVisible": {},
                  "buildId": {},
                  "buildRole": {}
                },
                "required": [
                  "name"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/task-lists/{listId}": {
      "delete": {
        "summary": "Delete a to-do list and all its tasks",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Rename or reorder a to-do list",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "position": {},
                  "beforeListId": {},
                  "afterListId": {},
                  "clientVisible": {},
                  "completed": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/task-lists/{listId}/comments": {
      "get": {
        "summary": "A to-do list's discussion (\"Discuss this list\"), oldest first: a conversation about the whole list, not a task in it. Readable by anyone who can see the list...",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Post in a to-do list's discussion. Everyone who has written in it before is notified; a session mention wakes that agent session, as on a task.",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {},
                  "attachments": {},
                  "mentionSessions": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/task-lists/{listId}/comments-window": {
      "get": {
        "summary": "A list's discussion, a window at a time (recent first).",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "older",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "newer",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "around",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/task-lists/{listId}/comments/{commentId}": {
      "delete": {
        "summary": "Delete a comment in a list's discussion (its author, or a workspace admin or member).",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Edit your own comment in a list's discussion.",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {},
                  "attachments": {}
                },
                "required": [
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/task-lists/{listId}/comments/{commentId}/boosts": {
      "delete": {
        "summary": "Remove the caller's boost from a comment in a list's discussion.",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "content",
            "in": "query",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Add a boost (emoji or short phrase) to a comment in a list's discussion.",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "listId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {}
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/task-reads": {
      "post": {
        "summary": "Mark tasks or list discussions read or unread, for the caller only",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "state": {},
                  "taskIds": {},
                  "listIds": {},
                  "allInListId": {}
                },
                "required": [
                  "state"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/task-reads/restore": {
      "post": {
        "summary": "Undo a mark read / unread by putting the caller's markers back",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "previous": {}
                },
                "required": [
                  "previous"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/tasks": {
      "get": {
        "summary": "List a project's tasks, a page at a time (by position, then id)",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "completed",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "listId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "assigneeUserId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "historical",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Create a new task in a project",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {},
                  "description": {},
                  "listId": {},
                  "status": {},
                  "priority": {},
                  "labels": {},
                  "completed": {},
                  "dueAt": {},
                  "dueHasTime": {},
                  "startAt": {},
                  "assigneeUserId": {},
                  "assigneeUserIds": {},
                  "assigneeSessions": {},
                  "followerUserIds": {},
                  "leaderUserId": {},
                  "sourceMessageId": {},
                  "parentTaskId": {},
                  "clientVisible": {},
                  "recurrence": {}
                },
                "required": [
                  "title"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/tasks/{taskId}": {
      "delete": {
        "summary": "Delete a task",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "scope",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Update a task (title, description, status, position, assignee, due date)",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {},
                  "description": {},
                  "listId": {},
                  "status": {},
                  "priority": {},
                  "labels": {},
                  "completed": {},
                  "dueAt": {},
                  "dueHasTime": {},
                  "startAt": {},
                  "assigneeUserId": {},
                  "assigneeUserIds": {},
                  "assigneeSessions": {},
                  "followerUserIds": {},
                  "leaderUserId": {},
                  "position": {},
                  "beforeTaskId": {},
                  "afterTaskId": {},
                  "parentTaskId": {},
                  "clientVisible": {},
                  "recurrence": {},
                  "recurrenceScope": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/tasks/{taskId}/attachments": {
      "get": {
        "summary": "List task attachments (gated by fileUploads module)",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Record a task attachment after the file is uploaded to object storage",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "contentType": {},
                  "sizeBytes": {},
                  "objectPath": {}
                },
                "required": [
                  "name",
                  "sizeBytes",
                  "objectPath"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/tasks/{taskId}/build/push": {
      "post": {
        "summary": "A builder agent reports the branch and head commit it pushed for a Build Room task: the run is marked pushed and the task's Build state, Head and Branch fiel...",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "branch": {},
                  "headSha": {},
                  "branchUrl": {},
                  "session": {}
                },
                "required": [
                  "branch",
                  "headSha"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/tasks/{taskId}/build/runs": {
      "get": {
        "summary": "A Build Room task's runs, oldest first: one per attempt, each an assignment of the task to an agent's live session, with what the agent reported. Team only.",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/tasks/{taskId}/build/start": {
      "post": {
        "summary": "A builder agent starts a Build Room task assigned to it: records the run as running on its live session (one run per attempt) and returns the branch, base re...",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session": {},
                  "vendor": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/tasks/{taskId}/comments": {
      "get": {
        "summary": "List comments on a task (oldest first). Visible to anyone who can see the task.",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Post a new comment on a task. Notifies attached people who opted into comment notifications.",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {},
                  "subtaskId": {},
                  "attachments": {},
                  "mentionSessions": {},
                  "quiet": {},
                  "wakeNow": {},
                  "wakeNowReason": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/tasks/{taskId}/comments-window": {
      "get": {
        "summary": "A task's comments, a window at a time (recent first).",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "older",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "newer",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "around",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/tasks/{taskId}/comments/{commentId}": {
      "delete": {
        "summary": "Delete a task comment (author or workspace/project admin only).",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Edit a task comment's text (author only).",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {},
                  "subtaskId": {},
                  "attachments": {}
                },
                "required": [
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/tasks/{taskId}/comments/{commentId}/boosts": {
      "delete": {
        "summary": "Remove the caller's boost from a task comment.",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "content",
            "in": "query",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Add a boost (emoji or short phrase) to a task comment.",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {}
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/unarchive": {
      "post": {
        "summary": "Restore an archived project (workspace admin only)",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/todos": {
      "get": {
        "summary": "List workspace tasks visible to the caller (gated by `todos` module). Clients see only tasks they're assigned to; staff see all in the workspace. Use `mine=t...",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mine",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Create a new workspace task (admin/member only). Must include at least one assignee.",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {},
                  "description": {},
                  "dueAt": {},
                  "assigneeUserIds": {}
                },
                "required": [
                  "title",
                  "assigneeUserIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/todos/{taskId}": {
      "delete": {
        "summary": "Delete a workspace task (admin/member only).",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Edit a workspace task's title, description, due date, or assignee list (admin/member only). Replacing the assignee list preserves existing per-user completio...",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {},
                  "description": {},
                  "dueAt": {},
                  "assigneeUserIds": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/todos/{taskId}/force-complete": {
      "post": {
        "summary": "Admin-only - force every assignee row to complete and mark the task done. Preserves any existing per-user completion timestamps.",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/todos/{taskId}/my-completion": {
      "put": {
        "summary": "Mark the caller's own assignee row complete or uncomplete. The task as a whole becomes \"done\" only when every assignee has completed. Only assignees may call...",
        "x-dashera-module": "projects",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "completed": {}
                },
                "required": [
                  "completed"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/workload": {
      "get": {
        "summary": "Workload board - open tasks grouped by assignee across the whole workspace (team only).",
        "x-dashera-module": "projects",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/scheduling/availability": {
      "get": {
        "summary": "Get the calling user's weekly availability slots in this workspace.",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "summary": "Replace the calling user's full weekly availability set in this workspace.",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "slots": {}
                },
                "required": [
                  "slots"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/scheduling/availability/overrides": {
      "get": {
        "summary": "List the calling user's date-specific availability overrides.",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "summary": "Replace the calling user's date-specific overrides set in this workspace.",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "overrides": {}
                },
                "required": [
                  "overrides"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/scheduling/bookings": {
      "get": {
        "summary": "Bookings the caller is involved in - either as the booker or the owner of the link. Admin sees every booking in the workspace.",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Book a slot on a link. Caller must be a workspace member or a client in the link's project (when the link is project-scoped).",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "linkId": {},
                  "startsAt": {},
                  "bookerName": {},
                  "bookerEmail": {},
                  "notes": {}
                },
                "required": [
                  "linkId",
                  "startsAt",
                  "bookerName",
                  "bookerEmail"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/scheduling/bookings/{bookingId}": {
      "delete": {
        "summary": "Cancel a booking (booker, link owner, or admin).",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/scheduling/bookings/{bookingId}/confirm": {
      "post": {
        "summary": "Confirm a booking that requires manual host confirmation. Host or admin only.",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bookingId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/scheduling/links": {
      "get": {
        "summary": "List bookable links visible to the caller. Admin/member sees all; clients see only links scoped to a project they belong to.",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Create a bookable link owned by the caller (admin/member).",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "slug": {},
                  "title": {},
                  "description": {},
                  "durationMinutes": {},
                  "bufferMinutes": {},
                  "minNoticeMinutes": {},
                  "maxAdvanceDays": {},
                  "projectId": {},
                  "kind": {},
                  "color": {},
                  "locationKind": {},
                  "locationValue": {},
                  "questions": {},
                  "requiresConfirmation": {},
                  "redirectUrl": {},
                  "confirmationMessage": {},
                  "maxInvitees": {}
                },
                "required": [
                  "slug",
                  "title",
                  "durationMinutes"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/scheduling/links/{linkId}": {
      "delete": {
        "summary": "Delete a link (owner or admin).",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "linkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Update a link (owner or admin).",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "linkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {},
                  "description": {},
                  "durationMinutes": {},
                  "bufferMinutes": {},
                  "minNoticeMinutes": {},
                  "maxAdvanceDays": {},
                  "projectId": {},
                  "isActive": {},
                  "kind": {},
                  "color": {},
                  "locationKind": {},
                  "locationValue": {},
                  "questions": {},
                  "requiresConfirmation": {},
                  "redirectUrl": {},
                  "confirmationMessage": {},
                  "maxInvitees": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/scheduling/links/{linkId}/hosts": {
      "get": {
        "summary": "List the hosts attached to an event-type (round-robin, collective, group).",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "linkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "summary": "Replace the host list for an event-type. Owner or admin only.",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "linkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "hosts": {}
                },
                "required": [
                  "hosts"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/scheduling/links/{linkId}/slots": {
      "get": {
        "summary": "Compute open slots for a link on a given date (YYYY-MM-DD), based on the owner's availability minus existing open bookings.",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "linkId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "date",
            "in": "query",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/scheduling/webhooks": {
      "get": {
        "summary": "List booking webhooks for a workspace. Admin only.",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Create a booking webhook. Admin only.",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {},
                  "events": {}
                },
                "required": [
                  "url",
                  "events"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/scheduling/webhooks/{webhookId}": {
      "delete": {
        "summary": "Delete a booking webhook. Admin only.",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Update a booking webhook. Admin only.",
        "x-dashera-module": "scheduling",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "webhookId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "url": {},
                  "events": {},
                  "isActive": {},
                  "rotateSecret": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/my-tickets-summary": {
      "get": {
        "summary": "Up to 5 support tickets relevant to the caller (gated by supportTickets module)",
        "x-dashera-module": "tickets",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/email-in": {
      "get": {
        "summary": "Email-in settings for a project (managers only) - inbound address, enabled flag, target list.",
        "x-dashera-module": "tickets",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "summary": "Enable/disable email-in or set the target list. First enable mints the address.",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {},
                  "listId": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/email-in/regenerate": {
      "post": {
        "summary": "Rotate the project's email-in address; the old address is invalidated immediately.",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/support-categories": {
      "get": {
        "summary": "List a project's support categories (ordered). Visible to any project member; used to populate the client intake form and the admin setup drawer.",
        "x-dashera-module": "tickets",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "summary": "Replace a project's support categories (admin-only). Bulk save from the Category Builder; order is taken from array position.",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "categories": {}
                },
                "required": [
                  "categories"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/ticket-email-in": {
      "get": {
        "summary": "Ticket email-in settings for a project (managers only). Separate from the task email-in address.",
        "x-dashera-module": "tickets",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "summary": "Enable/disable the project's ticket email address. First enable mints the address.",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "enabled": {}
                },
                "required": [
                  "enabled"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/projects/{projectId}/ticket-email-in/regenerate": {
      "post": {
        "summary": "Rotate the project's ticket email address (managers only). The old address stops working immediately.",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/saved-replies": {
      "get": {
        "summary": "List the workspace's saved replies (staff only).",
        "x-dashera-module": "tickets",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Create a saved reply (workspace admins only).",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "body": {}
                },
                "required": [
                  "name",
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/saved-replies/{savedReplyId}": {
      "delete": {
        "summary": "Delete a saved reply (workspace admins only).",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "savedReplyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Update a saved reply (workspace admins only).",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "savedReplyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "body": {}
                },
                "required": [
                  "name",
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/support-categories": {
      "get": {
        "summary": "List the organization's support departments (org-level category set; staff only).",
        "x-dashera-module": "tickets",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tickets": {
      "get": {
        "summary": "List support tickets visible to the caller (gated by supportTickets module). Clients see their own; staff see all. Optional projectId scopes to one project.",
        "x-dashera-module": "tickets",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "createdFrom",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "createdTo",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "assignee",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "priority",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "noProject",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "File a new support ticket (any role; gated by supportTickets module)",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {},
                  "description": {},
                  "category": {},
                  "projectId": {},
                  "categoryId": {},
                  "onBehalfOfUserId": {},
                  "assignedToUserId": {},
                  "dueAt": {},
                  "priority": {}
                },
                "required": [
                  "subject"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tickets-satisfaction": {
      "get": {
        "summary": "Aggregate satisfaction summary across the workspace's rated tickets (staff only).",
        "x-dashera-module": "tickets",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tickets/{ticketId}": {
      "get": {
        "summary": "Fetch a single ticket. Staff (org-wide, or project admins/team for project-scoped tickets) see any ticket they oversee; everyone else only their own.",
        "x-dashera-module": "tickets",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Update a ticket. Clients may edit subject/description on their own open tickets; staff may also change status, category, and assignee.",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "subject": {},
                  "description": {},
                  "status": {},
                  "category": {},
                  "assignedToUserId": {},
                  "priority": {},
                  "dueAt": {},
                  "projectId": {},
                  "tags": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tickets/{ticketId}/attachments": {
      "get": {
        "summary": "List attachments on a ticket (gated by fileUploads + supportTickets)",
        "x-dashera-module": "tickets",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Record a ticket attachment after the file is uploaded to object storage",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "contentType": {},
                  "sizeBytes": {},
                  "objectPath": {}
                },
                "required": [
                  "name",
                  "sizeBytes",
                  "objectPath"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tickets/{ticketId}/comments": {
      "get": {
        "summary": "List comments on a ticket (oldest first). Visible to the ticket creator and to workspace staff.",
        "x-dashera-module": "tickets",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Post a new comment on a ticket. Same visibility rules as listing.",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {},
                  "attachments": {},
                  "isInternal": {},
                  "mentionedUserIds": {},
                  "mentionSessions": {},
                  "allowedLinks": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tickets/{ticketId}/comments-window": {
      "get": {
        "summary": "A ticket's replies, a window at a time (recent first).",
        "x-dashera-module": "tickets",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "end",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "older",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "newer",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "around",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "all",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tickets/{ticketId}/comments/{commentId}": {
      "delete": {
        "summary": "Remove a ticket comment (author, or org-wide staff moderating).",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Edit a ticket comment's text (author only).",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {},
                  "attachments": {}
                },
                "required": [
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tickets/{ticketId}/comments/{commentId}/boosts": {
      "delete": {
        "summary": "Remove the caller's boost from a ticket comment.",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "content",
            "in": "query",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Add a boost (emoji or short phrase) to a ticket comment.",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {}
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tickets/{ticketId}/rating": {
      "put": {
        "summary": "Leave or update a satisfaction rating on a resolved ticket (requester only).",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rating": {},
                  "comment": {}
                },
                "required": [
                  "rating"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tickets/{ticketId}/read": {
      "post": {
        "summary": "Mark a ticket's replies as seen by the caller.",
        "x-dashera-module": "tickets",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/entries": {
      "get": {
        "summary": "Time entries visible to the caller within a date range. Peer visibility tiers are enforced server-side; admins see everything.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {}
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {}
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "taskId",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Log a manual time entry for the caller against an eligible project (and optional task).",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {},
                  "taskId": {},
                  "durationMinutes": {},
                  "entryDate": {},
                  "note": {},
                  "billable": {}
                },
                "required": [
                  "durationMinutes",
                  "entryDate"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/entries/{entryId}": {
      "delete": {
        "summary": "Delete one of the caller's own time entries.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Update one of the caller's own time entries.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "entryId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "taskId": {},
                  "durationMinutes": {},
                  "entryDate": {},
                  "note": {},
                  "billable": {},
                  "startedAt": {},
                  "endedAt": {},
                  "tzOffsetMinutes": {},
                  "editReason": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/entries/mark-billable": {
      "post": {
        "summary": "Flag all of the caller's own not-yet-invoiced entries in a date range as billable, so a period of forgotten-to-tick time can be invoiced.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {},
                  "to": {},
                  "projectId": {}
                },
                "required": [
                  "from",
                  "to"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/invoices": {
      "get": {
        "summary": "The caller's own invoices in this workspace, newest first.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Invoice the caller's own not-yet-invoiced billable entries in a date range - generates a PDF invoice, emails it to the selected members / external addresses,...",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {},
                  "to": {},
                  "projectId": {},
                  "rateTemplateId": {},
                  "hourlyRateCents": {},
                  "note": {},
                  "recipientUserIds": {},
                  "externalEmails": {}
                },
                "required": [
                  "from",
                  "to"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/invoices/{invoiceId}": {
      "patch": {
        "summary": "Adjust one of the caller's own PENDING invoices (rate, note, recipients) - totals are recomputed from the current entries. Paid invoices are locked (409).",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "rateTemplateId": {},
                  "hourlyRateCents": {},
                  "note": {},
                  "recipientUserIds": {},
                  "externalEmails": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/invoices/{invoiceId}/mark-paid": {
      "post": {
        "summary": "Confirm payment was received for one of the caller's own pending invoices - marks the hours paid and emails a payment receipt to the invoice recipients.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/invoices/{invoiceId}/resend": {
      "post": {
        "summary": "Re-generate the PDF from the invoice's current entries and re-email it to the invoice recipients. Pending invoices only (409 once paid).",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/invoices/{invoiceId}/retry-emails": {
      "post": {
        "summary": "Requeue this invoice's permanently-failed emails (invoice, receipt or cancellation notices) for delivery, e.g. after a bounced address was fixed. Only the in...",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/invoices/{invoiceId}/void": {
      "post": {
        "summary": "Withdraw one of the caller's own pending invoices and release every entry on it back to un-invoiced, so a corrected invoice can be issued for the period. The...",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "reason": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/invoices/{invoiceId}/voided-entries": {
      "get": {
        "summary": "Line-level snapshot of what a CANCELLED (voided) invoice covered, captured at the moment it was voided. Readable by the invoice's issuer and by workspace adm...",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/invoices/preview": {
      "get": {
        "summary": "What a date range would actually bill - the caller's own billable, not-yet-invoiced hours, selected with exactly the same query the create call uses.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {}
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {}
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/project-selection": {
      "get": {
        "summary": "Admin-only. Every active project with whether it is included in Time Tracking.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "summary": "Admin-only. Replace the set of projects included in Time Tracking (replace-not-merge; an empty list removes every project, leaving only organization-level \"n...",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectIds": {}
                },
                "required": [
                  "projectIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/projects": {
      "get": {
        "summary": "Projects the caller may log time against - the module is ON for the project, the project is active (not archived), and the caller is admin or a project member.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/projects/{projectId}/tasks": {
      "get": {
        "summary": "Open tasks of an eligible project, for the optional task picker when logging time.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/rate-templates": {
      "get": {
        "summary": "The caller's own reusable hourly-rate templates (\"jobs\") in this workspace.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Create a reusable rate template for the caller.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "hourlyRateCents": {}
                },
                "required": [
                  "name",
                  "hourlyRateCents"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/rate-templates/{templateId}": {
      "delete": {
        "summary": "Delete one of the caller's own rate templates (sent invoices keep their snapshotted rate).",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Update one of the caller's own rate templates.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "templateId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {},
                  "hourlyRateCents": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/report": {
      "get": {
        "summary": "Org-level rollup of logged time by project, user, or day. Workspace admins only.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {}
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {}
          },
          {
            "name": "groupBy",
            "in": "query",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/task-totals": {
      "get": {
        "summary": "Total minutes logged per task in a project (all users, plus the caller's own share), for the per-task \"Total time\" chip and the task page's Time line. Team o...",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "projectId",
            "in": "query",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/team/invoices": {
      "get": {
        "summary": "Workspace admins only. Every member's time invoices whose period overlaps the range, including amounts. Invoices are otherwise private to the member who rais...",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {}
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {}
          },
          {
            "name": "userId",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/team/summary": {
      "get": {
        "summary": "Workspace admins only. Per-person tracked/billable/invoiced/paid totals for a date range, including staff who logged nothing.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {}
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/team/summary/export": {
      "get": {
        "summary": "Workspace admins only. The Team Time per-person table as a CSV file for the date range, with the money buckets included. Values match the on-screen summary e...",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "from",
            "in": "query",
            "required": true,
            "schema": {}
          },
          {
            "name": "to",
            "in": "query",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/team/timers": {
      "get": {
        "summary": "Workspace admins only. Every timer running right now, with who is running it. Powers the \"working right now\" strip on Team Time.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/timer": {
      "get": {
        "summary": "The caller's running timer in this workspace, if any. Stored server-side so refreshes and other devices keep ticking.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/timer/clock-in": {
      "patch": {
        "summary": "Move the running timer's clock-in time (e.g. it was started late); the elapsed count follows.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "startedAt": {}
                },
                "required": [
                  "startedAt"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/timer/start": {
      "delete": {
        "summary": "Discard the caller's running timer without logging an entry.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Start (or replace) the caller's live timer against an eligible project/task.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "projectId": {},
                  "taskId": {},
                  "startedAt": {},
                  "replace": {},
                  "billable": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/timer/stop": {
      "post": {
        "summary": "Stop the caller's running timer and log the elapsed time as an entry (rounded up to a whole minute).",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "note": {},
                  "billable": {},
                  "stoppedAt": {},
                  "tzOffsetMinutes": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/timesheets": {
      "post": {
        "summary": "Compile visible entries in a date range into a timesheet, optionally emailing it (as CSV or PDF) to selected members and/or external addresses. The response ...",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "from": {},
                  "to": {},
                  "projectId": {},
                  "userId": {},
                  "recipientUserIds": {},
                  "externalEmails": {},
                  "emailFormat": {}
                },
                "required": [
                  "from",
                  "to"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/time-tracking/visibility": {
      "get": {
        "summary": "The caller's timesheet peer-visibility setting in this workspace.",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "summary": "Replace the caller's timesheet peer-visibility setting (viewer list is replace-not-merge).",
        "x-dashera-module": "timeTracking",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "tier": {},
                  "viewerIds": {}
                },
                "required": [
                  "tier",
                  "viewerIds"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tutorials": {
      "get": {
        "summary": "List published tutorials visible to the caller (admins also see drafts).",
        "x-dashera-module": "tutorials",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "mine",
            "in": "query",
            "required": false,
            "schema": {}
          },
          {
            "name": "projectId",
            "in": "query",
            "required": false,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Create a draft tutorial. Admin/member only.",
        "x-dashera-module": "tutorials",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {},
                  "description": {},
                  "storageKey": {},
                  "thumbnailKey": {},
                  "durationMs": {},
                  "sizeBytes": {},
                  "contentType": {},
                  "audience": {},
                  "clientVisible": {},
                  "publish": {},
                  "trimStartMs": {},
                  "trimEndMs": {},
                  "uploadPartCount": {}
                },
                "required": [
                  "title",
                  "storageKey",
                  "durationMs",
                  "sizeBytes",
                  "contentType",
                  "audience"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tutorials/{tutorialId}": {
      "delete": {
        "summary": "Delete a tutorial. Author or admin only.",
        "x-dashera-module": "tutorials",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tutorialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "summary": "Fetch a single tutorial with its audience entries.",
        "x-dashera-module": "tutorials",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tutorialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "patch": {
        "summary": "Update title, description, audience, or publish state. Author or admin only.",
        "x-dashera-module": "tutorials",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tutorialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "title": {},
                  "description": {},
                  "audience": {},
                  "published": {},
                  "clientVisible": {}
                },
                "required": []
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tutorials/{tutorialId}/comments": {
      "get": {
        "summary": "List comments on a tutorial in chronological order.",
        "x-dashera-module": "tutorials",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tutorialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Post a comment on a tutorial.",
        "x-dashera-module": "tutorials",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tutorialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {},
                  "attachments": {}
                },
                "required": [
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tutorials/{tutorialId}/comments/{commentId}": {
      "patch": {
        "summary": "Edit a tutorial comment's text and attachments (author only).",
        "x-dashera-module": "tutorials",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tutorialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "body": {},
                  "attachments": {}
                },
                "required": [
                  "body"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tutorials/{tutorialId}/comments/{commentId}/boosts": {
      "delete": {
        "summary": "Remove the caller's boost from a tutorial comment.",
        "x-dashera-module": "tutorials",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tutorialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "content",
            "in": "query",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "summary": "Add a boost (emoji or short phrase) to a tutorial comment.",
        "x-dashera-module": "tutorials",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tutorialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "commentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "content": {}
                },
                "required": [
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tutorials/{tutorialId}/playback-url": {
      "get": {
        "summary": "Mint a short-lived signed GET URL for the recorded video.",
        "x-dashera-module": "tutorials",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tutorialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tutorials/{tutorialId}/transcript": {
      "get": {
        "summary": "Get the auto-generated transcript and WebVTT captions for a tutorial.",
        "x-dashera-module": "tutorials",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tutorialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tutorials/{tutorialId}/transcript/retry": {
      "post": {
        "summary": "Retry a failed or skipped transcription (author or admin only).",
        "x-dashera-module": "tutorials",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tutorialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tutorials/{tutorialId}/trim": {
      "post": {
        "summary": "Cut an intro and/or outro off an already-saved guide (author or admin only).",
        "x-dashera-module": "tutorials",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tutorialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "startMs": {},
                  "endMs": {}
                },
                "required": [
                  "startMs"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tutorials/{tutorialId}/watch": {
      "post": {
        "summary": "Record that the caller watched (or re-watched) the tutorial.",
        "x-dashera-module": "tutorials",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tutorialId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/tutorials/upload-url": {
      "post": {
        "summary": "Mint a short-lived signed PUT URL for uploading the recorded video. Admin/member only.",
        "x-dashera-module": "tutorials",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "contentType": {},
                  "sizeBytes": {},
                  "kind": {},
                  "partCount": {}
                },
                "required": [
                  "contentType",
                  "sizeBytes"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/session-memory/checkpoints": {
      "post": {
        "summary": "checkpoint_work: save this session's checkpoint and Session Card (your own session only).",
        "x-dashera-module": "your own",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session": {},
                  "operationKey": {},
                  "expectedVersion": {},
                  "content": {},
                  "coding": {},
                  "taskIds": {},
                  "card": {},
                  "compactAfter": {},
                  "requestedVia": {}
                },
                "required": [
                  "session",
                  "operationKey",
                  "expectedVersion",
                  "content"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/session-memory/identity": {
      "get": {
        "summary": "This session's context epoch and card version.",
        "x-dashera-module": "your own",
        "x-dashera-writes": false,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "session",
            "in": "query",
            "required": true,
            "schema": {}
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/workspaces/{workspaceId}/session-memory/resume": {
      "post": {
        "summary": "resume_work: restore this session's card and latest checkpoint; takeOver takes another session over: at once for the same agent, after its owner approves for another agent.",
        "x-dashera-module": "your own",
        "x-dashera-writes": true,
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "session": {},
                  "takeOver": {},
                  "confirm": {},
                  "newContext": {},
                  "contextOperation": {},
                  "contextTokens": {},
                  "compaction": {},
                  "checkpointId": {},
                  "includePatch": {},
                  "contextNotice": {},
                  "holdReason": {}
                },
                "required": [
                  "session"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  }
}
