{
  "openapi": "3.0.0",
  "info": {
    "title": "not24get.me",
    "version": "0.0.1",
    "description": "A unified app for sharing bookmarks cross browsers",
    "contact": {
      "name": "Support",
      "email": "support@not24get.me"
    }
  },
  "paths": {
    "/api/v1/api-keys/{keyId}/revoke": {
      "post": {
        "x-controller-name": "ApiKeyController",
        "x-operation-name": "revoke",
        "tags": ["api-keys"],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "keyId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ApiKeyController.revoke",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyRequest"
              }
            }
          },
          "required": false
        },
        "summary": "Revoke API key",
        "description": "Permanently disables an API key. Returns no body on success."
      }
    },
    "/api/v1/api-keys/{keyId}/rotate": {
      "post": {
        "x-controller-name": "ApiKeyController",
        "x-operation-name": "rotate",
        "tags": ["api-keys"],
        "responses": {
          "200": {
            "description": "Rotated API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApiKeyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "keyId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "ApiKeyController.rotate",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyRequest"
              }
            }
          },
          "required": false
        },
        "summary": "Rotate API key",
        "description": "Issues a new secret for an existing API key. The previous secret stops working immediately."
      }
    },
    "/api/v1/api-keys": {
      "post": {
        "x-controller-name": "ApiKeyController",
        "x-operation-name": "create",
        "tags": ["api-keys"],
        "responses": {
          "201": {
            "description": "Created API key",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateApiKeyResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            }
          },
          "required": true
        },
        "operationId": "ApiKeyController.create",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Create API key",
        "description": "Creates a new automation API key. The raw secret is returned once in the response."
      },
      "get": {
        "x-controller-name": "ApiKeyController",
        "x-operation-name": "list",
        "tags": ["api-keys"],
        "responses": {
          "200": {
            "description": "List API key metadata",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ApiKeyMetadata"
                  }
                }
              }
            }
          }
        },
        "operationId": "ApiKeyController.list",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "List API keys",
        "description": "Lists metadata for automation API keys in the tenant. Secrets are never returned."
      }
    },
    "/api/v1/bookmarks/imports": {
      "post": {
        "x-controller-name": "ApiV1BookmarkController",
        "x-operation-name": "importBookmarks",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Import bookmarks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportSummary"
                }
              }
            }
          }
        },
        "operationId": "ApiV1BookmarkController.importBookmarks",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ImportBookmarksMultipartRequest"
              }
            }
          },
          "required": true
        },
        "summary": "Import bookmarks (API key)",
        "description": "Imports bookmarks from an uploaded HTML or JSON file into the target workspace."
      }
    },
    "/api/v1/bookmarks/{bookmark_id}": {
      "patch": {
        "x-controller-name": "ApiV1BookmarkController",
        "x-operation-name": "update",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Update bookmark",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bookmark"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "bookmark_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchBookmarkRequest"
              }
            }
          },
          "x-parameter-index": 1,
          "required": true
        },
        "operationId": "ApiV1BookmarkController.update",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Update bookmark (API key)",
        "description": "Partially updates bookmark fields such as title, tags, folder, or archive settings."
      },
      "get": {
        "x-controller-name": "ApiV1BookmarkController",
        "x-operation-name": "getById",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Get bookmark",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bookmark"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "bookmark_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "ApiV1BookmarkController.getById",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Get bookmark (API key)",
        "description": "Returns a single bookmark by id using API key authentication."
      },
      "delete": {
        "x-controller-name": "ApiV1BookmarkController",
        "x-operation-name": "deleteById",
        "tags": ["bookmarks"],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "bookmark_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "ApiV1BookmarkController.deleteById",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Delete bookmark (API key)",
        "description": "Soft-deletes a bookmark. Returns no body on success."
      }
    },
    "/api/v1/bookmarks": {
      "post": {
        "x-controller-name": "ApiV1BookmarkController",
        "x-operation-name": "create",
        "tags": ["bookmarks"],
        "responses": {
          "201": {
            "description": "Create bookmark",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bookmark"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBookmarkRequest"
              }
            }
          },
          "required": true
        },
        "operationId": "ApiV1BookmarkController.create",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "summary": "Create bookmark (API key)",
        "description": "Creates a bookmark in the workspace identified by the API key or X-Workspace-ID header."
      },
      "get": {
        "x-controller-name": "ApiV1BookmarkController",
        "x-operation-name": "list",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "List bookmarks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Bookmark"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "folderId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "ApiV1BookmarkController.list",
        "security": [
          {
            "bearerApiKey": []
          }
        ],
        "summary": "List bookmarks (API key)",
        "description": "Lists bookmarks in the workspace scope using API key authentication. Supports pagination and filters."
      }
    },
    "/api/v1/groups/{groupId}/members/{membershipId}": {
      "delete": {
        "x-controller-name": "GroupController",
        "x-operation-name": "removeMember",
        "tags": ["groups"],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "membershipId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "GroupController.removeMember",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Remove group member",
        "description": "Removes a membership row from the group. Returns no body on success."
      }
    },
    "/api/v1/groups/{groupId}/members": {
      "post": {
        "x-controller-name": "GroupController",
        "x-operation-name": "addMember",
        "tags": ["groups"],
        "responses": {
          "201": {
            "description": "Member added",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GroupMembership"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddGroupMemberRequest"
              }
            }
          },
          "x-parameter-index": 1,
          "required": true
        },
        "operationId": "GroupController.addMember",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Add group member",
        "description": "Adds an account to the group."
      },
      "get": {
        "x-controller-name": "GroupController",
        "x-operation-name": "listMembers",
        "tags": ["groups"],
        "responses": {
          "200": {
            "description": "Group members",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/GroupMembership"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "GroupController.listMembers",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "List group members",
        "description": "Lists accounts assigned to the group."
      }
    },
    "/api/v1/groups/{groupId}": {
      "patch": {
        "x-controller-name": "GroupController",
        "x-operation-name": "updateGroup",
        "tags": ["groups"],
        "responses": {
          "200": {
            "description": "Group updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Group"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchGroupRequest"
              }
            }
          },
          "x-parameter-index": 1,
          "required": true
        },
        "operationId": "GroupController.updateGroup",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Update group",
        "description": "Updates group name or description."
      },
      "delete": {
        "x-controller-name": "GroupController",
        "x-operation-name": "deleteGroup",
        "tags": ["groups"],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "groupId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "GroupController.deleteGroup",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Delete group",
        "description": "Deletes a group when it is no longer referenced. Returns no body on success."
      }
    },
    "/api/v1/groups": {
      "post": {
        "x-controller-name": "GroupController",
        "x-operation-name": "createGroup",
        "tags": ["groups"],
        "responses": {
          "201": {
            "description": "Group created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Group"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateGroupRequest"
              }
            }
          },
          "required": true
        },
        "operationId": "GroupController.createGroup",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Create group",
        "description": "Creates a new permission group with an optional description."
      },
      "get": {
        "x-controller-name": "GroupController",
        "x-operation-name": "listGroups",
        "tags": ["groups"],
        "responses": {
          "200": {
            "description": "List of groups",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Group"
                  }
                }
              }
            }
          }
        },
        "operationId": "GroupController.listGroups",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "List groups",
        "description": "Lists permission groups defined for the tenant."
      }
    },
    "/api/v1/me/home-organization": {
      "patch": {
        "x-controller-name": "MeController",
        "x-operation-name": "patchHomeOrganization",
        "tags": ["me"],
        "responses": {
          "200": {
            "description": "Home organization (default sign-in tenant) updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PatchHomeOrganizationResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchHomeOrganizationRequest"
              }
            }
          },
          "required": true
        },
        "operationId": "MeController.patchHomeOrganization",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Set home organization",
        "description": "Selects which tenant organization is treated as the user home organization in the product UI."
      }
    },
    "/api/v1/me/organization-users/{accountId}": {
      "patch": {
        "x-controller-name": "MeController",
        "x-operation-name": "patchOrganizationUser",
        "tags": ["me"],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchOrganizationUserRequest"
              }
            }
          },
          "x-parameter-index": 1,
          "required": true
        },
        "operationId": "MeController.patchOrganizationUser",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Update organization member",
        "description": "Changes a member role and/or grants all-workspace membership for the tenant. Admin only. Returns no body on success."
      }
    },
    "/api/v1/me/organization-users": {
      "get": {
        "x-controller-name": "MeController",
        "x-operation-name": "getOrganizationUsers",
        "tags": ["me"],
        "responses": {
          "200": {
            "description": "Users that belong to the current tenant organization",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrganizationUser"
                  }
                }
              }
            }
          }
        },
        "operationId": "MeController.getOrganizationUsers",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "List organization members",
        "description": "Lists all accounts in the tenant with roles and workspace membership counts. Admin only."
      }
    },
    "/api/v1/me/organizations": {
      "get": {
        "x-controller-name": "MeController",
        "x-operation-name": "listOrganizations",
        "tags": ["me"],
        "responses": {
          "200": {
            "description": "Organizations the account belongs to (active memberships), sorted by display name",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrganizationMembership"
                  }
                }
              }
            }
          }
        },
        "operationId": "MeController.listOrganizations",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "List my organizations",
        "description": "Lists tenant memberships and organization roles for the signed-in account."
      }
    },
    "/api/v1/me/permissions": {
      "get": {
        "x-controller-name": "MeController",
        "x-operation-name": "getPermissions",
        "tags": ["me"],
        "responses": {
          "200": {
            "description": "Effective permissions for the current user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PermissionsResponse"
                }
              }
            }
          }
        },
        "operationId": "MeController.getPermissions",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Get my permissions",
        "description": "Returns effective permission keys for the signed-in user within the current tenant."
      }
    },
    "/api/v1/me/tenant": {
      "patch": {
        "x-controller-name": "MeController",
        "x-operation-name": "patchTenantOrganization",
        "tags": ["me"],
        "responses": {
          "200": {
            "description": "Organization display name updated (unique across tenants)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountProfile"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchTenantRequest"
              }
            }
          },
          "required": true
        },
        "operationId": "MeController.patchTenantOrganization",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Update tenant settings",
        "description": "Updates tenant-level settings the current admin is allowed to change (for example display name)."
      }
    },
    "/api/v1/me": {
      "patch": {
        "x-controller-name": "MeController",
        "x-operation-name": "patchMe",
        "tags": ["me"],
        "responses": {
          "200": {
            "description": "Updated profile",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountProfile"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchMeRequest"
              }
            }
          },
          "required": true
        },
        "operationId": "MeController.patchMe",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Update my profile",
        "description": "Updates display name, avatar URL, or other self-service profile fields for the signed-in account."
      },
      "get": {
        "x-controller-name": "MeController",
        "x-operation-name": "getMe",
        "tags": ["me"],
        "responses": {
          "200": {
            "description": "Current account profile",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AccountProfile"
                }
              }
            }
          }
        },
        "operationId": "MeController.getMe",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Get my profile",
        "description": "Returns the signed-in account profile, tenant context, and feature flags visible to the current user."
      }
    },
    "/api/v1/organizations/units/{unitId}": {
      "patch": {
        "x-controller-name": "OrganizationController",
        "x-operation-name": "updateUnit",
        "tags": ["organizations"],
        "responses": {
          "200": {
            "description": "Organizational unit updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationUnit"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "unitId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchOrganizationUnitRequest"
              }
            }
          },
          "x-parameter-index": 1,
          "required": true
        },
        "operationId": "OrganizationController.updateUnit",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Update organization unit",
        "description": "Updates unit name, parent, or metadata."
      },
      "get": {
        "x-controller-name": "OrganizationController",
        "x-operation-name": "getUnit",
        "tags": ["organizations"],
        "responses": {
          "200": {
            "description": "Organizational unit",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationUnit"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "unitId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "OrganizationController.getUnit",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Get organization unit",
        "description": "Returns a single organizational unit by id."
      },
      "delete": {
        "x-controller-name": "OrganizationController",
        "x-operation-name": "deleteUnit",
        "tags": ["organizations"],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "unitId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "OrganizationController.deleteUnit",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Delete organization unit",
        "description": "Deletes an organizational unit. Returns no body on success."
      }
    },
    "/api/v1/organizations/units": {
      "post": {
        "x-controller-name": "OrganizationController",
        "x-operation-name": "createUnit",
        "tags": ["organizations"],
        "responses": {
          "201": {
            "description": "Organizational unit created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OrganizationUnit"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganizationUnitRequest"
              }
            }
          },
          "required": true
        },
        "operationId": "OrganizationController.createUnit",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Create organization unit",
        "description": "Creates a new organizational unit node."
      },
      "get": {
        "x-controller-name": "OrganizationController",
        "x-operation-name": "listUnits",
        "tags": ["organizations"],
        "responses": {
          "200": {
            "description": "List of organizational units",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/OrganizationUnit"
                  }
                }
              }
            }
          }
        },
        "operationId": "OrganizationController.listUnits",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "List organization units",
        "description": "Lists organizational units used for RBAC scoping within the tenant."
      }
    },
    "/api/v1/role-assignments/{id}": {
      "delete": {
        "x-controller-name": "RoleAssignmentController",
        "x-operation-name": "revoke",
        "tags": ["role-assignments"],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "RoleAssignmentController.revoke",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Revoke role assignment",
        "description": "Removes a role assignment. Returns no body on success."
      }
    },
    "/api/v1/role-assignments": {
      "post": {
        "x-controller-name": "RoleAssignmentController",
        "x-operation-name": "assign",
        "tags": ["role-assignments"],
        "responses": {
          "201": {
            "description": "Role assigned",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RoleAssignment"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleAssignmentRequest"
              }
            }
          },
          "required": true
        },
        "operationId": "RoleAssignmentController.assign",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Create role assignment",
        "description": "Assigns a role to a principal within an organizational scope."
      },
      "get": {
        "x-controller-name": "RoleAssignmentController",
        "x-operation-name": "list",
        "tags": ["role-assignments"],
        "responses": {
          "200": {
            "description": "List of role assignments",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/RoleAssignment"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "accountId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "groupId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "roleId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "RoleAssignmentController.list",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "List role assignments",
        "description": "Lists role assignments binding accounts or groups to roles within scopes."
      }
    },
    "/api/v1/roles/{roleId}": {
      "patch": {
        "x-controller-name": "RoleController",
        "x-operation-name": "updateRole",
        "tags": ["roles"],
        "responses": {
          "200": {
            "description": "Role updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Role"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchRoleRequest"
              }
            }
          },
          "x-parameter-index": 1,
          "required": true
        },
        "operationId": "RoleController.updateRole",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Update role",
        "description": "Updates role name, description, or permissions."
      },
      "delete": {
        "x-controller-name": "RoleController",
        "x-operation-name": "deleteRole",
        "tags": ["roles"],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "RoleController.deleteRole",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Delete role",
        "description": "Deletes a custom role. Returns no body on success."
      }
    },
    "/api/v1/roles": {
      "post": {
        "x-controller-name": "RoleController",
        "x-operation-name": "createRole",
        "tags": ["roles"],
        "responses": {
          "201": {
            "description": "Role created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Role"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            }
          },
          "required": true
        },
        "operationId": "RoleController.createRole",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Create role",
        "description": "Creates a custom role with a permission set."
      },
      "get": {
        "x-controller-name": "RoleController",
        "x-operation-name": "listRoles",
        "tags": ["roles"],
        "responses": {
          "200": {
            "description": "List of roles",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Role"
                  }
                }
              }
            }
          }
        },
        "operationId": "RoleController.listRoles",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "List roles",
        "description": "Lists custom roles and built-in role templates available in the tenant."
      }
    },
    "/auth/login": {
      "post": {
        "x-controller-name": "AuthController",
        "x-operation-name": "login",
        "tags": ["auth"],
        "responses": {
          "200": {
            "description": "Login successful: either tenant JWT, or 2FA challenge (preAuthToken)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LoginResponse"
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests",
            "content": {
              "application/json": {
                "schema": {
                  "description": "Too many login attempts from this IP in the current window; Retry-After and X-RateLimit-* apply"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoginRequest"
              }
            }
          },
          "required": true
        },
        "operationId": "AuthController.login",
        "summary": "Sign in",
        "description": "Exchange email and password for a tenant session JWT or a short-lived pre-auth token when two-factor authentication is required."
      }
    },
    "/auth/refresh": {
      "post": {
        "x-controller-name": "AuthController",
        "x-operation-name": "refresh",
        "tags": ["auth"],
        "responses": {
          "200": {
            "description": "New access and refresh tokens",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RefreshResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshRequest"
              }
            }
          },
          "required": true
        },
        "operationId": "AuthController.refresh",
        "summary": "Refresh session",
        "description": "Exchange a refresh token for a new access token without re-entering credentials."
      }
    },
    "/billing/usage": {
      "get": {
        "x-controller-name": "TenantBillingController",
        "x-operation-name": "usageSnapshot",
        "tags": ["usage"],
        "responses": {
          "200": {
            "description": "Tenant usage meters and effective plan limits for the authenticated tenant",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TenantUsageSnapshot"
                }
              }
            }
          }
        },
        "operationId": "TenantBillingController.usageSnapshot",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Get tenant usage",
        "description": "Returns current billing period usage counters and plan limits for the authenticated tenant."
      }
    },
    "/folders/shared/{token}/bookmarks/{bookmarkId}": {
      "patch": {
        "x-controller-name": "SharedBookmarkController",
        "x-operation-name": "patch",
        "tags": ["shared-folders"],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bookmark"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "bookmarkId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchBookmarkRequest"
              }
            }
          },
          "x-parameter-index": 2,
          "required": true
        },
        "operationId": "SharedBookmarkController.patch",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Update shared folder bookmark",
        "description": "Updates a bookmark when the share link grants write access."
      },
      "get": {
        "x-controller-name": "SharedBookmarkController",
        "x-operation-name": "getById",
        "tags": ["shared-folders"],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bookmark"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "bookmarkId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "SharedBookmarkController.getById",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Get shared folder bookmark",
        "description": "Returns one bookmark from a shared folder link."
      },
      "delete": {
        "x-controller-name": "SharedBookmarkController",
        "x-operation-name": "deleteById",
        "tags": ["shared-folders"],
        "responses": {
          "204": {
            "description": "204",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "bookmarkId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "SharedBookmarkController.deleteById",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Delete shared folder bookmark",
        "description": "Deletes a bookmark when the share link grants write access."
      }
    },
    "/folders/shared/{token}/bookmarks": {
      "post": {
        "x-controller-name": "SharedBookmarkController",
        "x-operation-name": "create",
        "tags": ["shared-folders"],
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bookmark"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateSharedBookmarkRequest"
              }
            }
          },
          "x-parameter-index": 1,
          "required": true
        },
        "operationId": "SharedBookmarkController.create",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Create shared folder bookmark",
        "description": "Creates a bookmark inside a read-write shared folder link."
      },
      "get": {
        "x-controller-name": "SharedBookmarkController",
        "x-operation-name": "list",
        "tags": ["shared-folders"],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Bookmark"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "SharedBookmarkController.list",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "List shared folder bookmarks",
        "description": "Lists bookmarks visible through a shared folder link."
      }
    },
    "/folders/shared/{token}": {
      "get": {
        "x-controller-name": "SharedFolderController",
        "x-operation-name": "getAggregate",
        "tags": ["shared-folders"],
        "responses": {
          "200": {
            "description": "Shared folder and bookmarks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SharedFolderView"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "SharedFolderController.getAggregate",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "View shared folder",
        "description": "Returns shared folder metadata for an unauthenticated share link token."
      }
    },
    "/invitations/{token}/accept": {
      "post": {
        "x-controller-name": "InvitationController",
        "x-operation-name": "accept",
        "tags": ["invitations"],
        "responses": {
          "200": {
            "description": "Invitation accepted; membership created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AcceptInvitationResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AcceptInvitationRequest"
              }
            }
          },
          "x-parameter-index": 1,
          "required": true
        },
        "operationId": "InvitationController.accept",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Accept invitation",
        "description": "Accepts an invitation token and creates or links the member account."
      }
    },
    "/invitations/{invitationId}/resend": {
      "post": {
        "x-controller-name": "InvitationController",
        "x-operation-name": "resend",
        "tags": ["invitations"],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "InvitationController.resend",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EmptyRequest"
              }
            }
          },
          "required": false
        },
        "summary": "Resend invitation",
        "description": "Resends the invitation email for a pending invite. Admin only. Returns no body on success."
      }
    },
    "/invitations/{invitationId}": {
      "delete": {
        "x-controller-name": "InvitationController",
        "x-operation-name": "revoke",
        "tags": ["invitations"],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "invitationId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          }
        ],
        "operationId": "InvitationController.revoke",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Revoke invitation",
        "description": "Cancels a pending invitation. Returns no body on success."
      }
    },
    "/invitations": {
      "post": {
        "x-controller-name": "InvitationController",
        "x-operation-name": "create",
        "tags": ["invitations"],
        "responses": {
          "201": {
            "description": "Invitation created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateInvitationResponse"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvitationRequest"
              }
            }
          },
          "required": true
        },
        "operationId": "InvitationController.create",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Send invitation",
        "description": "Invites a new member by email with optional group assignments. Admin only."
      },
      "get": {
        "x-controller-name": "InvitationController",
        "x-operation-name": "listPending",
        "tags": ["invitations"],
        "responses": {
          "200": {
            "description": "Pending invitations for the tenant",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/PendingInvitationRow"
                  }
                }
              }
            }
          }
        },
        "operationId": "InvitationController.listPending",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "List pending invitations",
        "description": "Lists outstanding tenant member invitations. Admin only."
      }
    },
    "/ping": {
      "get": {
        "x-controller-name": "PingController",
        "x-operation-name": "ping",
        "tags": ["ping"],
        "responses": {
          "200": {
            "description": "Ping Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PingResponse"
                }
              }
            }
          }
        },
        "operationId": "PingController.ping",
        "summary": "Health check",
        "description": "Returns a greeting and server metadata. Use to verify API reachability."
      }
    },
    "/workspaces/deleted": {
      "get": {
        "x-controller-name": "WorkspaceController",
        "x-operation-name": "listDeleted",
        "tags": ["workspaces"],
        "responses": {
          "200": {
            "description": "Soft-deleted workspaces in the tenant (admin only, SL-24)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DeletedWorkspaceSummary"
                  }
                }
              }
            }
          }
        },
        "operationId": "WorkspaceController.listDeleted",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "summary": "List deleted workspaces",
        "description": "Lists soft-deleted workspaces that can still be restored."
      }
    },
    "/workspaces/{workspaceId}/bookmarks/bulk-delete": {
      "post": {
        "x-controller-name": "BookmarkController",
        "x-operation-name": "bulkDelete",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Bulk delete bookmarks by id (SL-15)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkDeleteBookmarksResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BulkDeleteBookmarksRequest"
              }
            }
          },
          "x-parameter-index": 1,
          "required": true
        },
        "operationId": "BookmarkController.bulkDelete",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Bulk delete bookmarks",
        "description": "Deletes multiple bookmarks by id in one request."
      }
    },
    "/workspaces/{workspaceId}/bookmarks/check-links": {
      "post": {
        "x-controller-name": "BookmarkController",
        "x-operation-name": "checkLinks",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Bulk link health check in workspace scope (SL-378)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BulkLinkCheckResult"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "folderId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "BookmarkController.checkLinks",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Bulk check link health",
        "description": "Checks HTTP reachability for bookmarks in the workspace or a folder."
      }
    },
    "/workspaces/{workspaceId}/bookmarks/count": {
      "get": {
        "x-controller-name": "BookmarkController",
        "x-operation-name": "count",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Count bookmarks in workspace (optionally by folder or tag)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookmarkCountResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "folderId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "BookmarkController.count",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Count bookmarks",
        "description": "Returns bookmark counts optionally filtered by folder or tag."
      }
    },
    "/workspaces/{workspaceId}/bookmarks/delete-by-scope": {
      "post": {
        "x-controller-name": "BookmarkController",
        "x-operation-name": "deleteByScope",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Delete all bookmarks in workspace or folder scope (SL-15)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DeleteBookmarksByScopeResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DeleteBookmarksByScopeRequest"
              }
            }
          },
          "x-parameter-index": 1,
          "required": true
        },
        "operationId": "BookmarkController.deleteByScope",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Delete bookmarks by scope",
        "description": "Deletes bookmarks matching folder, tag, or search scope rules."
      }
    },
    "/workspaces/{workspaceId}/bookmarks/export": {
      "get": {
        "x-controller-name": "BookmarkController",
        "x-operation-name": "exportBookmarks",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Export filtered bookmarks as JSON or CSV (SL-378)",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BookmarkExportJson"
                }
              },
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "format",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "folderId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filterStatus",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "BookmarkController.exportBookmarks",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Export bookmarks JSON",
        "description": "Downloads a JSON export of bookmarks in the workspace."
      }
    },
    "/workspaces/{workspaceId}/bookmarks/import": {
      "post": {
        "x-controller-name": "BookmarkImportController",
        "x-operation-name": "importBookmarks",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Import bookmarks from Netscape HTML export",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ImportSummary"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "BookmarkImportController.importBookmarks",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/ImportBookmarksMultipartRequest"
              }
            }
          },
          "required": true
        },
        "summary": "Import bookmarks",
        "description": "Imports bookmarks from an uploaded HTML or JSON file."
      }
    },
    "/workspaces/{workspaceId}/bookmarks/preview-url": {
      "post": {
        "x-controller-name": "BookmarkController",
        "x-operation-name": "previewUrl",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Fetch title, description, and image for a URL via LinkPreview (client Save link form)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkPreviewResult"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PreviewUrlRequest"
              }
            }
          },
          "x-parameter-index": 1,
          "required": true
        },
        "operationId": "BookmarkController.previewUrl",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Preview URL metadata",
        "description": "Fetches link preview title, description, and image for a URL before saving a bookmark."
      }
    },
    "/workspaces/{workspaceId}/bookmarks/search": {
      "get": {
        "x-controller-name": "BookmarkController",
        "x-operation-name": "search",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Search bookmarks",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Bookmark"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "BookmarkController.search",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Search bookmarks",
        "description": "Full-text search over bookmark titles, URLs, tags, and descriptions."
      }
    },
    "/workspaces/{workspaceId}/bookmarks/snapshot-search": {
      "get": {
        "x-controller-name": "BookmarkController",
        "x-operation-name": "snapshotSearch",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Search within snapshot text index (SL-378)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/SnapshotSearchHit"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "BookmarkController.snapshotSearch",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Search archived snapshots",
        "description": "Searches text extracted from archived page snapshots."
      }
    },
    "/workspaces/{workspaceId}/bookmarks/{id}/check-link": {
      "post": {
        "x-controller-name": "BookmarkController",
        "x-operation-name": "checkLink",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Check single bookmark link health (SL-378)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LinkHealthResult"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "BookmarkController.checkLink",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Check bookmark link",
        "description": "Checks HTTP reachability for a single bookmark URL."
      }
    },
    "/workspaces/{workspaceId}/bookmarks/{id}/enrich-metadata": {
      "post": {
        "x-controller-name": "BookmarkController",
        "x-operation-name": "enrichMetadata",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Fill blank bookmark title, description, and tags from LinkPreview when configured",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bookmark"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "BookmarkController.enrichMetadata",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Enrich bookmark metadata",
        "description": "Fills blank title, description, and tags from link preview when available."
      }
    },
    "/workspaces/{workspaceId}/bookmarks/{id}/reader": {
      "get": {
        "x-controller-name": "BookmarkController",
        "x-operation-name": "getReader",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Reader preview payload (SL-378)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReaderPayload"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "BookmarkController.getReader",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Get reader payload",
        "description": "Returns reader-mode HTML or excerpt content for a bookmark."
      }
    },
    "/workspaces/{workspaceId}/bookmarks/{id}": {
      "patch": {
        "x-controller-name": "BookmarkController",
        "x-operation-name": "update",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Update bookmark",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bookmark"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchBookmarkRequest"
              }
            }
          },
          "x-parameter-index": 2,
          "required": true
        },
        "operationId": "BookmarkController.update",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Update bookmark",
        "description": "Partially updates bookmark fields such as title, tags, folder, or reader excerpt."
      },
      "get": {
        "x-controller-name": "BookmarkController",
        "x-operation-name": "getById",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Get bookmark by id",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bookmark"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "BookmarkController.getById",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Get bookmark",
        "description": "Returns a bookmark by id within the workspace."
      },
      "delete": {
        "x-controller-name": "BookmarkController",
        "x-operation-name": "deleteById",
        "tags": ["bookmarks"],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "BookmarkController.deleteById",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Delete bookmark",
        "description": "Soft-deletes a bookmark. Returns no body on success."
      }
    },
    "/workspaces/{workspaceId}/bookmarks": {
      "post": {
        "x-controller-name": "BookmarkController",
        "x-operation-name": "create",
        "tags": ["bookmarks"],
        "responses": {
          "201": {
            "description": "Create bookmark",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Bookmark"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBookmarkRequest"
              }
            }
          },
          "x-parameter-index": 1,
          "required": true
        },
        "operationId": "BookmarkController.create",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Create bookmark",
        "description": "Creates a bookmark in the workspace, optionally capturing archive metadata."
      },
      "get": {
        "x-controller-name": "BookmarkController",
        "x-operation-name": "list",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "List bookmarks in workspace",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Bookmark"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "tag",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "folderId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sortBy",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "filterStatus",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "BookmarkController.list",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "List bookmarks",
        "description": "Lists bookmarks in the workspace with optional folder and tag filters."
      }
    },
    "/workspaces/{workspaceId}/export/bookmarks.html": {
      "get": {
        "x-controller-name": "WorkspaceController",
        "x-operation-name": "exportBookmarksHtml",
        "tags": ["bookmarks"],
        "responses": {
          "200": {
            "description": "Netscape bookmark file for the workspace (SL-24)",
            "content": {
              "text/html": {
                "schema": {
                  "$ref": "#/components/schemas/NetscapeBookmarksHtml"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "WorkspaceController.exportBookmarksHtml",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Export bookmarks HTML",
        "description": "Downloads a Netscape bookmark HTML export for the workspace."
      }
    },
    "/workspaces/{workspaceId}/folders/{folderId}/shares/{shareId}": {
      "delete": {
        "x-controller-name": "FolderShareController",
        "x-operation-name": "revokeShare",
        "tags": ["shared-folders"],
        "responses": {
          "204": {
            "description": "204",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "folderId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "shareId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "FolderShareController.revokeShare",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Revoke folder share",
        "description": "Revokes an active folder share link. Returns no body on success."
      }
    },
    "/workspaces/{workspaceId}/folders/{folderId}/shares": {
      "post": {
        "x-controller-name": "FolderShareController",
        "x-operation-name": "createShare",
        "tags": ["shared-folders"],
        "responses": {
          "201": {
            "description": "201",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateFolderShareResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "folderId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFolderShareRequest"
              }
            }
          },
          "x-parameter-index": 2,
          "required": true
        },
        "operationId": "FolderShareController.createShare",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Create folder share",
        "description": "Creates a read-only or read-write share link for a folder."
      },
      "get": {
        "x-controller-name": "FolderShareController",
        "x-operation-name": "listShares",
        "tags": ["shared-folders"],
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/FolderShare"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "folderId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "FolderShareController.listShares",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "List folder shares",
        "description": "Lists active share links for a folder."
      }
    },
    "/workspaces/{workspaceId}/folders/{id}": {
      "patch": {
        "x-controller-name": "FolderController",
        "x-operation-name": "update",
        "tags": ["folders"],
        "responses": {
          "200": {
            "description": "Update folder",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Folder"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PatchFolderRequest"
              }
            }
          },
          "x-parameter-index": 2,
          "required": true
        },
        "operationId": "FolderController.update",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Update folder",
        "description": "Renames a folder or moves it within the tree."
      },
      "get": {
        "x-controller-name": "FolderController",
        "x-operation-name": "getById",
        "tags": ["folders"],
        "responses": {
          "200": {
            "description": "Get folder",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Folder"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "FolderController.getById",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Get folder",
        "description": "Returns folder metadata by id."
      },
      "delete": {
        "x-controller-name": "FolderController",
        "x-operation-name": "deleteById",
        "tags": ["folders"],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "FolderController.deleteById",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Delete folder",
        "description": "Deletes a folder and optionally its contents. Returns no body on success."
      }
    },
    "/workspaces/{workspaceId}/folders": {
      "post": {
        "x-controller-name": "FolderController",
        "x-operation-name": "create",
        "tags": ["folders"],
        "responses": {
          "201": {
            "description": "Create folder",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Folder"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFolderRequest"
              }
            }
          },
          "x-parameter-index": 1,
          "required": true
        },
        "operationId": "FolderController.create",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Create folder",
        "description": "Creates a folder under the workspace root or a parent folder."
      },
      "get": {
        "x-controller-name": "FolderController",
        "x-operation-name": "list",
        "tags": ["folders"],
        "responses": {
          "200": {
            "description": "List folders",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Folder"
                  }
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "FolderController.list",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "List folders",
        "description": "Lists folders in the workspace tree."
      }
    },
    "/workspaces/{workspaceId}/hub-settings": {
      "patch": {
        "x-controller-name": "WorkspaceController",
        "x-operation-name": "updateHubSettings",
        "tags": ["workspaces"],
        "responses": {
          "200": {
            "description": "Update SL-378 hub preferences for a workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateHubSettingsRequest"
              }
            }
          },
          "x-parameter-index": 1,
          "required": true
        },
        "operationId": "WorkspaceController.updateHubSettings",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Update hub settings",
        "description": "Updates workspace hub layout and scheduling preferences."
      }
    },
    "/workspaces/{workspaceId}": {
      "patch": {
        "x-controller-name": "WorkspaceController",
        "x-operation-name": "updateById",
        "tags": ["workspaces"],
        "responses": {
          "200": {
            "description": "Rename workspace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RenameWorkspaceRequest"
              }
            }
          },
          "x-parameter-index": 1,
          "required": true
        },
        "operationId": "WorkspaceController.updateById",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Rename workspace",
        "description": "Updates the workspace display name."
      },
      "get": {
        "x-controller-name": "WorkspaceController",
        "x-operation-name": "getById",
        "tags": ["workspaces"],
        "responses": {
          "200": {
            "description": "Workspace the current account belongs to",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "WorkspaceController.getById",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Get workspace",
        "description": "Returns workspace metadata including hub settings."
      },
      "delete": {
        "x-controller-name": "WorkspaceController",
        "x-operation-name": "deleteById",
        "tags": ["workspaces"],
        "responses": {
          "204": {
            "description": "No Content",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EmptyResponse"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "workspaceId",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true
          },
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "operationId": "WorkspaceController.deleteById",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "summary": "Delete workspace",
        "description": "Soft-deletes a workspace and its contents. Returns no body on success."
      }
    },
    "/workspaces": {
      "post": {
        "x-controller-name": "WorkspaceController",
        "x-operation-name": "create",
        "tags": ["workspaces"],
        "responses": {
          "201": {
            "description": "Workspace created; creator receives admin membership",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Workspace"
                }
              }
            }
          }
        },
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWorkspaceRequest"
              }
            }
          },
          "required": true
        },
        "operationId": "WorkspaceController.create",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "summary": "Create workspace",
        "description": "Creates a new workspace with an initial name and optional hub settings."
      },
      "get": {
        "x-controller-name": "WorkspaceController",
        "x-operation-name": "list",
        "tags": ["workspaces"],
        "responses": {
          "200": {
            "description": "Workspaces the current account belongs to (membership-scoped, not full tenant list)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Workspace"
                  }
                }
              }
            }
          }
        },
        "operationId": "WorkspaceController.list",
        "security": [
          {
            "bearerJwt": []
          },
          {
            "bearerApiKey": []
          }
        ],
        "parameters": [
          {
            "name": "X-Workspace-ID",
            "in": "header",
            "required": false,
            "description": "Target workspace when the API key is tenant-wide or to disambiguate scope.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "summary": "List workspaces",
        "description": "Lists workspaces the signed-in user can access in the current tenant."
      }
    }
  },
  "servers": [
    {
      "url": "https://api.not24get.me",
      "description": "Production API"
    }
  ],
  "components": {
    "schemas": {
      "EffectiveLimits": {
        "type": "object",
        "title": "EffectiveLimits",
        "required": [
          "maxWorkspaces",
          "maxApiCalls",
          "quotaWindow",
          "maxUserSeats",
          "aiTagCreditsPerPeriod",
          "entitlements"
        ],
        "properties": {
          "maxWorkspaces": {
            "type": "integer",
            "minimum": 0
          },
          "maxApiCalls": {
            "type": "integer",
            "minimum": 0
          },
          "quotaWindow": {
            "type": "string",
            "enum": ["per_utc_day", "billing_period"]
          },
          "maxUserSeats": {
            "type": "integer",
            "minimum": 0
          },
          "aiTagCreditsPerPeriod": {
            "type": "integer",
            "minimum": 0
          },
          "entitlements": {
            "$ref": "#/components/schemas/EffectiveLimitsPartEntitlements"
          }
        }
      },
      "TenantUsageSnapshot": {
        "type": "object",
        "title": "TenantUsageSnapshot",
        "required": ["usage", "effectiveLimits"],
        "properties": {
          "usage": {
            "$ref": "#/components/schemas/TenantUsageMetrics"
          },
          "effectiveLimits": {
            "$ref": "#/components/schemas/EffectiveLimits"
          }
        }
      },
      "PingResponse": {
        "type": "object",
        "title": "PingResponse",
        "properties": {
          "greeting": {
            "type": "string"
          },
          "date": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "headers": {
            "$ref": "#/components/schemas/PingResponseHeaders"
          }
        }
      },
      "BookmarkArchive": {
        "type": "object",
        "title": "BookmarkArchive",
        "properties": {
          "status": {
            "type": "string",
            "enum": ["none", "pending", "ready", "failed", "expired"]
          },
          "retentionExpiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "metadataId": {
            "type": "string"
          }
        }
      },
      "Bookmark": {
        "type": "object",
        "title": "Bookmark",
        "description": "Bookmark in a workspace (serialized API shape).",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "maxLength": 2048
          },
          "title": {
            "type": "string",
            "maxLength": 500
          },
          "description": {
            "type": "string",
            "maxLength": 2000
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "folderId": {
            "type": "string",
            "nullable": true
          },
          "sortOrder": {
            "type": "integer",
            "minimum": 0
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "linkStatus": {
            "type": "string",
            "enum": ["ok", "dead", "unknown"]
          },
          "lastLinkCheckedAt": {
            "type": "string",
            "format": "date-time"
          },
          "snapshotEnabled": {
            "type": "boolean"
          },
          "readerExcerpt": {
            "type": "string"
          },
          "videoEmbedUrl": {
            "type": "string"
          },
          "archive": {
            "$ref": "#/components/schemas/BookmarkArchive"
          }
        }
      },
      "CreateBookmarkRequest": {
        "type": "object",
        "title": "CreateBookmarkRequest",
        "properties": {
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "folderId": {
            "type": "string"
          },
          "archiveCapture": {
            "type": "boolean"
          },
          "noticeVersion": {
            "type": "string"
          },
          "snapshotEnabled": {
            "type": "boolean"
          },
          "readerExcerpt": {
            "type": "string"
          },
          "videoEmbedUrl": {
            "type": "string"
          }
        }
      },
      "PatchBookmarkRequest": {
        "type": "object",
        "title": "PatchBookmarkRequest",
        "properties": {
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "folderId": {
            "type": "string",
            "nullable": true
          },
          "archiveCapture": {
            "type": "boolean"
          },
          "noticeVersion": {
            "type": "string"
          },
          "sortOrder": {
            "type": "integer",
            "minimum": 0
          },
          "snapshotEnabled": {
            "type": "boolean"
          },
          "readerExcerpt": {
            "type": "string"
          },
          "videoEmbedUrl": {
            "type": "string"
          }
        }
      },
      "CreateSharedBookmarkRequest": {
        "type": "object",
        "title": "CreateSharedBookmarkRequest",
        "properties": {
          "url": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "folderId": {
            "type": "string"
          },
          "archiveCapture": {
            "type": "boolean"
          }
        }
      },
      "PreviewUrlRequest": {
        "type": "object",
        "title": "PreviewUrlRequest",
        "properties": {
          "url": {
            "type": "string"
          }
        }
      },
      "LinkPreviewResult": {
        "type": "object",
        "title": "LinkPreviewResult",
        "properties": {
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "image": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "suggestedTag": {
            "type": "string"
          }
        }
      },
      "BulkDeleteBookmarksRequest": {
        "type": "object",
        "title": "BulkDeleteBookmarksRequest",
        "required": ["ids"],
        "properties": {
          "ids": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BulkDeleteBookmarksResponse": {
        "type": "object",
        "title": "BulkDeleteBookmarksResponse",
        "properties": {
          "deleted": {
            "type": "number"
          },
          "notFoundInScope": {
            "type": "number"
          }
        }
      },
      "DeleteBookmarksByScopeAllRequest": {
        "type": "object",
        "title": "DeleteBookmarksByScopeAllRequest",
        "required": ["scope"],
        "properties": {
          "scope": {
            "type": "string",
            "enum": ["all"]
          }
        }
      },
      "DeleteBookmarksByScopeFolderRequest": {
        "type": "object",
        "title": "DeleteBookmarksByScopeFolderRequest",
        "required": ["scope", "folderId"],
        "properties": {
          "scope": {
            "type": "string",
            "enum": ["folder"]
          },
          "folderId": {
            "type": "string"
          }
        }
      },
      "DeleteBookmarksByScopeRequest": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DeleteBookmarksByScopeAllRequest"
          },
          {
            "$ref": "#/components/schemas/DeleteBookmarksByScopeFolderRequest"
          }
        ]
      },
      "DeleteBookmarksByScopeResponse": {
        "type": "object",
        "title": "DeleteBookmarksByScopeResponse",
        "properties": {
          "deleted": {
            "type": "number"
          }
        }
      },
      "BookmarkCountResponse": {
        "type": "object",
        "title": "BookmarkCountResponse",
        "properties": {
          "total": {
            "type": "number"
          }
        }
      },
      "SnapshotSearchHit": {
        "type": "object",
        "title": "SnapshotSearchHit",
        "properties": {
          "bookmarkId": {
            "type": "string"
          },
          "excerpt": {
            "type": "string"
          }
        }
      },
      "BulkLinkCheckResult": {
        "type": "object",
        "title": "BulkLinkCheckResult",
        "properties": {
          "queued": {
            "type": "number"
          },
          "accepted": {
            "type": "number"
          }
        }
      },
      "LinkHealthResult": {
        "type": "object",
        "title": "LinkHealthResult",
        "properties": {
          "linkStatus": {
            "type": "string",
            "enum": ["ok", "dead", "unknown"]
          },
          "lastLinkCheckedAt": {
            "type": "string",
            "format": "date-time"
          },
          "queued": {
            "type": "boolean"
          }
        }
      },
      "ReaderParagraph": {
        "type": "object",
        "title": "ReaderParagraph",
        "properties": {
          "text": {
            "type": "string"
          },
          "kind": {
            "type": "string"
          }
        }
      },
      "ReaderMedia": {
        "type": "object",
        "title": "ReaderMedia",
        "properties": {
          "videoEmbedUrl": {
            "type": "string"
          }
        }
      },
      "ReaderPayload": {
        "type": "object",
        "title": "ReaderPayload",
        "properties": {
          "mode": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "domain": {
            "type": "string"
          },
          "savedAt": {
            "type": "string",
            "format": "date-time"
          },
          "linkStatus": {
            "type": "string",
            "enum": ["ok", "dead", "unknown"]
          },
          "snapshotEnabled": {
            "type": "boolean"
          },
          "paragraphs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReaderParagraph"
            }
          },
          "media": {
            "$ref": "#/components/schemas/ReaderMedia"
          }
        }
      },
      "ImportSummaryIssue": {
        "$ref": "#/components/schemas/ImportSummaryIssuePart"
      },
      "ImportSummary": {
        "type": "object",
        "title": "ImportSummary",
        "properties": {
          "imported": {
            "type": "integer"
          },
          "skipped": {
            "type": "integer"
          },
          "duplicatesSkipped": {
            "type": "integer"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImportSummaryIssue"
            }
          },
          "issues": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ImportSummaryIssue"
            }
          }
        }
      },
      "ImportBookmarksMultipartRequest": {
        "type": "object",
        "title": "ImportBookmarksMultipartRequest",
        "required": ["file"],
        "properties": {
          "file": {
            "type": "string",
            "format": "binary"
          }
        }
      },
      "BookmarkExportJson": {
        "type": "string",
        "title": "BookmarkExportJson",
        "description": "JSON bookmark export payload."
      },
      "NetscapeBookmarksHtml": {
        "type": "string",
        "title": "NetscapeBookmarksHtml",
        "description": "Netscape bookmark HTML export."
      },
      "Folder": {
        "type": "object",
        "title": "Folder",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "parentId": {
            "type": "string",
            "nullable": true
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CreateFolderRequest": {
        "type": "object",
        "title": "CreateFolderRequest",
        "required": ["name"],
        "properties": {
          "name": {
            "type": "string"
          },
          "parentId": {
            "type": "string"
          }
        }
      },
      "PatchFolderRequest": {
        "type": "object",
        "title": "PatchFolderRequest",
        "properties": {
          "name": {
            "type": "string"
          },
          "parentId": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "CreateFolderShareRequest": {
        "type": "object",
        "title": "CreateFolderShareRequest",
        "required": ["permission"],
        "properties": {
          "permission": {
            "type": "string",
            "enum": ["read", "read_write"]
          }
        }
      },
      "CreateFolderShareResponse": {
        "type": "object",
        "title": "CreateFolderShareResponse",
        "properties": {
          "id": {
            "type": "string"
          },
          "permission": {
            "type": "string",
            "enum": ["read", "read_write"]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "token": {
            "type": "string"
          },
          "shareUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "FolderShare": {
        "type": "object",
        "title": "FolderShare",
        "properties": {
          "id": {
            "type": "string"
          },
          "permission": {
            "type": "string",
            "enum": ["read", "read_write"]
          },
          "token": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "shareUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "SharedFolderView": {
        "type": "object",
        "title": "SharedFolderView",
        "properties": {
          "folder": {
            "$ref": "#/components/schemas/Folder"
          },
          "bookmarks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Bookmark"
            }
          },
          "permission": {
            "type": "string",
            "enum": ["read", "read_write"]
          }
        }
      },
      "Workspace": {
        "type": "object",
        "title": "Workspace",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "isDefault": {
            "type": "boolean"
          },
          "hubLinkCheckSchedule": {
            "type": "string",
            "enum": ["daily", "weekly", "on_demand"]
          }
        }
      },
      "DeletedWorkspaceSummary": {
        "type": "object",
        "title": "DeletedWorkspaceSummary",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "deletedAt": {
            "type": "string",
            "format": "date-time"
          },
          "daysUntilPermanentDeletion": {
            "type": "number"
          }
        }
      },
      "CreateWorkspaceRequest": {
        "type": "object",
        "title": "CreateWorkspaceRequest",
        "required": ["name"],
        "properties": {
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          }
        }
      },
      "RenameWorkspaceRequest": {
        "type": "object",
        "title": "RenameWorkspaceRequest",
        "required": ["name"],
        "properties": {
          "name": {
            "type": "string"
          }
        }
      },
      "UpdateHubSettingsRequest": {
        "type": "object",
        "title": "UpdateHubSettingsRequest",
        "properties": {
          "hubLinkCheckSchedule": {
            "type": "string",
            "enum": ["daily", "weekly", "on_demand"]
          }
        }
      },
      "AccountProfile": {
        "type": "object",
        "title": "AccountProfile",
        "description": "Current account profile from GET /api/v1/me.",
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "displayName": {
            "type": "string"
          },
          "avatarUrl": {
            "type": "string",
            "format": "uri"
          },
          "twoFactorEnabled": {
            "type": "boolean"
          },
          "organizationName": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "accountId": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": ["admin", "member", "support"]
          },
          "canManageBilling": {
            "type": "boolean"
          },
          "homeTenantId": {
            "type": "string"
          },
          "activeTenantId": {
            "type": "string"
          }
        }
      },
      "PatchMeRequest": {
        "type": "object",
        "title": "PatchMeRequest",
        "properties": {
          "displayName": {
            "type": "string"
          },
          "avatarUrl": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "OrganizationMembership": {
        "type": "object",
        "title": "OrganizationMembership",
        "properties": {
          "tenantId": {
            "type": "string"
          },
          "displayName": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "role": {
            "type": "string",
            "enum": ["admin", "member", "support"]
          }
        }
      },
      "PatchHomeOrganizationRequest": {
        "type": "object",
        "title": "PatchHomeOrganizationRequest",
        "required": ["tenantId"],
        "properties": {
          "tenantId": {
            "type": "string"
          }
        }
      },
      "PatchHomeOrganizationResponse": {
        "type": "object",
        "title": "PatchHomeOrganizationResponse",
        "properties": {
          "homeTenantId": {
            "type": "string"
          }
        }
      },
      "PatchTenantRequest": {
        "type": "object",
        "title": "PatchTenantRequest",
        "required": ["organizationName"],
        "properties": {
          "organizationName": {
            "type": "string"
          }
        }
      },
      "OrganizationUser": {
        "type": "object",
        "title": "OrganizationUser",
        "properties": {
          "accountId": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "displayName": {
            "type": "string"
          },
          "avatarUrl": {
            "type": "string",
            "format": "uri"
          },
          "role": {
            "type": "string",
            "enum": ["admin", "member", "support"]
          },
          "workspaceCount": {
            "type": "integer",
            "minimum": 0
          },
          "workspaceMembershipCount": {
            "type": "integer",
            "minimum": 0
          }
        }
      },
      "PatchOrganizationUserRequest": {
        "type": "object",
        "title": "PatchOrganizationUserRequest",
        "properties": {
          "role": {
            "type": "string",
            "enum": ["admin", "member", "support"]
          },
          "grantAllWorkspaces": {
            "type": "boolean"
          }
        }
      },
      "PermissionsResponse": {
        "type": "object",
        "title": "PermissionsResponse",
        "properties": {
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "ApiKeyMetadata": {
        "type": "object",
        "title": "ApiKeyMetadata",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string",
            "nullable": true
          },
          "label": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": ["active", "revoked"]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "rotatedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "revokedAt": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        }
      },
      "CreateApiKeyRequest": {
        "type": "object",
        "title": "CreateApiKeyRequest",
        "required": ["noticeVersion"],
        "properties": {
          "label": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "noticeVersion": {
            "type": "string"
          }
        }
      },
      "CreateApiKeyResponse": {
        "type": "object",
        "title": "CreateApiKeyResponse",
        "required": ["metadata", "apiKey"],
        "properties": {
          "metadata": {
            "$ref": "#/components/schemas/ApiKeyMetadata"
          },
          "apiKey": {
            "type": "string",
            "description": "Raw secret; shown once at creation or rotation."
          }
        }
      },
      "Group": {
        "type": "object",
        "title": "Group",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CreateGroupRequest": {
        "type": "object",
        "title": "CreateGroupRequest",
        "required": ["name"],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string"
          }
        }
      },
      "PatchGroupRequest": {
        "type": "object",
        "title": "PatchGroupRequest",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string"
          }
        }
      },
      "GroupMembership": {
        "type": "object",
        "title": "GroupMembership",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "groupId": {
            "type": "string"
          },
          "accountId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "AddGroupMemberRequest": {
        "type": "object",
        "title": "AddGroupMemberRequest",
        "required": ["accountId"],
        "properties": {
          "accountId": {
            "type": "string"
          }
        }
      },
      "OrganizationUnit": {
        "type": "object",
        "title": "OrganizationUnit",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "parentUnitId": {
            "type": "string",
            "nullable": true
          },
          "path": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CreateOrganizationUnitRequest": {
        "type": "object",
        "title": "CreateOrganizationUnitRequest",
        "required": ["name"],
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "parentUnitId": {
            "type": "string"
          }
        }
      },
      "PatchOrganizationUnitRequest": {
        "type": "object",
        "title": "PatchOrganizationUnitRequest",
        "properties": {
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "parentUnitId": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "Role": {
        "type": "object",
        "title": "Role",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "name": {
            "type": "string",
            "maxLength": 100
          },
          "description": {
            "type": "string"
          },
          "isSystemRole": {
            "type": "boolean"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CreateRoleRequest": {
        "type": "object",
        "title": "CreateRoleRequest",
        "required": ["name", "permissions"],
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "PatchRoleRequest": {
        "type": "object",
        "title": "PatchRoleRequest",
        "properties": {
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "RoleAssignment": {
        "type": "object",
        "title": "RoleAssignment",
        "properties": {
          "id": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "accountId": {
            "type": "string",
            "nullable": true
          },
          "groupId": {
            "type": "string",
            "nullable": true
          },
          "roleId": {
            "type": "string"
          },
          "scopeType": {
            "type": "string",
            "enum": ["org", "unit", "workspace"]
          },
          "scopeId": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CreateRoleAssignmentRequest": {
        "type": "object",
        "title": "CreateRoleAssignmentRequest",
        "required": ["roleId", "scopeType"],
        "properties": {
          "roleId": {
            "type": "string"
          },
          "scopeType": {
            "type": "string",
            "enum": ["org", "unit", "workspace"]
          },
          "accountId": {
            "type": "string"
          },
          "groupId": {
            "type": "string"
          },
          "scopeId": {
            "type": "string"
          }
        }
      },
      "PendingInvitationRow": {
        "type": "object",
        "title": "PendingInvitationRow",
        "properties": {
          "invitationId": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "role": {
            "type": "string",
            "enum": ["admin", "member", "support"]
          },
          "invitationScope": {
            "type": "string",
            "enum": ["workspace", "organization"]
          },
          "workspaceId": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "resendCount": {
            "type": "integer",
            "minimum": 0
          },
          "roleId": {
            "type": "string"
          },
          "groupIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "isExpired": {
            "type": "boolean"
          }
        }
      },
      "CreateInvitationRequest": {
        "type": "object",
        "title": "CreateInvitationRequest",
        "required": ["email", "role"],
        "properties": {
          "invitationScope": {
            "type": "string",
            "enum": ["workspace", "organization"]
          },
          "workspaceId": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "role": {
            "type": "string",
            "enum": ["admin", "member", "support"]
          },
          "roleId": {
            "type": "string"
          },
          "groupIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateInvitationResponse": {
        "type": "object",
        "title": "CreateInvitationResponse",
        "properties": {
          "invitationId": {
            "type": "string"
          }
        }
      },
      "AcceptInvitationRequest": {
        "type": "object",
        "title": "AcceptInvitationRequest",
        "required": ["email", "password", "noticeVersion"],
        "properties": {
          "email": {
            "type": "string",
            "format": "email"
          },
          "password": {
            "type": "string"
          },
          "noticeVersion": {
            "type": "string"
          }
        }
      },
      "AcceptInvitationResponse": {
        "type": "object",
        "title": "AcceptInvitationResponse",
        "properties": {
          "accountId": {
            "type": "string"
          },
          "tenantId": {
            "type": "string"
          },
          "workspaceId": {
            "type": "string"
          },
          "role": {
            "type": "string"
          }
        }
      },
      "LoginRequest": {
        "type": "object",
        "title": "LoginRequest",
        "required": ["email", "password"],
        "properties": {
          "email": {
            "type": "string"
          },
          "password": {
            "type": "string"
          },
          "intent": {
            "type": "string",
            "enum": ["tenant"]
          }
        }
      },
      "LoginTokenResponse": {
        "type": "object",
        "title": "LoginTokenResponse",
        "required": ["accessToken", "tokenType"],
        "properties": {
          "accessToken": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          },
          "tokenType": {
            "type": "string",
            "enum": ["tenant"]
          },
          "canManageBilling": {
            "type": "boolean"
          }
        }
      },
      "LoginTwoFactorChallenge": {
        "type": "object",
        "title": "LoginTwoFactorChallenge",
        "required": ["requiresTwoFactor", "preAuthToken"],
        "properties": {
          "requiresTwoFactor": {
            "type": "boolean",
            "enum": [true]
          },
          "preAuthToken": {
            "type": "string"
          }
        }
      },
      "LoginResponse": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/LoginTokenResponse"
          },
          {
            "$ref": "#/components/schemas/LoginTwoFactorChallenge"
          }
        ]
      },
      "RefreshRequest": {
        "type": "object",
        "title": "RefreshRequest",
        "properties": {
          "refreshToken": {
            "type": "string"
          },
          "session": {
            "type": "string",
            "enum": ["tenant"]
          }
        }
      },
      "RefreshResponse": {
        "type": "object",
        "title": "RefreshResponse",
        "properties": {
          "accessToken": {
            "type": "string"
          },
          "refreshToken": {
            "type": "string"
          },
          "tokenType": {
            "type": "string",
            "enum": ["tenant"]
          },
          "canManageBilling": {
            "type": "boolean"
          }
        }
      },
      "ApiErrorUpgrade": {
        "type": "object",
        "title": "ApiErrorUpgrade",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri"
          }
        }
      },
      "ApiErrorDetail": {
        "type": "object",
        "title": "ApiErrorDetail",
        "required": ["code", "message"],
        "properties": {
          "code": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "correlation_id": {
            "type": "string"
          },
          "upgrade": {
            "$ref": "#/components/schemas/ApiErrorUpgrade"
          }
        }
      },
      "ErrorBody": {
        "type": "object",
        "title": "ErrorBody",
        "required": ["error"],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ApiErrorDetail"
          }
        }
      },
      "TenantUsageMetrics": {
        "type": "object",
        "title": "TenantUsageMetrics",
        "required": [
          "workspaceCount",
          "userSeatCount",
          "apiCallsInWindow",
          "aiTagsInWindow",
          "windowStart",
          "windowEnd"
        ],
        "properties": {
          "workspaceCount": {
            "type": "integer",
            "minimum": 0
          },
          "userSeatCount": {
            "type": "integer",
            "minimum": 0
          },
          "apiCallsInWindow": {
            "type": "integer",
            "minimum": 0
          },
          "aiTagsInWindow": {
            "type": "integer",
            "minimum": 0
          },
          "windowStart": {
            "type": "string",
            "format": "date-time"
          },
          "windowEnd": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PingResponseHeaders": {
        "type": "object",
        "title": "PingResponseHeaders",
        "properties": {
          "Content-Type": {
            "type": "string"
          }
        },
        "additionalProperties": true
      },
      "EmptyRequest": {
        "$ref": "#/components/schemas/EmptyRequestPart"
      },
      "EmptyResponse": {
        "$ref": "#/components/schemas/EmptyResponsePart"
      },
      "EffectiveLimitsPartEntitlements": {
        "type": "object",
        "additionalProperties": {
          "type": "boolean"
        }
      },
      "ImportSummaryIssuePart": {
        "type": "object",
        "title": "ImportSummaryIssue",
        "additionalProperties": true
      },
      "EmptyRequestPart": {
        "type": "object",
        "title": "EmptyRequest",
        "maxProperties": 0,
        "description": "Optional empty JSON body for action endpoints with no payload."
      },
      "EmptyResponsePart": {
        "type": "object",
        "title": "EmptyResponse",
        "maxProperties": 0,
        "description": "Successful response with no JSON body (HTTP 204)."
      }
    },
    "securitySchemes": {
      "bearerJwt": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Session JWT from POST /auth/login or /auth/refresh. Use for browser-session and API key management routes."
      },
      "bearerApiKey": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "api-key",
        "description": "Workspace automation API key. Send as Authorization: Bearer <api-key>. Optional X-Workspace-ID when the key is tenant-wide."
      }
    }
  },
  "tags": [
    {
      "name": "api-keys",
      "description": "Programmatic access tokens scoped to a workspace."
    },
    {
      "name": "auth",
      "description": "Sign-in, sign-out, and session lifecycle."
    },
    {
      "name": "bookmarks",
      "description": "Bookmarks — saving, listing, importing, exporting."
    },
    {
      "name": "folders",
      "description": "Folders within a workspace."
    },
    {
      "name": "groups",
      "description": "Member groups."
    },
    {
      "name": "invitations",
      "description": "Member invitations."
    },
    {
      "name": "me",
      "description": "The current account profile."
    },
    {
      "name": "organizations",
      "description": "Organisation-level account and units."
    },
    {
      "name": "ping",
      "description": "Health check."
    },
    {
      "name": "role-assignments",
      "description": "Role assignments to members."
    },
    {
      "name": "roles",
      "description": "Role definitions."
    },
    {
      "name": "shared-folders",
      "description": "Folders shared with read or read+write access."
    },
    {
      "name": "usage",
      "description": "Tenant-scoped usage meters and effective limits for the authenticated tenant."
    },
    {
      "name": "workspaces",
      "description": "Workspaces and their settings."
    }
  ]
}
