{
  "openapi": "3.1.0",
  "info": {
    "title": "Roosevelt 2028 — Public Content API",
    "version": "1.1.0",
    "description": "Public read endpoints for the Roosevelt 2028 presidential campaign site (feeds, sitemaps, discovery files) plus an agent-native API: intent endpoints under /api/intents, persistent sessions and scoped expiring tokens under /api/agent, a per-agent audit log, and a side-effect-free sandbox under /api/sandbox. Every operation carries an x-consequence label describing its side effects and reversibility. Anonymous access is allowed; a presented bearer token is a hard capability limit.",
    "contact": {
      "name": "Roosevelt 2028 Press Office",
      "email": "press@electteddy.com",
      "url": "https://electteddy.curiossa.com"
    },
    "license": {
      "name": "All Rights Reserved with Quotation",
      "url": "https://electteddy.curiossa.com/llms.txt"
    },
    "termsOfService": "https://electteddy.curiossa.com/.well-known/ai.json"
  },
  "servers": [
    {
      "url": "https://electteddy.curiossa.com",
      "description": "Production"
    }
  ],
  "tags": [
    {
      "name": "Feeds",
      "description": "Machine-readable feeds of campaign content."
    },
    {
      "name": "Sitemaps",
      "description": "XML sitemaps of pages."
    },
    {
      "name": "Discovery",
      "description": "Agent / AI discovery files."
    },
    {
      "name": "Subscription",
      "description": "Newsletter / dispatch subscription."
    },
    {
      "name": "MCP",
      "description": "Model Context Protocol endpoint."
    },
    {
      "name": "Intents",
      "description": "High-level intent endpoints (one call per task)."
    },
    {
      "name": "Agent",
      "description": "Sessions, scoped tokens, audit log."
    },
    {
      "name": "Sandbox",
      "description": "Side-effect-free mirror of every agent and intent endpoint."
    }
  ],
  "security": [
    {
      "OAuth2ClientCredentials": []
    },
    {
      "ApiKeyHeader": []
    },
    {}
  ],
  "paths": {
    "/api/subscribe": {
      "post": {
        "tags": [
          "Subscription"
        ],
        "summary": "Subscribe to campaign dispatches",
        "description": "Primary write action — submit an email address to receive campaign news. Accepts an optional `X-API-Key` header for authenticated agent submissions; unauthenticated submissions are also accepted.",
        "operationId": "subscribeToDispatches",
        "x-primary-action": true,
        "x-agent-action": "primary",
        "security": [
          {
            "ApiKeyHeader": []
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscribeRequest"
              },
              "examples": {
                "basic": {
                  "value": {
                    "email": "press@yourpublication.com"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Subscription accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscribeResponse"
                }
              }
            }
          },
          "422": {
            "description": "Invalid email"
          }
        },
        "x-consequence": {
          "kind": "communication",
          "irreversible": false,
          "sideEffects": [
            "sends a confirmation email to the address",
            "adds the address to the dispatch list"
          ],
          "reversal": "unsubscribe link in every email"
        }
      }
    },
    "/api/mcp": {
      "post": {
        "tags": [
          "MCP"
        ],
        "summary": "Model Context Protocol endpoint",
        "description": "JSON-RPC 2.0 over HTTP. Supports `initialize`, `tools/list`, `tools/call`, `ping`. See https://modelcontextprotocol.io/.",
        "operationId": "mcpRpc",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "description": "JSON-RPC 2.0 request (or batch)."
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC 2.0 response",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        }
      },
      "get": {
        "tags": [
          "MCP"
        ],
        "summary": "MCP discovery (server info + tool list)",
        "operationId": "mcpDiscover",
        "responses": {
          "200": {
            "description": "Server info + tool list",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        }
      }
    },
    "/feed.json": {
      "get": {
        "tags": [
          "Feeds"
        ],
        "summary": "JSON Feed of campaign news dispatches",
        "description": "JSON Feed v1.1 document containing recent campaign news. Best general-purpose feed for agents.",
        "operationId": "listNews",
        "responses": {
          "200": {
            "description": "JSON Feed document",
            "content": {
              "application/feed+json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonFeed"
                }
              }
            },
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string",
                  "example": "public, max-age=300"
                }
              },
              "Access-Control-Allow-Origin": {
                "schema": {
                  "type": "string",
                  "example": "*"
                }
              }
            }
          }
        },
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        }
      }
    },
    "/rss.xml": {
      "get": {
        "tags": [
          "Feeds"
        ],
        "summary": "RSS feed of campaign news dispatches",
        "operationId": "listNewsRss",
        "responses": {
          "200": {
            "description": "RSS 2.0 document",
            "content": {
              "application/rss+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        }
      }
    },
    "/atom.xml": {
      "get": {
        "tags": [
          "Feeds"
        ],
        "summary": "Atom feed of campaign news dispatches",
        "operationId": "listNewsAtom",
        "responses": {
          "200": {
            "description": "Atom 1.0 document",
            "content": {
              "application/atom+xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        }
      }
    },
    "/sitemap.xml": {
      "get": {
        "tags": [
          "Sitemaps"
        ],
        "summary": "Sitemap of every page on the site",
        "operationId": "listPages",
        "responses": {
          "200": {
            "description": "XML sitemap",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        }
      }
    },
    "/news-sitemap.xml": {
      "get": {
        "tags": [
          "Sitemaps"
        ],
        "summary": "News-only sitemap (recent articles)",
        "operationId": "listNewsSitemap",
        "responses": {
          "200": {
            "description": "XML news sitemap",
            "content": {
              "application/xml": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        }
      }
    },
    "/llms.txt": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "LLM-friendly site overview",
        "operationId": "getLlmsTxt",
        "responses": {
          "200": {
            "description": "Plain-text site overview",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        },
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        }
      }
    },
    "/.well-known/ai.json": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "AI site profile",
        "operationId": "getAiProfile",
        "responses": {
          "200": {
            "description": "AI profile",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AiProfile"
                }
              }
            }
          }
        },
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        }
      }
    },
    "/.well-known/agent-card.json": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "Agent card describing the site's capabilities",
        "operationId": "getAgentCard",
        "responses": {
          "200": {
            "description": "Agent card",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        }
      }
    },
    "/.well-known/api-catalog": {
      "get": {
        "tags": [
          "Discovery"
        ],
        "summary": "RFC 9727 linkset of feeds and discovery files",
        "operationId": "getApiCatalog",
        "responses": {
          "200": {
            "description": "Linkset",
            "content": {
              "application/linkset+json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        },
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        }
      }
    },
    "/api/agent/token": {
      "post": {
        "tags": [
          "Agent"
        ],
        "summary": "Issue a scoped, expiring agent token",
        "operationId": "issueAgentToken",
        "x-consequence": {
          "kind": "credential",
          "irreversible": false,
          "sideEffects": [
            "issues a bearer token valid for at most 24 hours"
          ],
          "reversal": "DELETE /api/agent/token revokes it"
        },
        "security": [
          {}
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Token issued",
            "headers": {
              "x-request-id": {
                "description": "Audit log correlation id",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenResponse"
                }
              }
            }
          },
          "400": {
            "description": "Unknown scope or grant type",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Agent"
        ],
        "summary": "Introspect the presented token",
        "operationId": "introspectAgentToken",
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        },
        "security": [
          {
            "OAuth2ClientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Token is active",
            "headers": {
              "x-request-id": {
                "description": "Audit log correlation id",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing, expired or revoked token",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Agent"
        ],
        "summary": "Revoke the presented token",
        "operationId": "revokeAgentToken",
        "x-consequence": {
          "kind": "credential",
          "irreversible": true,
          "sideEffects": [
            "the presented token stops working immediately"
          ],
          "scope": "only the presented token"
        },
        "security": [
          {
            "OAuth2ClientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Revoked",
            "headers": {
              "x-request-id": {
                "description": "Audit log correlation id",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "No valid token presented",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/sessions": {
      "post": {
        "tags": [
          "Agent"
        ],
        "summary": "Create a persistent agent session",
        "description": "Context survives across requests for 24 hours (renewed on each update). Sessions are private to the creating agent, identified by token subject or X-Agent-Id.",
        "operationId": "createSession",
        "x-consequence": {
          "kind": "data",
          "irreversible": false,
          "sideEffects": [
            "stores the caller's own session context for 24 hours"
          ],
          "reversal": "DELETE the session"
        },
        "security": [
          {
            "OAuth2ClientCredentials": [
              "sessions:write"
            ]
          },
          {}
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Session created",
            "headers": {
              "x-request-id": {
                "description": "Audit log correlation id",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Session"
                }
              }
            }
          },
          "403": {
            "description": "Token lacks sessions:write",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "413": {
            "description": "Context over 64 KB",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/sessions/{id}": {
      "parameters": [
        {
          "name": "id",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string",
            "pattern": "^[a-f0-9]{24}$"
          }
        }
      ],
      "get": {
        "tags": [
          "Agent"
        ],
        "summary": "Read a session",
        "operationId": "getSession",
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        },
        "security": [
          {
            "OAuth2ClientCredentials": [
              "content:read"
            ]
          },
          {}
        ],
        "responses": {
          "200": {
            "description": "Session",
            "headers": {
              "x-request-id": {
                "description": "Audit log correlation id",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Session"
                }
              }
            }
          },
          "403": {
            "description": "Not your session",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Unknown or expired",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "put": {
        "tags": [
          "Agent"
        ],
        "summary": "Replace session context",
        "operationId": "replaceSession",
        "x-consequence": {
          "kind": "data",
          "irreversible": false,
          "sideEffects": [
            "stores the caller's own session context for 24 hours"
          ],
          "reversal": "DELETE the session"
        },
        "security": [
          {
            "OAuth2ClientCredentials": [
              "sessions:write"
            ]
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "headers": {
              "x-request-id": {
                "description": "Audit log correlation id",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Session"
                }
              }
            }
          }
        }
      },
      "patch": {
        "tags": [
          "Agent"
        ],
        "summary": "Merge into session context",
        "operationId": "updateSession",
        "x-consequence": {
          "kind": "data",
          "irreversible": false,
          "sideEffects": [
            "stores the caller's own session context for 24 hours"
          ],
          "reversal": "DELETE the session"
        },
        "security": [
          {
            "OAuth2ClientCredentials": [
              "sessions:write"
            ]
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SessionRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated",
            "headers": {
              "x-request-id": {
                "description": "Audit log correlation id",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Session"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Agent"
        ],
        "summary": "End a session",
        "operationId": "deleteSession",
        "x-consequence": {
          "kind": "data",
          "irreversible": true,
          "sideEffects": [
            "permanently removes the caller's own session"
          ],
          "scope": "only the calling agent's session"
        },
        "security": [
          {
            "OAuth2ClientCredentials": [
              "sessions:write"
            ]
          },
          {}
        ],
        "responses": {
          "200": {
            "description": "Deleted",
            "headers": {
              "x-request-id": {
                "description": "Audit log correlation id",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/agent/audit": {
      "get": {
        "tags": [
          "Agent"
        ],
        "summary": "Read the calling agent's audit trail",
        "description": "Last 50 entries for the token subject: agent id, method, path, status, sandbox flag and timing. Request and response bodies are never stored.",
        "operationId": "getAuditLog",
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        },
        "security": [
          {
            "OAuth2ClientCredentials": []
          }
        ],
        "responses": {
          "200": {
            "description": "Audit entries",
            "headers": {
              "x-request-id": {
                "description": "Audit log correlation id",
                "schema": {
                  "type": "string"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "agent_id": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "entries": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/AuditEntry"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Token required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/intents": {
      "get": {
        "tags": [
          "Intents"
        ],
        "summary": "List intent endpoints with their consequence labels",
        "operationId": "listIntents",
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        },
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "description": "Intent catalog",
            "headers": {
              "x-request-id": {
                "description": "Audit log correlation id",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/intents/search-content": {
      "post": {
        "tags": [
          "Intents"
        ],
        "summary": "Intent: search news dispatches",
        "operationId": "intentSearchContent",
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        },
        "security": [
          {
            "OAuth2ClientCredentials": [
              "content:read"
            ]
          },
          {}
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SearchContentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Matching dispatches",
            "headers": {
              "x-request-id": {
                "description": "Audit log correlation id",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "422": {
            "description": "Missing query",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/intents/latest-dispatch": {
      "post": {
        "tags": [
          "Intents"
        ],
        "summary": "Intent: newest dispatch and press release in one call",
        "operationId": "intentLatestDispatch",
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        },
        "security": [
          {
            "OAuth2ClientCredentials": [
              "content:read"
            ]
          },
          {}
        ],
        "responses": {
          "200": {
            "description": "Latest items",
            "headers": {
              "x-request-id": {
                "description": "Audit log correlation id",
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/api/intents/subscribe": {
      "post": {
        "tags": [
          "Intents"
        ],
        "summary": "Intent: subscribe an email address to dispatches",
        "operationId": "intentSubscribe",
        "x-consequence": {
          "kind": "communication",
          "irreversible": false,
          "sideEffects": [
            "sends a confirmation email to the address",
            "adds the address to the dispatch list"
          ],
          "reversal": "unsubscribe link in every email"
        },
        "x-primary-action": true,
        "security": [
          {
            "OAuth2ClientCredentials": [
              "subscribe:write"
            ]
          },
          {}
        ],
        "parameters": [
          {
            "name": "X-Dry-Run",
            "in": "header",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "true"
              ]
            },
            "description": "Validate without subscribing (same as calling under /api/sandbox/)."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscribeRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Accepted",
            "headers": {
              "x-request-id": {
                "description": "Audit log correlation id",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "200": {
            "description": "Dry run: validated, not committed",
            "headers": {
              "x-request-id": {
                "description": "Audit log correlation id",
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "403": {
            "description": "Token lacks subscribe:write",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Invalid email",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/sandbox/{path}": {
      "parameters": [
        {
          "name": "path",
          "in": "path",
          "required": true,
          "schema": {
            "type": "string"
          },
          "description": "Any agent or intent path, e.g. intents/subscribe or agent/sessions"
        }
      ],
      "post": {
        "tags": [
          "Sandbox"
        ],
        "summary": "Sandbox mirror of any agent or intent endpoint (no side effects)",
        "description": "Same handlers and validation as the live paths; nothing is committed, tokens issued here are sandbox-only, and every response carries x-sandbox: true.",
        "operationId": "sandboxCall",
        "x-consequence": {
          "kind": "none",
          "irreversible": false,
          "sideEffects": []
        },
        "security": [
          {}
        ],
        "responses": {
          "200": {
            "description": "Dry-run result",
            "headers": {
              "x-request-id": {
                "description": "Audit log correlation id",
                "schema": {
                  "type": "string"
                }
              },
              "x-sandbox": {
                "schema": {
                  "type": "string",
                  "example": "true"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Optional API key for authenticated agent calls. Unauthenticated calls are also accepted on public endpoints."
      },
      "ApiKeyQuery": {
        "type": "apiKey",
        "in": "query",
        "name": "api_key",
        "description": "Optional API key passed as a query parameter."
      },
      "OAuth2ClientCredentials": {
        "type": "oauth2",
        "description": "Scoped, expiring bearer tokens. Tokens are subtractive: they can only do what their scopes name.",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://electteddy.curiossa.com/api/agent/token",
            "scopes": {
              "content:read": "Read dispatches and intents",
              "subscribe:write": "Subscribe an email address",
              "sessions:write": "Create, update and delete your own sessions"
            }
          }
        }
      }
    },
    "schemas": {
      "SubscribeRequest": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "description": "Subscriber email address."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Optional list interest tags."
          }
        }
      },
      "SubscribeResponse": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "example": "accepted"
          },
          "message": {
            "type": "string"
          },
          "email": {
            "type": "string",
            "format": "email"
          }
        }
      },
      "JsonFeed": {
        "type": "object",
        "description": "JSON Feed 1.1 document — see jsonfeed.org",
        "properties": {
          "version": {
            "type": "string",
            "example": "https://jsonfeed.org/version/1.1"
          },
          "title": {
            "type": "string"
          },
          "home_page_url": {
            "type": "string"
          },
          "feed_url": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "url": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "content_html": {
                  "type": "string"
                },
                "content_text": {
                  "type": "string"
                },
                "summary": {
                  "type": "string"
                },
                "date_published": {
                  "type": "string",
                  "format": "date-time"
                },
                "image": {
                  "type": "string"
                },
                "tags": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          }
        }
      },
      "AiProfile": {
        "type": "object",
        "description": "AI site profile — see /.well-known/ai.json"
      },
      "Consequence": {
        "type": "object",
        "description": "Consequence label (also published as x-consequence on each operation).",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "none",
              "communication",
              "credential",
              "data",
              "payment"
            ]
          },
          "irreversible": {
            "type": "boolean"
          },
          "sideEffects": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "reversal": {
            "type": "string"
          }
        }
      },
      "TokenRequest": {
        "type": "object",
        "properties": {
          "client_id": {
            "type": "string",
            "description": "Your agent identifier (becomes the token subject and audit agentId)."
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "content:read",
                "subscribe:write",
                "sessions:write"
              ]
            }
          },
          "scope": {
            "type": "string",
            "description": "Space-separated alternative to scopes."
          },
          "ttl": {
            "type": "integer",
            "minimum": 60,
            "maximum": 86400,
            "default": 3600
          },
          "grant_type": {
            "type": "string",
            "enum": [
              "client_credentials"
            ]
          }
        }
      },
      "TokenResponse": {
        "type": "object",
        "properties": {
          "access_token": {
            "type": "string"
          },
          "token_type": {
            "type": "string",
            "example": "Bearer"
          },
          "expires_in": {
            "type": "integer"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "scope": {
            "type": "string"
          },
          "agent_id": {
            "type": "string"
          },
          "sandbox": {
            "type": "boolean"
          },
          "requestId": {
            "type": "string"
          }
        }
      },
      "Session": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "agentId": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time"
          },
          "ttlSeconds": {
            "type": "integer"
          },
          "sandbox": {
            "type": "boolean"
          },
          "context": {
            "type": "object",
            "additionalProperties": true,
            "description": "Free-form context, max 64 KB."
          }
        }
      },
      "SessionRequest": {
        "type": "object",
        "properties": {
          "context": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "AuditEntry": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "at": {
            "type": "string",
            "format": "date-time"
          },
          "agentId": {
            "type": "string"
          },
          "method": {
            "type": "string"
          },
          "path": {
            "type": "string"
          },
          "status": {
            "type": "integer"
          },
          "sandbox": {
            "type": "boolean"
          },
          "ms": {
            "type": "integer"
          }
        }
      },
      "SearchContentRequest": {
        "type": "object",
        "required": [
          "query"
        ],
        "properties": {
          "query": {
            "type": "string"
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50,
            "default": 10
          }
        }
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "requestId": {
            "type": "string"
          }
        }
      }
    }
  }
}
