{
  "openapi": "3.1.0",
  "info": {
    "title": "Mana Public Read API",
    "version": "1.0.0",
    "summary": "Public, unauthenticated read API behind mana.am.",
    "description": "The public read endpoints that power the mana.am website: the community feed, popular tags, public creator profiles, and public app share pages. These endpoints require no authentication and expose only public data. MCP discovery is available at https://mana.am/.well-known/mcp; the canonical read-only product MCP server is https://api.mana.am/mcp with apex aliases at https://mana.am/api/mcp and https://mana.am/webmcp. The https://mana.am/mcp path is a separate docs-only MCP surface. There is no public write API or OAuth-for-agents credential flow — building creations happens inside the Mana iOS app. All responses use the envelope `{ \"code\": 0, \"data\": ... }`; a non-zero `code` with a `message` field indicates an error. Treat as fair-use.\n\nVersioning: clients may send Mana-API-Version: 2026-05-26. Public read endpoints are additive; breaking changes receive changelog notice before deprecation.\n\nAgents may send Idempotency-Key on POST discovery endpoints. The public read API is additive; breaking changes are announced before removal and may emit Deprecation and Sunset headers. For long-running natural-language discovery, POST /ask/jobs returns 202 Accepted with Location and Retry-After, then poll GET /ask/jobs/{jobId}. Comparison pages at https://mana.am/compare position Mana against Bubble, FlutterFlow, Adalo, Builder.io, Rork, Lovable, Replit Agent, Bolt, and v0.\n\nDeprecation policy: Mana uses path-based stable API versions where needed. Breaking changes are introduced on a new path, deprecated fields or endpoints emit Deprecation and Sunset headers for at least 90 days, and agents should watch these headers before caching operation behavior.\n\nStatus and recovery: agents can fetch https://mana.am/status before retrying after repeated 5xx responses. 404 probes with Accept: application/json return a JSON error envelope instead of the homepage. Rate limits are explicit: public read API 120 requests per 60 seconds, agent discovery and MCP probes 60 requests per 60 seconds, batch requests allow 10 operations per request, and ask job polling should wait at least 5 seconds. Retryable HTTP statuses are 408, 425, 429, 500, 502, 503, and 504. Non-retryable statuses are 400, 401, 403, 404, 409, and 422 unless the request changes. For 429, wait for Retry-After or RateLimit-Reset. For retryable 5xx, use exponential backoff with full jitter: 500 ms initial delay, multiplier 2, cap 8 seconds, and stop after 4 total attempts.",
    "x-agent-error-recovery": {
      "rate_limits": {
        "public_read_per_minute": 120,
        "agent_discovery_per_minute": 60,
        "mcp_probe_per_minute": 60,
        "batch_operations_per_request": 10,
        "ask_jobs_poll_min_seconds": 5
      },
      "retryable_status_codes": [
        408,
        425,
        429,
        500,
        502,
        503,
        504
      ],
      "non_retryable_status_codes": [
        400,
        401,
        403,
        404,
        409,
        422
      ],
      "exponential_backoff": {
        "initial_delay_ms": 500,
        "multiplier": 2,
        "jitter": "full",
        "max_delay_ms": 8000,
        "max_attempts": 4
      },
      "error_codes": [
        "invalid_request",
        "unauthorized",
        "forbidden",
        "not_found",
        "conflict",
        "validation_failed",
        "rate_limited",
        "timeout",
        "upstream_unavailable",
        "internal_error"
      ]
    },
    "contact": {
      "name": "Mana product and engineering team",
      "email": "support@mana.am",
      "url": "https://mana.am/about"
    },
    "license": {
      "name": "Proprietary"
    },
    "x-canonical-product-description": "Mana is your Personal Agent for iPhone. Describe what you want in plain language and Mana turns it into a real, runnable creation on your iPhone: apps, trackers, games, widgets, and shared experiences. Create, play, and remix.",
    "termsOfService": "https://mana.am/terms",
    "x-maintainer": "Mana product and engineering team",
    "x-author": "Mana product and engineering team",
    "x-editorial-ownership": "https://mana.am/authors.md",
    "x-about": "https://mana.am/about",
    "x-about-markdown": "https://mana.am/about.md",
    "x-privacy-policy": "https://mana.am/privacy-policy",
    "x-terms-of-service": "https://mana.am/terms",
    "x-case-studies": "https://mana.am/case-studies.md",
    "x-trust-notes": "https://mana.am/trust.md",
    "x-published": "2026-05-26",
    "x-last-reviewed": "2026-05-27"
  },
  "servers": [
    {
      "url": "https://api.mana.am",
      "description": "Production"
    }
  ],
  "security": [],
  "externalDocs": {
    "description": "Product overview for agents",
    "url": "https://mana.am/llms-full.txt"
  },
  "tags": [
    {
      "name": "community",
      "description": "Public discovery feed and tags"
    },
    {
      "name": "users",
      "description": "Public creator profiles"
    },
    {
      "name": "apps",
      "description": "Public app share data"
    },
    {
      "name": "agents",
      "description": "Agent discovery, MCP, and NLWeb-style surfaces"
    }
  ],
  "paths": {
    "/public/share/community": {
      "get": {
        "operationId": "listCommunityApps",
        "tags": [
          "community"
        ],
        "summary": "Public community feed",
        "description": "Cursor-paginated, sortable, searchable feed of public creations. Mirrors the iOS Home feed and the web /community page. Use cursor from data.next_cursor for the next page; omit cursor for the first page.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "BCP-47 locale for localized fields; defaults to English."
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "trending",
                "recent",
                "popular",
                "remixed",
                "liked"
              ]
            },
            "description": "Ordering of results."
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by category slug."
          },
          {
            "name": "tag",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by tag key."
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Full-text search query."
          },
          {
            "name": "featuredOnly",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean"
            },
            "description": "Restrict to featured creations."
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Opaque cursor returned as data.next_cursor from the previous response. Omit for the first page."
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 48,
              "default": 24
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Cursor-paginated community feed page. The response data includes items, hasMore, total, next_cursor, and pagination metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-mana-permissions": [
          "public:read"
        ],
        "servers": [
          {
            "url": "https://mana.am",
            "description": "Cursor-friendly agent wrapper backed by the production public API"
          }
        ]
      }
    },
    "/public/share/tags": {
      "get": {
        "operationId": "listPopularTags",
        "tags": [
          "community"
        ],
        "summary": "Globally popular tags",
        "description": "Popular tags with frequency counts. Powers the /community tag marquee and the /tags index page.",
        "responses": {
          "200": {
            "description": "Popular tags",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-mana-permissions": [
          "public:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          }
        ]
      }
    },
    "/public/share/community/landing": {
      "get": {
        "operationId": "getCommunityLanding",
        "tags": [
          "community"
        ],
        "summary": "Community landing composite",
        "description": "Editorial composite for the App-Store-style /community landing: spotlight rail, themed rails (trending/recent/remixed/liked/featured), and category tiles in one round-trip.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Community landing payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-mana-permissions": [
          "public:read"
        ]
      }
    },
    "/public/share/user/{handle}": {
      "get": {
        "operationId": "getPublicUserProfile",
        "tags": [
          "users"
        ],
        "summary": "Public creator profile",
        "description": "Public profile, aggregate stats, public apps, and top scores for a creator handle.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "name": "handle",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Creator handle (the subdomain in {handle}.mana.am)."
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public profile payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "404": {
            "description": "Handle not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-mana-permissions": [
          "public:read"
        ]
      }
    },
    "/public/share/user/{handle}/followers": {
      "get": {
        "operationId": "listPublicUserFollowers",
        "tags": [
          "users"
        ],
        "summary": "Public follower preview",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "name": "handle",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 24
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Follower preview",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "404": {
            "description": "Handle not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-mana-permissions": [
          "public:read"
        ]
      }
    },
    "/public/share/user/{handle}/following": {
      "get": {
        "operationId": "listPublicUserFollowing",
        "tags": [
          "users"
        ],
        "summary": "Public following preview",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "name": "handle",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 24
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Following preview",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "404": {
            "description": "Handle not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-mana-permissions": [
          "public:read"
        ]
      }
    },
    "/public/share/app/{handle}/{slug}": {
      "get": {
        "operationId": "getPublicAppShare",
        "tags": [
          "apps"
        ],
        "summary": "Public app share data",
        "description": "Public share data for a single creation identified by creator handle and app slug.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "name": "handle",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Creator handle."
          },
          {
            "name": "slug",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Public app slug."
          },
          {
            "name": "locale",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Public app share payload",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SuccessEnvelope"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "404": {
            "description": "App or handle not found",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "x-mana-permissions": [
          "public:read"
        ]
      }
    },
    "/ask": {
      "post": {
        "operationId": "askManaProductContext",
        "tags": [
          "agents"
        ],
        "summary": "Ask Mana product context",
        "description": "NLWeb-style endpoint for agent discovery. Returns product, pricing, API, auth, and MCP guidance as JSON, or SSE when prefer.streaming is true.",
        "servers": [
          {
            "url": "https://mana.am",
            "description": "Mana web surface"
          }
        ],
        "x-mana-permissions": [
          "public:read"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Answer with citations and metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AskResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE events: start, result, complete."
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/mcp": {
      "get": {
        "operationId": "getMcpServerInfo",
        "tags": [
          "agents"
        ],
        "summary": "MCP server information",
        "description": "Returns the read-only Mana MCP server metadata for Streamable HTTP clients.",
        "servers": [
          {
            "url": "https://mana.am",
            "description": "Mana web surface"
          }
        ],
        "x-mana-permissions": [
          "public:read"
        ],
        "responses": {
          "200": {
            "description": "MCP server metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          }
        ]
      },
      "post": {
        "operationId": "callMcpJsonRpc",
        "tags": [
          "agents"
        ],
        "summary": "Call MCP JSON-RPC method",
        "description": "Streamable HTTP MCP endpoint. Supports initialize, tools/list, tools/call, resources/list, and resources/read for public Mana data.",
        "servers": [
          {
            "url": "https://mana.am",
            "description": "Mana web surface"
          }
        ],
        "x-mana-permissions": [
          "public:read"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/api/mcp": {
      "post": {
        "tags": [
          "agents"
        ],
        "operationId": "mcpJsonRpcAlternate",
        "summary": "Alternate MCP JSON-RPC transport",
        "description": "Alternate Streamable HTTP MCP endpoint with the same read-only tools as /mcp.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://mana.am"
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/batch": {
      "get": {
        "tags": [
          "agents"
        ],
        "operationId": "getBatchEndpointInfo",
        "summary": "Describe the batch read endpoint",
        "description": "Returns supported batch operations for Mana public read data.",
        "responses": {
          "200": {
            "description": "Batch endpoint usage and supported operations.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://mana.am"
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          }
        ]
      },
      "post": {
        "tags": [
          "agents"
        ],
        "operationId": "batchPublicRead",
        "summary": "Batch public read operations",
        "description": "Combines up to 10 read-only public Mana operations in one request so agents can avoid request waterfalls.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchRequest"
              },
              "examples": {
                "tags": {
                  "value": {
                    "requests": [
                      {
                        "id": "tags",
                        "operation": "get_popular_tags",
                        "arguments": {}
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Per-request batch responses.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchResponse"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "400": {
            "description": "Invalid batch body.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://mana.am"
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/webmcp": {
      "get": {
        "operationId": "getMcpServerInfo",
        "tags": [
          "agents"
        ],
        "summary": "MCP server information",
        "description": "Returns the read-only Mana MCP server metadata for Streamable HTTP clients.",
        "servers": [
          {
            "url": "https://mana.am",
            "description": "Mana web surface"
          }
        ],
        "x-mana-permissions": [
          "public:read"
        ],
        "responses": {
          "200": {
            "description": "MCP server metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          }
        ]
      },
      "post": {
        "operationId": "webMcpJsonRpc",
        "tags": [
          "agents"
        ],
        "summary": "WebMCP-compatible JSON-RPC transport",
        "description": "WebMCP-compatible alias for the read-only Mana Streamable HTTP MCP endpoint.",
        "servers": [
          {
            "url": "https://mana.am",
            "description": "Mana web surface"
          }
        ],
        "x-mana-permissions": [
          "public:read"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC response.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/.well-known/webmcp": {
      "get": {
        "tags": [
          "agents"
        ],
        "operationId": "getWebMcpDiscovery",
        "summary": "Get WebMCP discovery",
        "description": "Returns the WebMCP-compatible discovery document for Mana public read tools.",
        "responses": {
          "200": {
            "description": "WebMCP discovery document.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "servers": [
          {
            "url": "https://mana.am"
          }
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          }
        ]
      }
    },
    "/api/ask": {
      "post": {
        "operationId": "askManaApiAlias",
        "tags": [
          "agents"
        ],
        "summary": "Ask Mana product context",
        "description": "NLWeb-style endpoint for agent discovery. Returns product, pricing, API, auth, and MCP guidance as JSON, or SSE when prefer.streaming is true.",
        "servers": [
          {
            "url": "https://mana.am",
            "description": "Mana web surface"
          }
        ],
        "x-mana-permissions": [
          "public:read"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Answer with citations and metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AskResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE events: start, result, complete."
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/nlweb/ask": {
      "post": {
        "operationId": "askManaNlwebAlias",
        "tags": [
          "agents"
        ],
        "summary": "Ask Mana product context",
        "description": "NLWeb-style endpoint for agent discovery. Returns product, pricing, API, auth, and MCP guidance as JSON, or SSE when prefer.streaming is true.",
        "servers": [
          {
            "url": "https://mana.am",
            "description": "Mana web surface"
          }
        ],
        "x-mana-permissions": [
          "public:read"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Answer with citations and metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AskResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE events: start, result, complete."
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/{locale}/ask": {
      "post": {
        "operationId": "askManaLocaleAlias",
        "tags": [
          "agents"
        ],
        "summary": "Ask Mana product context",
        "description": "NLWeb-style endpoint for agent discovery. Returns product, pricing, API, auth, and MCP guidance as JSON, or SSE when prefer.streaming is true.",
        "servers": [
          {
            "url": "https://mana.am",
            "description": "Mana web surface"
          }
        ],
        "x-mana-permissions": [
          "public:read"
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Answer with citations and metadata.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AskResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string",
                  "description": "SSE events: start, result, complete."
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "name": "locale",
            "in": "path",
            "required": true,
            "description": "BCP-47 locale prefix.",
            "schema": {
              "type": "string"
            }
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ]
      }
    },
    "/ask/jobs": {
      "post": {
        "operationId": "createAskJob",
        "tags": [
          "agents"
        ],
        "summary": "Create asynchronous ask job",
        "description": "NLWeb-compatible asynchronous ask pattern. Returns 202 Accepted with Location, Retry-After, job_id, and status_url so agents can poll instead of holding a long request open.",
        "servers": [
          {
            "url": "https://mana.am",
            "description": "Mana web surface"
          }
        ],
        "x-mana-permissions": [
          "public:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "$ref": "#/components/parameters/IdempotencyKey"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AskRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Ask job accepted for asynchronous polling.",
            "headers": {
              "Location": {
                "description": "Poll URL for this job.",
                "schema": {
                  "type": "string",
                  "format": "uri"
                }
              },
              "Retry-After": {
                "$ref": "#/components/headers/Retry-After"
              },
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsyncAskJob"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/ask/jobs/{jobId}": {
      "get": {
        "operationId": "getAskJobStatus",
        "tags": [
          "agents"
        ],
        "summary": "Get asynchronous ask job status",
        "description": "Poll a previously accepted ask job until the status is completed or failed.",
        "servers": [
          {
            "url": "https://mana.am",
            "description": "Mana web surface"
          }
        ],
        "x-mana-permissions": [
          "public:read"
        ],
        "parameters": [
          {
            "$ref": "#/components/parameters/ApiVersionHeader"
          },
          {
            "name": "jobId",
            "in": "path",
            "required": true,
            "description": "Ask job identifier returned by POST /ask/jobs.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Current ask job status and result when complete.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AsyncAskJobStatus"
                }
              }
            },
            "headers": {
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          },
          "500": {
            "description": "Unexpected server error. Retry later or check status documentation before repeating automated requests.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorEnvelope"
                }
              }
            }
          }
        }
      }
    },
    "/status": {
      "get": {
        "operationId": "getStatus",
        "summary": "Read Mana public service status",
        "description": "Returns a machine-readable status document for Mana public agent surfaces, including retry guidance for 429 and 5xx recovery.",
        "tags": [
          "Discovery"
        ],
        "responses": {
          "200": {
            "description": "Service status and retry guidance.",
            "headers": {
              "RateLimit-Limit": {
                "$ref": "#/components/headers/RateLimit-Limit"
              },
              "RateLimit-Remaining": {
                "$ref": "#/components/headers/RateLimit-Remaining"
              },
              "RateLimit-Reset": {
                "$ref": "#/components/headers/RateLimit-Reset"
              },
              "Deprecation": {
                "description": "Deprecation policy signal. Present when this endpoint, response shape, or field is deprecated; agents should inspect Sunset before relying on the behavior long term.",
                "schema": {
                  "type": "string"
                }
              },
              "Sunset": {
                "description": "Planned removal timestamp for deprecated behavior. Mana provides at least 90 days of notice for breaking public API changes.",
                "schema": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusResponse"
                }
              }
            }
          },
          "500": {
            "$ref": "#/components/responses/ServerError"
          }
        },
        "servers": [
          {
            "url": "https://mana.am",
            "description": "Mana web and agent discovery surface"
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "PublicRead": {
        "type": "apiKey",
        "in": "header",
        "name": "Authorization",
        "description": "No Authorization header is required for documented public read endpoints. Protected app endpoints use app-issued bearer tokens and are not part of this public API."
      },
      "ManaAppBearer": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT",
        "description": "Private Mana iOS app bearer token. Not issued to third-party agents. Documented so agents can distinguish public read scopes from protected app actions.",
        "x-scopes-supported": [
          "public:read",
          "community:read",
          "profile:read",
          "app:read",
          "app:write"
        ]
      }
    },
    "headers": {
      "RateLimit-Limit": {
        "description": "Maximum request budget for the current public-read window when emitted. Public read API budget is 120 requests per 60 seconds; agent discovery and MCP probe budget is 60 requests per 60 seconds.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimit-Remaining": {
        "description": "Remaining request budget for the current public-read window when emitted.",
        "schema": {
          "type": "integer"
        }
      },
      "RateLimit-Reset": {
        "description": "Seconds until the current public-read rate-limit window resets when emitted. Agents should wait this many seconds before retrying if Retry-After is absent.",
        "schema": {
          "type": "integer"
        }
      },
      "Retry-After": {
        "description": "Seconds to wait before retrying after a 429 response. Prefer this over exponential backoff for 429 responses.",
        "schema": {
          "type": "integer"
        }
      },
      "Deprecation": {
        "description": "Present when an endpoint or field is deprecated. Value follows the HTTP Deprecation header convention.",
        "schema": {
          "type": "string"
        }
      },
      "Sunset": {
        "description": "Present when a deprecated endpoint or field has a planned removal date.",
        "schema": {
          "type": "string",
          "format": "date-time"
        }
      }
    },
    "responses": {
      "TooManyRequests": {
        "description": "Rate limit exceeded. Public reads allow 120 requests per 60 seconds; agent discovery and MCP probes allow 60 requests per 60 seconds. Retry after the provided Retry-After or RateLimit-Reset window.",
        "headers": {
          "RateLimit-Limit": {
            "$ref": "#/components/headers/RateLimit-Limit"
          },
          "RateLimit-Remaining": {
            "$ref": "#/components/headers/RateLimit-Remaining"
          },
          "RateLimit-Reset": {
            "$ref": "#/components/headers/RateLimit-Reset"
          },
          "Retry-After": {
            "$ref": "#/components/headers/Retry-After"
          }
        },
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorEnvelope"
            }
          }
        }
      }
    },
    "schemas": {
      "SuccessEnvelope": {
        "type": "object",
        "description": "Standard success envelope.",
        "required": [
          "code",
          "data"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "const": 0,
            "description": "0 indicates success."
          },
          "data": {
            "type": "object",
            "additionalProperties": true,
            "description": "Endpoint-specific payload."
          }
        }
      },
      "ErrorEnvelope": {
        "type": "object",
        "description": "Standard error envelope. Stable error codes for agents: invalid_request, unauthorized, forbidden, not_found, conflict, validation_failed, rate_limited, timeout, upstream_unavailable, internal_error. Retry only 408, 425, 429, 500, 502, 503, and 504. Do not retry 400, 401, 403, 404, 409, or 422 without changing the request. For 5xx, use full-jitter exponential backoff: 500 ms initial delay, multiplier 2, cap 8 seconds, stop after 4 total attempts.",
        "x-error-codes": [
          "invalid_request",
          "unauthorized",
          "forbidden",
          "not_found",
          "conflict",
          "validation_failed",
          "rate_limited",
          "timeout",
          "upstream_unavailable",
          "internal_error"
        ],
        "x-retry-policy": {
          "retryable_status_codes": [
            408,
            425,
            429,
            500,
            502,
            503,
            504
          ],
          "non_retryable_status_codes": [
            400,
            401,
            403,
            404,
            409,
            422
          ],
          "exponential_backoff": {
            "initial_delay_ms": 500,
            "multiplier": 2,
            "jitter": "full",
            "max_delay_ms": 8000,
            "max_attempts": 4
          }
        },
        "required": [
          "code",
          "message"
        ],
        "properties": {
          "code": {
            "type": "integer",
            "description": "Non-zero application error code."
          },
          "error_code": {
            "type": "string",
            "enum": [
              "invalid_request",
              "unauthorized",
              "forbidden",
              "not_found",
              "conflict",
              "validation_failed",
              "rate_limited",
              "timeout",
              "upstream_unavailable",
              "internal_error"
            ],
            "description": "Stable agent-readable error code when emitted."
          },
          "message": {
            "type": "string",
            "description": "Human-readable error message."
          }
        }
      },
      "AskRequest": {
        "type": "object",
        "properties": {
          "query": {
            "oneOf": [
              {
                "type": "string",
                "description": "Natural-language question about Mana."
              },
              {
                "type": "object",
                "required": [
                  "text"
                ],
                "properties": {
                  "text": {
                    "type": "string",
                    "description": "NLWeb-style natural-language query text."
                  },
                  "site": {
                    "type": "string",
                    "description": "Optional NLWeb site/domain hint."
                  }
                },
                "additionalProperties": true
              }
            ]
          },
          "question": {
            "type": "string",
            "description": "Alias for query."
          },
          "prefer": {
            "type": "object",
            "properties": {
              "streaming": {
                "type": "boolean",
                "description": "When true, return text/event-stream."
              }
            },
            "additionalProperties": false
          },
          "streaming": {
            "type": "boolean",
            "description": "Set true to request SSE streaming."
          },
          "stream": {
            "type": "boolean",
            "description": "Alias for streaming."
          }
        },
        "additionalProperties": false
      },
      "AskResponse": {
        "type": "object",
        "required": [
          "_meta",
          "answer",
          "results"
        ],
        "properties": {
          "_meta": {
            "type": "object",
            "required": [
              "response_type",
              "version"
            ],
            "properties": {
              "response_type": {
                "type": "string",
                "enum": [
                  "answer",
                  "endpoint",
                  "job"
                ]
              },
              "response_format": {
                "type": "string",
                "description": "NLWeb response format, usually conversational_search."
              },
              "version": {
                "type": "string",
                "description": "NLWeb-compatible response version."
              },
              "source": {
                "type": "string"
              }
            },
            "additionalProperties": true
          },
          "query": {
            "type": "string"
          },
          "answer": {
            "type": "string"
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          }
        }
      },
      "JsonRpcRequest": {
        "type": "object",
        "required": [
          "jsonrpc",
          "method"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "method": {
            "type": "string"
          },
          "params": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "required": [
          "jsonrpc"
        ],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "const": "2.0"
          },
          "id": {
            "oneOf": [
              {
                "type": "string"
              },
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "result": {
            "type": "object",
            "additionalProperties": true
          },
          "error": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "BatchRequest": {
        "type": "object",
        "required": [
          "requests"
        ],
        "properties": {
          "requests": {
            "type": "array",
            "minItems": 1,
            "maxItems": 10,
            "items": {
              "type": "object",
              "required": [
                "operation"
              ],
              "properties": {
                "id": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "integer"
                    }
                  ],
                  "description": "Client correlation id."
                },
                "operation": {
                  "type": "string",
                  "enum": [
                    "search_community_apps",
                    "get_popular_tags",
                    "get_creator_profile",
                    "get_app_share"
                  ]
                },
                "arguments": {
                  "type": "object",
                  "additionalProperties": true
                }
              }
            }
          }
        }
      },
      "BatchResponse": {
        "type": "object",
        "required": [
          "responses"
        ],
        "properties": {
          "responses": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "ok"
              ],
              "properties": {
                "id": {
                  "oneOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "integer"
                    }
                  ]
                },
                "ok": {
                  "type": "boolean"
                },
                "data": {
                  "type": "object",
                  "additionalProperties": true
                },
                "error": {
                  "type": "string"
                }
              }
            }
          }
        }
      },
      "AsyncAskJob": {
        "type": "object",
        "required": [
          "job_id",
          "status",
          "status_url"
        ],
        "properties": {
          "job_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed"
            ]
          },
          "status_url": {
            "type": "string",
            "format": "uri"
          },
          "query": {
            "type": "string"
          },
          "_meta": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "AsyncAskJobStatus": {
        "type": "object",
        "required": [
          "job_id",
          "status"
        ],
        "properties": {
          "job_id": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "completed",
              "failed"
            ]
          },
          "result": {
            "$ref": "#/components/schemas/AskResponse"
          },
          "error": {
            "$ref": "#/components/schemas/ErrorEnvelope"
          }
        }
      },
      "StatusResponse": {
        "type": "object",
        "required": [
          "status",
          "name",
          "checked_at",
          "services",
          "incidents",
          "rate_limits",
          "retry_policy",
          "error_codes",
          "error_code_catalog",
          "retry_guidance",
          "docs"
        ],
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "degraded",
              "down"
            ]
          },
          "name": {
            "type": "string"
          },
          "checked_at": {
            "type": "string",
            "format": "date-time"
          },
          "services": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "enum": [
                "ok",
                "degraded",
                "down"
              ]
            }
          },
          "incidents": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "rate_limits": {
            "type": "object",
            "required": [
              "thresholds",
              "public_read_per_minute",
              "agent_discovery_per_minute",
              "mcp_probe_per_minute",
              "batch_operations_per_request",
              "ask_jobs_poll_min_seconds",
              "headers"
            ],
            "properties": {
              "thresholds": {
                "type": "string",
                "description": "Plain-language rate-limit thresholds for agents."
              },
              "public_read_per_minute": {
                "type": "integer",
                "const": 120,
                "description": "Public read API request budget per 60-second window."
              },
              "agent_discovery_per_minute": {
                "type": "integer",
                "const": 60,
                "description": "Agent discovery and MCP probe request budget per 60-second window."
              },
              "mcp_probe_per_minute": {
                "type": "integer",
                "const": 60,
                "description": "MCP initialize, tools/list, and resources/list probe budget per 60-second window."
              },
              "batch_operations_per_request": {
                "type": "integer",
                "const": 10,
                "description": "Maximum operations in one read-only batch request."
              },
              "ask_jobs_poll_min_seconds": {
                "type": "integer",
                "const": 5,
                "description": "Minimum polling interval for async ask jobs."
              },
              "headers": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "RateLimit-Limit",
                    "RateLimit-Remaining",
                    "RateLimit-Reset",
                    "Retry-After"
                  ]
                }
              }
            },
            "additionalProperties": false
          },
          "retry_policy": {
            "type": "object",
            "required": [
              "backoff_algorithm",
              "idempotent_methods",
              "retryable_status_codes",
              "non_retryable_status_codes",
              "exponential_backoff",
              "retry_429",
              "retry_5xx"
            ],
            "properties": {
              "backoff_algorithm": {
                "type": "string",
                "description": "Plain-language exponential backoff algorithm for retryable responses."
              },
              "idempotent_methods": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": [
                    "GET",
                    "HEAD",
                    "OPTIONS"
                  ]
                }
              },
              "retryable_status_codes": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "enum": [
                    408,
                    425,
                    429,
                    500,
                    502,
                    503,
                    504
                  ]
                }
              },
              "non_retryable_status_codes": {
                "type": "array",
                "items": {
                  "type": "integer",
                  "enum": [
                    400,
                    401,
                    403,
                    404,
                    409,
                    422
                  ]
                }
              },
              "exponential_backoff": {
                "type": "object",
                "required": [
                  "initial_delay_ms",
                  "multiplier",
                  "jitter",
                  "max_delay_ms",
                  "max_attempts"
                ],
                "properties": {
                  "initial_delay_ms": {
                    "type": "integer",
                    "const": 500
                  },
                  "multiplier": {
                    "type": "integer",
                    "const": 2
                  },
                  "jitter": {
                    "type": "string",
                    "const": "full"
                  },
                  "max_delay_ms": {
                    "type": "integer",
                    "const": 8000
                  },
                  "max_attempts": {
                    "type": "integer",
                    "const": 4
                  }
                },
                "additionalProperties": false
              },
              "retry_429": {
                "type": "string"
              },
              "retry_5xx": {
                "type": "string"
              }
            },
            "additionalProperties": false
          },
          "error_codes": {
            "type": "object",
            "additionalProperties": {
              "type": "string"
            },
            "properties": {
              "invalid_request": {
                "type": "string"
              },
              "unauthorized": {
                "type": "string"
              },
              "forbidden": {
                "type": "string"
              },
              "not_found": {
                "type": "string"
              },
              "conflict": {
                "type": "string"
              },
              "validation_failed": {
                "type": "string"
              },
              "rate_limited": {
                "type": "string"
              },
              "timeout": {
                "type": "string"
              },
              "upstream_unavailable": {
                "type": "string"
              },
              "internal_error": {
                "type": "string"
              }
            }
          },
          "error_code_catalog": {
            "type": "array",
            "description": "Granular error-code catalog with retryability and typical HTTP status.",
            "items": {
              "type": "object",
              "required": [
                "code",
                "retryable",
                "status"
              ],
              "properties": {
                "code": {
                  "type": "string",
                  "enum": [
                    "invalid_request",
                    "unauthorized",
                    "forbidden",
                    "not_found",
                    "conflict",
                    "validation_failed",
                    "rate_limited",
                    "timeout",
                    "upstream_unavailable",
                    "internal_error"
                  ]
                },
                "retryable": {
                  "type": "boolean"
                },
                "status": {
                  "type": "integer",
                  "enum": [
                    400,
                    401,
                    403,
                    404,
                    409,
                    422,
                    429,
                    500,
                    503,
                    504
                  ]
                }
              },
              "additionalProperties": false
            }
          },
          "retry_guidance": {
            "type": "string"
          },
          "docs": {
            "type": "string",
            "format": "uri"
          }
        },
        "additionalProperties": false
      }
    },
    "parameters": {
      "ApiVersionHeader": {
        "name": "Mana-API-Version",
        "in": "header",
        "required": false,
        "description": "Optional API version hint. Current public read version is 2026-05-26. The API is additive; breaking changes are announced before removal and may emit Deprecation and Sunset headers.",
        "schema": {
          "type": "string",
          "default": "2026-05-26"
        }
      },
      "IdempotencyKey": {
        "name": "Idempotency-Key",
        "in": "header",
        "required": false,
        "description": "Optional retry key for POST discovery requests. Mana public POST endpoints are read-only, but agents can send this key to correlate safe retries.",
        "schema": {
          "type": "string",
          "minLength": 8,
          "maxLength": 255
        }
      }
    }
  },
  "x-api-versioning-policy": {
    "currentVersion": "2026-05-26",
    "strategy": "stable-unversioned-with-new-paths-for-breaking-changes",
    "deprecationWindowDays": 90,
    "policy": "Mana uses path-based stable API versions where needed. Breaking changes are introduced on a new path, deprecated fields or endpoints emit Deprecation and Sunset headers for at least 90 days, and agents should watch these headers before caching operation behavior.",
    "headers": [
      "Deprecation",
      "Sunset"
    ]
  },
  "canonicalProductDescription": "Mana is your Personal Agent for iPhone. Describe what you want in plain language and Mana turns it into a real, runnable creation on your iPhone: apps, trackers, games, widgets, and shared experiences. Create, play, and remix."
}
