{
  "openapi": "3.0.3",
  "info": {
    "title": "Boond API",
    "version": "0.16.10",
    "description": "Self-hosted Raindrop.io-compatible bookmark API. Most endpoints are available under both `/v1` and `/rest/v1`. Authenticate with the `boond_session` cookie or a Bearer/OAuth token. This document is served by the same binary at `/docs` and `/openapi.json`."
  },
  "servers": [
    {
      "url": "/",
      "description": "This Boond server"
    }
  ],
  "tags": [
    {
      "name": "System",
      "description": "Health and version endpoints."
    },
    {
      "name": "Auth",
      "description": "Signup, login, logout, TFA, and JWT handoff."
    },
    {
      "name": "User",
      "description": "Profile, settings, stats, and TFA enrollment."
    },
    {
      "name": "Collections",
      "description": "Nested collections and sharing."
    },
    {
      "name": "Raindrops",
      "description": "Bookmarks, batch operations, and exports."
    },
    {
      "name": "Tags",
      "description": "Tag listings and filters."
    },
    {
      "name": "Highlights",
      "description": "Highlights across the account."
    },
    {
      "name": "Backups",
      "description": "Portable HTML/CSV/JSON backup archives."
    },
    {
      "name": "Import",
      "description": "Import Raindrop, HTML, CSV, JSON, and backup archives."
    },
    {
      "name": "Icons",
      "description": "Collection icon catalog and assets."
    },
    {
      "name": "OAuth",
      "description": "OAuth clients, connections, and consent."
    },
    {
      "name": "Admin",
      "description": "Administrator-only console API. Requires an admin browser session cookie."
    }
  ],
  "security": [
    {
      "cookieAuth": []
    },
    {
      "bearerAuth": []
    }
  ],
  "components": {
    "securitySchemes": {
      "cookieAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "boond_session"
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "OAuth token"
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "result": {
            "type": "boolean",
            "example": false
          },
          "error": {
            "description": "Stable error code or field name.",
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "integer"
              }
            ]
          },
          "errorMessage": {
            "type": "string"
          }
        }
      },
      "User": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "fullName": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          },
          "avatar": {
            "type": "string"
          },
          "admin": {
            "type": "boolean"
          },
          "pro": {
            "type": "boolean"
          },
          "emailConfirmed": {
            "type": "boolean"
          },
          "tfa": {
            "type": "object",
            "properties": {
              "enabled": {
                "type": "boolean"
              }
            }
          }
        }
      },
      "Collection": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "integer",
            "format": "int64"
          },
          "title": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "parent": {
            "type": "object",
            "properties": {
              "$id": {
                "type": "integer"
              }
            }
          },
          "public": {
            "type": "boolean"
          },
          "view": {
            "type": "string"
          },
          "sort": {
            "type": "number"
          },
          "color": {
            "type": "string"
          },
          "cover": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uri"
            }
          },
          "count": {
            "type": "integer"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdate": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "Raindrop": {
        "type": "object",
        "properties": {
          "_id": {
            "type": "integer",
            "format": "int64"
          },
          "title": {
            "type": "string"
          },
          "link": {
            "type": "string",
            "format": "uri"
          },
          "excerpt": {
            "type": "string"
          },
          "note": {
            "type": "string"
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "collectionId": {
            "type": "integer",
            "format": "int64"
          },
          "cover": {
            "type": "string",
            "format": "uri"
          },
          "important": {
            "type": "boolean"
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "lastUpdate": {
            "type": "string",
            "format": "date-time"
          },
          "highlights": {
            "type": "array",
            "items": {
              "type": "object"
            }
          }
        }
      },
      "Backup": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "ready",
              "failed"
            ]
          },
          "created": {
            "type": "string",
            "format": "date-time"
          },
          "size": {
            "type": "integer",
            "format": "int64"
          },
          "items": {
            "type": "integer"
          },
          "collections": {
            "type": "integer"
          },
          "highlights": {
            "type": "integer"
          },
          "destination": {
            "type": "string"
          },
          "error": {
            "type": "string"
          },
          "remoteError": {
            "type": "string"
          }
        }
      }
    },
    "parameters": {
      "CollectionID": {
        "name": "collectionId",
        "in": "path",
        "required": true,
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "RaindropID": {
        "name": "id",
        "in": "path",
        "required": true,
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "Page": {
        "name": "page",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 0
        }
      },
      "PerPage": {
        "name": "perpage",
        "in": "query",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 50,
          "default": 25
        }
      },
      "Search": {
        "name": "search",
        "in": "query",
        "schema": {
          "type": "string"
        }
      },
      "Sort": {
        "name": "sort",
        "in": "query",
        "schema": {
          "type": "string"
        }
      }
    },
    "responses": {
      "Error": {
        "description": "Request failed.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    }
  },
  "paths": {
    "/healthz": {
      "get": {
        "tags": [
          "System"
        ],
        "summary": "Liveness check",
        "operationId": "health",
        "responses": {
          "200": {
            "description": "Server is alive",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": []
      }
    },
    "/readyz": {
      "get": {
        "tags": [
          "System"
        ],
        "summary": "Readiness check",
        "operationId": "ready",
        "responses": {
          "200": {
            "description": "Server is ready",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "503": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": []
      }
    },
    "/version": {
      "get": {
        "tags": [
          "System"
        ],
        "summary": "Build version",
        "operationId": "version",
        "responses": {
          "200": {
            "description": "Version and commit",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": []
      }
    },
    "/openapi.json": {
      "get": {
        "tags": [
          "System"
        ],
        "summary": "This OpenAPI document",
        "operationId": "openapi",
        "responses": {
          "200": {
            "description": "OpenAPI JSON",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": []
      }
    },
    "/v1/auth/config": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Public registration policy",
        "operationId": "authConfig",
        "responses": {
          "200": {
            "description": "Signup mode and invite requirement",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": []
      }
    },
    "/v1/auth/email/signup": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Create an account",
        "operationId": "signup",
        "responses": {
          "200": {
            "description": "Account created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "409": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "name",
                  "email",
                  "password"
                ],
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "email": {
                    "type": "string",
                    "format": "email"
                  },
                  "password": {
                    "type": "string",
                    "minLength": 8
                  },
                  "invite": {
                    "type": "string",
                    "description": "Required when the server is in invite mode.",
                    "writeOnly": true
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/email/login": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Sign in with username/email and password",
        "operationId": "login",
        "responses": {
          "200": {
            "description": "Session cookie set",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "email",
                  "password"
                ],
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "password": {
                    "type": "string"
                  },
                  "redirect": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/logout": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Sign out",
        "operationId": "logout",
        "responses": {
          "200": {
            "description": "Session revoked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": []
      },
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Sign out (cross-origin safe)",
        "operationId": "logoutPost",
        "responses": {
          "200": {
            "description": "Session revoked",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": []
      }
    },
    "/v1/auth/tfa/{challenge}": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Complete a TFA challenge",
        "operationId": "tfaLogin",
        "responses": {
          "200": {
            "description": "Session cookie set",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "challenge",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "description": "TOTP or recovery code"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/auth/jwt": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Exchange a desktop JWT handoff token",
        "operationId": "jwtExchange",
        "responses": {
          "200": {
            "description": "Session cookie set",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token"
                ],
                "properties": {
                  "token": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "Start a desktop JWT handoff",
        "operationId": "jwtHandoff",
        "responses": {
          "302": {
            "description": "Redirect with token"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "done_uri",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/user": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Current user and config",
        "operationId": "getUser",
        "responses": {
          "200": {
            "description": "User profile",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "put": {
        "tags": [
          "User"
        ],
        "summary": "Update profile or config",
        "operationId": "updateUser",
        "responses": {
          "200": {
            "description": "Updated user",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/User"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/User"
              }
            }
          }
        }
      }
    },
    "/v1/user/stats": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Bookmark and collection counts",
        "operationId": "userStats",
        "responses": {
          "200": {
            "description": "Stats",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/user/tfa": {
      "get": {
        "tags": [
          "User"
        ],
        "summary": "Get TFA enrollment secret and QR code",
        "operationId": "tfaSetup",
        "responses": {
          "200": {
            "description": "Secret and QR code",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": [
          "User"
        ],
        "summary": "Enable TFA and return a recovery code",
        "operationId": "tfaEnable",
        "responses": {
          "200": {
            "description": "TFA enabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "User"
        ],
        "summary": "Disable TFA",
        "operationId": "tfaDisable",
        "responses": {
          "200": {
            "description": "TFA disabled",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "code"
                ],
                "properties": {
                  "code": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/collections": {
      "get": {
        "tags": [
          "Collections"
        ],
        "summary": "List root collections",
        "operationId": "listCollections",
        "responses": {
          "200": {
            "description": "Collections",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Collection"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": [
          "Collections"
        ],
        "summary": "Create a collection",
        "operationId": "createCollection",
        "responses": {
          "200": {
            "description": "Created collection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Collection"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Collection"
              }
            }
          }
        }
      }
    },
    "/v1/collections/all": {
      "get": {
        "tags": [
          "Collections"
        ],
        "summary": "List every collection",
        "operationId": "listAllCollections",
        "responses": {
          "200": {
            "description": "Collections",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Collection"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/collections/covers": {
      "get": {
        "tags": [
          "Collections"
        ],
        "summary": "Search collection icon catalog",
        "operationId": "collectionCovers",
        "responses": {
          "200": {
            "description": "Icon groups",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "name": "q",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/collection": {
      "post": {
        "tags": [
          "Collections"
        ],
        "summary": "Create a collection (alias)",
        "operationId": "createCollectionAlias",
        "responses": {
          "200": {
            "description": "Created collection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Collection"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Collection"
              }
            }
          }
        }
      }
    },
    "/v1/collection/{id}": {
      "get": {
        "tags": [
          "Collections"
        ],
        "summary": "Get a collection",
        "operationId": "getCollection",
        "responses": {
          "200": {
            "description": "Collection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Collection"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/CollectionID"
          }
        ]
      },
      "put": {
        "tags": [
          "Collections"
        ],
        "summary": "Update a collection",
        "operationId": "updateCollection",
        "responses": {
          "200": {
            "description": "Updated collection",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Collection"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/CollectionID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Collection"
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Collections"
        ],
        "summary": "Delete a collection",
        "operationId": "deleteCollection",
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/CollectionID"
          }
        ]
      }
    },
    "/v1/collection/{id}/sharing": {
      "get": {
        "tags": [
          "Collections"
        ],
        "summary": "Read collaborators",
        "operationId": "collectionSharing",
        "responses": {
          "200": {
            "description": "Sharing details",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/CollectionID"
          }
        ]
      },
      "post": {
        "tags": [
          "Collections"
        ],
        "summary": "Invite a collaborator",
        "operationId": "inviteCollaborator",
        "responses": {
          "200": {
            "description": "Invite created",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/CollectionID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string"
                  },
                  "role": {
                    "type": "string",
                    "enum": [
                      "viewer",
                      "member",
                      "editor"
                    ]
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/raindrops/{collectionId}": {
      "get": {
        "tags": [
          "Raindrops"
        ],
        "summary": "List bookmarks in a collection",
        "operationId": "listRaindrops",
        "responses": {
          "200": {
            "description": "Bookmarks",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Raindrop"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/CollectionID"
          },
          {
            "$ref": "#/components/parameters/Page"
          },
          {
            "$ref": "#/components/parameters/PerPage"
          },
          {
            "$ref": "#/components/parameters/Search"
          },
          {
            "$ref": "#/components/parameters/Sort"
          }
        ]
      }
    },
    "/v1/raindrop": {
      "post": {
        "tags": [
          "Raindrops"
        ],
        "summary": "Create a bookmark",
        "operationId": "createRaindrop",
        "responses": {
          "200": {
            "description": "Created bookmark",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Raindrop"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Raindrop"
              }
            }
          }
        }
      }
    },
    "/v1/raindrop/{id}": {
      "get": {
        "tags": [
          "Raindrops"
        ],
        "summary": "Get a bookmark",
        "operationId": "getRaindrop",
        "responses": {
          "200": {
            "description": "Bookmark",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Raindrop"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/RaindropID"
          }
        ]
      },
      "put": {
        "tags": [
          "Raindrops"
        ],
        "summary": "Update a bookmark",
        "operationId": "updateRaindrop",
        "responses": {
          "200": {
            "description": "Updated bookmark",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Raindrop"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/RaindropID"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Raindrop"
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Raindrops"
        ],
        "summary": "Move a bookmark to trash or delete it",
        "operationId": "deleteRaindrop",
        "responses": {
          "200": {
            "description": "Deleted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/RaindropID"
          }
        ]
      }
    },
    "/v1/raindrops/{collectionId}/export.{format}": {
      "get": {
        "tags": [
          "Raindrops"
        ],
        "summary": "Export collection bookmarks",
        "operationId": "exportRaindrops",
        "responses": {
          "200": {
            "description": "Exported file"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/CollectionID"
          },
          {
            "name": "format",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "html",
                "csv",
                "txt",
                "zip"
              ]
            }
          }
        ]
      }
    },
    "/v1/tags": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "List tags across the account",
        "operationId": "listTags",
        "responses": {
          "200": {
            "description": "Tags",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/tags/{collectionId}": {
      "get": {
        "tags": [
          "Tags"
        ],
        "summary": "List tags in a collection",
        "operationId": "listCollectionTags",
        "responses": {
          "200": {
            "description": "Tags",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/CollectionID"
          }
        ]
      }
    },
    "/v1/highlights": {
      "get": {
        "tags": [
          "Highlights"
        ],
        "summary": "List highlights",
        "operationId": "listHighlights",
        "responses": {
          "200": {
            "description": "Highlights",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/highlights/{collectionId}": {
      "get": {
        "tags": [
          "Highlights"
        ],
        "summary": "List highlights in a collection",
        "operationId": "listCollectionHighlights",
        "responses": {
          "200": {
            "description": "Highlights",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/CollectionID"
          }
        ]
      }
    },
    "/v1/backups": {
      "get": {
        "tags": [
          "Backups"
        ],
        "summary": "List backups for the current user",
        "operationId": "listBackups",
        "responses": {
          "200": {
            "description": "Backup history",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Backup"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/backup": {
      "post": {
        "tags": [
          "Backups"
        ],
        "summary": "Queue a backup",
        "operationId": "createBackup",
        "responses": {
          "200": {
            "description": "Backup job accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "name": "wait",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "1"
              ]
            },
            "description": "Build synchronously for tests/small accounts"
          }
        ]
      }
    },
    "/v1/backup/{id}.{format}": {
      "get": {
        "tags": [
          "Backups"
        ],
        "summary": "Download a ready backup",
        "operationId": "downloadBackup",
        "responses": {
          "200": {
            "description": "Backup file"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "format",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "html",
                "csv",
                "zip"
              ]
            }
          }
        ]
      }
    },
    "/v1/import": {
      "post": {
        "tags": [
          "Import"
        ],
        "summary": "Import a bookmarks file or Boond backup ZIP",
        "operationId": "import",
        "responses": {
          "200": {
            "description": "Import accepted",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/icons/cover/{pack}/{key}": {
      "get": {
        "tags": [
          "Icons"
        ],
        "summary": "Fetch or render a collection icon SVG",
        "operationId": "iconCover",
        "responses": {
          "200": {
            "description": "SVG image",
            "content": {
              "image/svg+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "name": "pack",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "key",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": []
      }
    },
    "/v1/icons/font/{pack}": {
      "get": {
        "tags": [
          "Icons"
        ],
        "summary": "Fetch a font-pack stylesheet and WOFF2 asset",
        "operationId": "iconFont",
        "responses": {
          "200": {
            "description": "CSS font face"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "parameters": [
          {
            "name": "pack",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "security": []
      }
    },
    "/v1/oauth/connections": {
      "get": {
        "tags": [
          "OAuth"
        ],
        "summary": "List connected providers",
        "operationId": "oauthConnections",
        "responses": {
          "200": {
            "description": "Connections",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/oauth/clients": {
      "get": {
        "tags": [
          "OAuth"
        ],
        "summary": "List OAuth clients",
        "operationId": "oauthClients",
        "responses": {
          "200": {
            "description": "OAuth clients",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": [
          "OAuth"
        ],
        "summary": "Create an OAuth client",
        "operationId": "createOAuthClient",
        "responses": {
          "200": {
            "description": "OAuth client",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "name": {
                    "type": "string"
                  },
                  "redirect_uri": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/admin/api/users": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "List users",
        "operationId": "adminUsers",
        "responses": {
          "200": {
            "description": "Users",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/admin/api/settings": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "Read persisted environment overrides",
        "operationId": "adminSettings",
        "responses": {
          "200": {
            "description": "Settings",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/admin/api/backups": {
      "get": {
        "tags": [
          "Admin"
        ],
        "summary": "List backups with per-user coverage",
        "operationId": "adminBackups",
        "responses": {
          "200": {
            "description": "Backups and coverage",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        }
      },
      "post": {
        "tags": [
          "Admin"
        ],
        "summary": "Queue backups for selected users",
        "operationId": "adminBackupNow",
        "responses": {
          "202": {
            "description": "Backup jobs queued"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "userId": {
                    "type": "integer"
                  },
                  "userIds": {
                    "type": "array",
                    "items": {
                      "type": "integer"
                    }
                  },
                  "all": {
                    "type": "boolean"
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
