{
  "openapi": "3.1.1",
  "info": {
    "title": "Digital Estate Organizer API",
    "version": "1.0.0",
    "summary": "List your online accounts and get a prioritised plan for what happens to them – no passwords needed.",
    "description": "Every endpoint performs the same calculation as the human page and returns inputs, result, units, assumptions, sources, warnings and computedAt. MCP endpoint: /mcp."
  },
  "servers": [
    {
      "url": "https://digitalestateorganizer.usefulweb.site"
    }
  ],
  "paths": {
    "/api/v1/calculate": {
      "post": {
        "operationId": "calculate",
        "summary": "List your online accounts and get a prioritised plan for what happens to them – no passwords needed.",
        "description": "Inventory email, cloud, social, financial, crypto and subscription accounts, choose what should happen to each (transfer, download then delete, memorialise, delete, keep running), and get a prioritised plan that uses the providers' official legacy features (Google Inactive Account Manager, Apple Legacy Contact, Facebook legacy contact, Bitwarden Emergency Access…) plus a printable handover document. Passwords are refused and nothing is stored.\n\nMethodology:\n- Priority order: password manager → email (it resets everything else) → banking/crypto → domains → cloud data → subscriptions/work → social → shopping → other; ties keep your order.\n- Services are matched against a small, sourced list of official legacy features (Google, Apple, Meta, Bitwarden); unmatched services get category-based steps.\n- Input that looks like a password, PIN or seed phrase is rejected; nothing is stored on the server.\n\nThis is an organisational checklist, not legal advice and not a will. Inheritance law differs by country; store the generated document with your will and tell your executor where it is.",
        "tags": [
          "high-value"
        ],
        "x-mcp-tool": "digital_estate_organizer",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DigitalEstateOrganizerInput"
              },
              "examples": {
                "example1": {
                  "summary": "Typical household",
                  "value": {
                    "ownerName": "Alex Example",
                    "trustedContact": "Sam Example",
                    "hasPasswordManager": true,
                    "hasWrittenWill": false,
                    "accounts": [
                      {
                        "service": "Gmail",
                        "category": "email",
                        "wish": "transfer",
                        "recoveryEmail": "alex.backup@example.org"
                      },
                      {
                        "service": "iCloud Photos",
                        "category": "cloud-photos",
                        "wish": "download-then-delete",
                        "monthlyCost": 2.99
                      },
                      {
                        "service": "Facebook",
                        "category": "social",
                        "wish": "memorialize"
                      },
                      {
                        "service": "Bitwarden",
                        "category": "password-manager",
                        "wish": "transfer"
                      },
                      {
                        "service": "Netflix",
                        "category": "subscription",
                        "wish": "delete",
                        "monthlyCost": 13.99
                      },
                      {
                        "service": "example-family.org",
                        "category": "domain-website",
                        "wish": "keep-running",
                        "monthlyCost": 1.5
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Calculation result envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DigitalEstateOrganizerResult"
                }
              }
            }
          },
          "400": {
            "description": "Malformed JSON body.",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "Invalid input (see errors[]).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded (see Retry-After).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/api/v1/tool": {
      "get": {
        "operationId": "getToolDefinition",
        "summary": "Inputs, output schema and examples for this tool",
        "responses": {
          "200": {
            "description": "Tool definition.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Problem": {
        "type": "object",
        "description": "RFC 9457 problem details. 422 responses include per-field `errors`.",
        "required": [
          "type",
          "title",
          "status",
          "detail"
        ],
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "detail": {
            "type": "string"
          },
          "code": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "field",
                "message"
              ],
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "DigitalEstateOrganizerInput": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "ownerName": {
            "title": "Your name (optional, for the document)",
            "type": "string",
            "maxLength": 120
          },
          "trustedContact": {
            "title": "Trusted contact / executor",
            "type": "string",
            "maxLength": 120
          },
          "accounts": {
            "title": "Accounts",
            "type": "array",
            "minItems": 1,
            "maxItems": 100,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "properties": {
                "service": {
                  "title": "Service",
                  "type": "string",
                  "maxLength": 80
                },
                "category": {
                  "title": "Category",
                  "type": "string",
                  "enum": [
                    "email",
                    "cloud-photos",
                    "social",
                    "password-manager",
                    "banking",
                    "crypto",
                    "subscription",
                    "shopping",
                    "work",
                    "domain-website",
                    "other"
                  ],
                  "default": "other"
                },
                "wish": {
                  "title": "What should happen?",
                  "type": "string",
                  "enum": [
                    "transfer",
                    "download-then-delete",
                    "memorialize",
                    "delete",
                    "keep-running"
                  ],
                  "default": "download-then-delete"
                },
                "monthlyCost": {
                  "title": "Monthly cost",
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100000
                },
                "recoveryEmail": {
                  "title": "Recovery email (not password)",
                  "type": "string",
                  "maxLength": 120
                }
              },
              "required": [
                "service",
                "category",
                "wish"
              ]
            }
          },
          "hasPasswordManager": {
            "title": "I use a password manager",
            "type": "boolean",
            "default": false
          },
          "hasWrittenWill": {
            "title": "I have a written will",
            "type": "boolean",
            "default": false
          }
        },
        "required": [
          "trustedContact"
        ]
      },
      "DigitalEstateOrganizerResult": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "schemaVersion",
          "tool",
          "computedAt",
          "inputs",
          "summary",
          "result",
          "units",
          "assumptions",
          "sources",
          "warnings",
          "presentation",
          "links"
        ],
        "properties": {
          "schemaVersion": {
            "type": "string",
            "const": "1.0"
          },
          "tool": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "id",
              "name",
              "version"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "version": {
                "type": "string"
              }
            }
          },
          "computedAt": {
            "type": "string",
            "format": "date-time"
          },
          "inputs": {
            "type": "object",
            "description": "Normalised inputs actually used, including applied defaults."
          },
          "summary": {
            "type": "string"
          },
          "result": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "trustedContact",
              "accounts",
              "recurringMonthlyCost",
              "generalActions",
              "document"
            ],
            "properties": {
              "trustedContact": {
                "type": "string"
              },
              "recurringMonthlyCost": {
                "type": "number"
              },
              "generalActions": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "document": {
                "type": "string",
                "description": "Markdown handover document"
              },
              "accounts": {
                "type": "array",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "priority",
                    "service",
                    "category",
                    "wish",
                    "legacyFeature",
                    "steps",
                    "monthlyCost"
                  ],
                  "properties": {
                    "priority": {
                      "type": "integer"
                    },
                    "service": {
                      "type": "string"
                    },
                    "category": {
                      "type": "string"
                    },
                    "wish": {
                      "type": "string"
                    },
                    "monthlyCost": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "legacyFeature": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "additionalProperties": false,
                      "required": [
                        "name",
                        "how",
                        "url"
                      ],
                      "properties": {
                        "name": {
                          "type": "string"
                        },
                        "how": {
                          "type": "string"
                        },
                        "url": {
                          "type": "string"
                        }
                      }
                    },
                    "steps": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  }
                }
              }
            }
          },
          "units": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            }
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "title"
              ],
              "properties": {
                "title": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "publisher": {
                  "type": "string"
                },
                "retrievedAt": {
                  "type": "string"
                },
                "note": {
                  "type": "string"
                }
              }
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "presentation": {
            "type": "array",
            "items": {
              "type": "object"
            },
            "description": "Display blocks used by the human page (same data)."
          },
          "links": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "human",
              "api",
              "openapi",
              "methodology"
            ],
            "properties": {
              "human": {
                "type": "string",
                "format": "uri"
              },
              "api": {
                "type": "string",
                "format": "uri"
              },
              "openapi": {
                "type": "string",
                "format": "uri"
              },
              "methodology": {
                "type": "string",
                "format": "uri"
              }
            }
          }
        }
      }
    }
  }
}