{
  "openapi": "3.0.3",
  "info": {
    "title": "SaaSCity Public & Maker API",
    "version": "1.0.0",
    "description": "OpenAPI 3.0.3 specification for SaaSCity (https://saascity.io), a launch directory for SaaS and AI products on a live city map where every listing is reviewed by a person. Covers keyless public discovery endpoints (/ask NLWeb search and /api/mcp Model Context Protocol JSON-RPC) as well as authenticated Maker API v1 endpoints (/api/maker/v1/*) for reading your account, listings, and anonymous upvotes, searching live products, editing listings, and starting claimable launch drafts. Create a Maker API key (scm_live_...) at https://saascity.io/dashboard/settings/api.",
    "termsOfService": "https://saascity.io/terms",
    "contact": {
      "name": "SaaSCity Support",
      "email": "support@saascity.io",
      "url": "https://saascity.io/about"
    },
    "license": {
      "name": "SaaSCity Terms of Service",
      "url": "https://saascity.io/terms"
    },
    "x-logo": {
      "url": "https://saascity.io/apple-touch-icon.png"
    }
  },
  "externalDocs": {
    "description": "SaaSCity Integrations & API Documentation",
    "url": "https://saascity.io/integrations/pipedream"
  },
  "servers": [
    {
      "url": "https://saascity.io",
      "description": "SaaSCity Production Server"
    }
  ],
  "tags": [
    {
      "name": "nlweb",
      "description": "Keyless natural-language search over live SaaSCity listings (Microsoft NLWeb /ask)."
    },
    {
      "name": "mcp",
      "description": "Keyless Model Context Protocol (MCP) JSON-RPC 2.0 server at /api/mcp."
    },
    {
      "name": "maker-account",
      "description": "Authenticated Maker API account verification."
    },
    {
      "name": "maker-listings",
      "description": "Read and update your own SaaSCity listings."
    },
    {
      "name": "maker-upvotes",
      "description": "Poll recent anonymous upvotes on your listings."
    },
    {
      "name": "maker-directory",
      "description": "Search live SaaS and AI listings in the SaaSCity directory."
    },
    {
      "name": "maker-drafts",
      "description": "Create claimable listing drafts (human claim, plan selection, and review required)."
    }
  ],
  "paths": {
    "/ask": {
      "get": {
        "operationId": "nlwebAsk",
        "tags": ["nlweb"],
        "summary": "Natural-language search over live listings (NLWeb GET)",
        "description": "Searches live SaaSCity listings using a natural-language query. Keyless public endpoint. Set streaming=true for Server-Sent Events (start, result, complete).",
        "security": [],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": true,
            "description": "Natural-language search query or product/domain name.",
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            }
          },
          {
            "name": "site",
            "in": "query",
            "required": false,
            "description": "Target site scope (defaults to saascity.io).",
            "schema": {
              "type": "string",
              "default": "saascity.io"
            }
          },
          {
            "name": "streaming",
            "in": "query",
            "required": false,
            "description": "When true, streams Server-Sent Events instead of a single JSON payload.",
            "schema": {
              "type": "boolean",
              "default": false
            }
          },
          {
            "name": "mode",
            "in": "query",
            "required": false,
            "description": "NLWeb response mode.",
            "schema": {
              "type": "string",
              "enum": ["list"],
              "default": "list"
            }
          },
          {
            "name": "query_id",
            "in": "query",
            "required": false,
            "description": "Optional client correlation ID echoed in the response.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Matching live SaaSCity listings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NlwebResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/PublicBadRequest"
          },
          "429": {
            "$ref": "#/components/responses/PublicRateLimited"
          }
        }
      },
      "post": {
        "operationId": "nlwebAskPost",
        "tags": ["nlweb"],
        "summary": "Natural-language search over live listings (NLWeb POST)",
        "description": "POST variant of Microsoft NLWeb /ask accepting a JSON body. Keyless public endpoint.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NlwebRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Matching live SaaSCity listings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NlwebResponse"
                }
              },
              "text/event-stream": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/PublicBadRequest"
          },
          "429": {
            "$ref": "#/components/responses/PublicRateLimited"
          }
        }
      }
    },
    "/api/mcp": {
      "get": {
        "operationId": "describeMcpServer",
        "tags": ["mcp"],
        "summary": "Describe the SaaSCity MCP server",
        "description": "Browser and client discovery endpoint for the keyless SaaSCity Model Context Protocol server.",
        "security": [],
        "responses": {
          "200": {
            "description": "MCP server metadata pointer.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "name": { "type": "string" },
                    "transport": { "type": "string" },
                    "endpoint": { "type": "string", "format": "uri" },
                    "docs": { "type": "string", "format": "uri" }
                  }
                }
              }
            }
          },
          "303": {
            "description": "Redirect to human-readable MCP setup documentation at https://saascity.io/mcp."
          }
        }
      },
      "post": {
        "operationId": "callMcp",
        "tags": ["mcp"],
        "summary": "Invoke the SaaSCity MCP JSON-RPC 2.0 server",
        "description": "Stateless streamable-HTTP Model Context Protocol endpoint. Supports methods initialize, ping, server/discover, tools/list, tools/call, prompts/list, and prompts/get. Keyless public endpoint.",
        "security": [],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/JsonRpcRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "JSON-RPC 2.0 result or error object.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JsonRpcResponse"
                }
              }
            }
          },
          "202": {
            "description": "JSON-RPC notification accepted."
          }
        }
      }
    },
    "/api/maker/v1/me": {
      "get": {
        "operationId": "getMe",
        "tags": ["maker-account"],
        "summary": "Get the authenticated Maker account",
        "description": "Returns the account that owns the Maker API key (id, username, profile URL, and total listing count). Used as the connection test in automation platforms.",
        "security": [{ "ApiKeyAuth": [] }, { "BearerAuth": [] }],
        "responses": {
          "200": {
            "description": "Authenticated maker profile summary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MakerAccount"
                }
              }
            }
          },
          "401": { "$ref": "#/components/responses/MakerUnauthorized" },
          "429": { "$ref": "#/components/responses/MakerRateLimited" },
          "503": { "$ref": "#/components/responses/MakerServiceUnavailable" }
        }
      }
    },
    "/api/maker/v1/listings": {
      "get": {
        "operationId": "listMyListings",
        "tags": ["maker-listings"],
        "summary": "List your SaaSCity listings",
        "description": "Returns your listings ordered newest first, with optional state, go-live window (live_after / live_before), creation window (created_after / created_before), and limit/offset pagination.",
        "security": [{ "ApiKeyAuth": [] }, { "BearerAuth": [] }],
        "parameters": [
          {
            "name": "state",
            "in": "query",
            "required": false,
            "description": "Filter by derived listing lifecycle state.",
            "schema": {
              "type": "string",
              "enum": ["awaiting_payment", "in_review", "scheduled", "live", "rejected", "archived"]
            }
          },
          { "$ref": "#/components/parameters/LiveAfter" },
          { "$ref": "#/components/parameters/LiveBefore" },
          { "$ref": "#/components/parameters/CreatedAfter" },
          { "$ref": "#/components/parameters/CreatedBefore" },
          { "$ref": "#/components/parameters/Limit" },
          { "$ref": "#/components/parameters/Offset" }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of the caller's listings.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MakerListingListResponse"
                }
              }
            }
          },
          "400": { "$ref": "#/components/responses/MakerBadRequest" },
          "401": { "$ref": "#/components/responses/MakerUnauthorized" },
          "429": { "$ref": "#/components/responses/MakerRateLimited" },
          "503": { "$ref": "#/components/responses/MakerServiceUnavailable" }
        }
      }
    },
    "/api/maker/v1/listings/{id}": {
      "get": {
        "operationId": "getMyListing",
        "tags": ["maker-listings"],
        "summary": "Get one of your listings by ID or slug",
        "description": "Fetches a single listing owned by the authenticated maker using its UUID or URL slug.",
        "security": [{ "ApiKeyAuth": [] }, { "BearerAuth": [] }],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Listing UUID or slug.",
            "schema": { "type": "string" }
          }
        ],
        "responses": {
          "200": {
            "description": "Listing details.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Listing" }
              }
            }
          },
          "401": { "$ref": "#/components/responses/MakerUnauthorized" },
          "404": { "$ref": "#/components/responses/MakerNotFound" },
          "429": { "$ref": "#/components/responses/MakerRateLimited" },
          "503": { "$ref": "#/components/responses/MakerServiceUnavailable" }
        }
      },
      "patch": {
        "operationId": "updateMyListing",
        "tags": ["maker-listings"],
        "summary": "Update one of your listings",
        "description": "Updates editable fields of one of your listings. Sending null clears twitter_url, github_url, or pricing_model. Every edit places the listing back into human review (state in_review) before changes appear publicly. Rejected listings return 409 NOT_EDITABLE.",
        "security": [{ "ApiKeyAuth": [] }, { "BearerAuth": [] }],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "Listing UUID or slug.",
            "schema": { "type": "string" }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/ListingPatchRequest" }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated listing (placed in review).",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/Listing" }
              }
            }
          },
          "400": { "$ref": "#/components/responses/MakerBadRequest" },
          "401": { "$ref": "#/components/responses/MakerUnauthorized" },
          "404": { "$ref": "#/components/responses/MakerNotFound" },
          "409": { "$ref": "#/components/responses/MakerConflict" },
          "413": { "$ref": "#/components/responses/MakerPayloadTooLarge" },
          "422": { "$ref": "#/components/responses/MakerUnprocessable" },
          "429": { "$ref": "#/components/responses/MakerRateLimited" },
          "503": { "$ref": "#/components/responses/MakerServiceUnavailable" }
        }
      }
    },
    "/api/maker/v1/upvotes": {
      "get": {
        "operationId": "listMyUpvotes",
        "tags": ["maker-upvotes"],
        "summary": "List recent upvotes on your listings",
        "description": "Returns anonymous upvotes across your listings, newest first. Voter identity is never exposed; each item has a stable HMAC id for deduplication in polling triggers. Your own votes are excluded.",
        "security": [{ "ApiKeyAuth": [] }, { "BearerAuth": [] }],
        "parameters": [
          { "$ref": "#/components/parameters/CreatedAfter" },
          { "$ref": "#/components/parameters/CreatedBefore" },
          { "$ref": "#/components/parameters/Limit" },
          { "$ref": "#/components/parameters/Offset" }
        ],
        "responses": {
          "200": {
            "description": "Paginated list of upvotes.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/MakerUpvoteListResponse" }
              }
            }
          },
          "400": { "$ref": "#/components/responses/MakerBadRequest" },
          "401": { "$ref": "#/components/responses/MakerUnauthorized" },
          "429": { "$ref": "#/components/responses/MakerRateLimited" },
          "503": { "$ref": "#/components/responses/MakerServiceUnavailable" }
        }
      }
    },
    "/api/maker/v1/search": {
      "get": {
        "operationId": "searchListings",
        "tags": ["maker-directory"],
        "summary": "Search live listings in the SaaSCity directory",
        "description": "Searches live SaaS and AI listings by keyword, category, sort order, and optional go-live or creation date windows.",
        "security": [{ "ApiKeyAuth": [] }, { "BearerAuth": [] }],
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "required": false,
            "description": "Keyword matched against listing title and tagline.",
            "schema": { "type": "string", "maxLength": 100 }
          },
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "Filter by SaaSCity category ID.",
            "schema": { "$ref": "#/components/schemas/CategoryId" }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort order for directory search results.",
            "schema": {
              "type": "string",
              "enum": ["newest", "points"],
              "default": "newest"
            }
          },
          { "$ref": "#/components/parameters/LiveAfter" },
          { "$ref": "#/components/parameters/LiveBefore" },
          { "$ref": "#/components/parameters/CreatedAfter" },
          { "$ref": "#/components/parameters/CreatedBefore" },
          { "$ref": "#/components/parameters/Limit" },
          { "$ref": "#/components/parameters/Offset" }
        ],
        "responses": {
          "200": {
            "description": "Paginated directory search results.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/DirectorySearchResponse" }
              }
            }
          },
          "400": { "$ref": "#/components/responses/MakerBadRequest" },
          "401": { "$ref": "#/components/responses/MakerUnauthorized" },
          "429": { "$ref": "#/components/responses/MakerRateLimited" },
          "503": { "$ref": "#/components/responses/MakerServiceUnavailable" }
        }
      }
    },
    "/api/maker/v1/drafts": {
      "post": {
        "operationId": "createDraft",
        "tags": ["maker-drafts"],
        "summary": "Create a claimable launch draft",
        "description": "Creates an inert launch draft and returns a claim_url valid for 7 days. Nothing is published, scheduled, or charged until a person opens the claim URL, signs in, picks a plan, and submits for human review. Limited to 10 drafts per UTC day per account.",
        "security": [{ "ApiKeyAuth": [] }, { "BearerAuth": [] }],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": { "$ref": "#/components/schemas/CreateDraftRequest" }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Draft created.",
            "content": {
              "application/json": {
                "schema": { "$ref": "#/components/schemas/CreateDraftResponse" }
              }
            }
          },
          "400": { "$ref": "#/components/responses/MakerBadRequest" },
          "401": { "$ref": "#/components/responses/MakerUnauthorized" },
          "409": { "$ref": "#/components/responses/MakerConflict" },
          "413": { "$ref": "#/components/responses/MakerPayloadTooLarge" },
          "422": { "$ref": "#/components/responses/MakerUnprocessable" },
          "429": { "$ref": "#/components/responses/MakerRateLimited" },
          "503": { "$ref": "#/components/responses/MakerServiceUnavailable" }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "Maker API key starting with scm_live_ (created at https://saascity.io/dashboard/settings/api)."
      },
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Authorization: Bearer scm_live_..."
      }
    },
    "parameters": {
      "Limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "Page size (1 to 100, default 25).",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 25
        }
      },
      "Offset": {
        "name": "offset",
        "in": "query",
        "required": false,
        "description": "Items to skip (0 to 10000). Pass next_offset from the previous page.",
        "schema": {
          "type": "integer",
          "minimum": 0,
          "maximum": 10000,
          "default": 0
        }
      },
      "CreatedAfter": {
        "name": "created_after",
        "in": "query",
        "required": false,
        "description": "Only items created at or after this timestamp (inclusive). Accepts ISO 8601 UTC or Unix seconds/ms.",
        "schema": { "type": "string", "format": "date-time" }
      },
      "CreatedBefore": {
        "name": "created_before",
        "in": "query",
        "required": false,
        "description": "Only items created at or before this timestamp (inclusive). Accepts ISO 8601 UTC or Unix seconds/ms.",
        "schema": { "type": "string", "format": "date-time" }
      },
      "LiveAfter": {
        "name": "live_after",
        "in": "query",
        "required": false,
        "description": "Only listings that went live at or after this timestamp (inclusive, matched against live_at).",
        "schema": { "type": "string", "format": "date-time" }
      },
      "LiveBefore": {
        "name": "live_before",
        "in": "query",
        "required": false,
        "description": "Only listings that went live at or before this timestamp (inclusive, matched against live_at).",
        "schema": { "type": "string", "format": "date-time" }
      }
    },
    "schemas": {
      "CategoryId": {
        "type": "string",
        "enum": [
          "ai",
          "saas",
          "productivity",
          "devtools",
          "design",
          "marketing",
          "fintech",
          "health",
          "mobile",
          "games",
          "web3",
          "molt",
          "directories",
          "other"
        ],
        "description": "SaaSCity directory category identifier."
      },
      "PublicError": {
        "type": "object",
        "required": ["error"],
        "properties": {
          "error": {
            "type": "string",
            "description": "Human-readable error reason."
          }
        }
      },
      "MakerError": {
        "type": "object",
        "required": ["error"],
        "properties": {
          "error": {
            "type": "object",
            "required": ["code", "message"],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "INVALID_KEY",
                  "VALIDATION_FAILED",
                  "DUPLICATE_DOMAIN",
                  "FREE_HOSTING_DOMAIN",
                  "DOMAIN_BLOCKED",
                  "DAILY_LIMIT_REACHED",
                  "NOT_FOUND",
                  "NOT_EDITABLE",
                  "BANNED_CONTENT",
                  "PAYLOAD_TOO_LARGE",
                  "RATE_LIMITED",
                  "SERVER_ERROR"
                ]
              },
              "message": { "type": "string" },
              "details": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "field": { "type": "string" },
                    "message": { "type": "string" }
                  }
                }
              }
            }
          }
        }
      },
      "NlwebRequest": {
        "type": "object",
        "required": ["query"],
        "properties": {
          "query": { "type": "string", "minLength": 1, "maxLength": 200 },
          "site": { "type": "string" },
          "streaming": { "type": "boolean" },
          "prefer": {
            "type": "object",
            "properties": {
              "streaming": { "type": "boolean" }
            }
          },
          "query_id": { "type": "string" }
        }
      },
      "NlwebResult": {
        "type": "object",
        "properties": {
          "url": { "type": "string", "format": "uri" },
          "name": { "type": "string" },
          "site": { "type": "string" },
          "score": { "type": "number" },
          "description": { "type": "string" },
          "schema_object": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "NlwebResponse": {
        "type": "object",
        "properties": {
          "query_id": { "type": "string" },
          "results": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/NlwebResult" }
          },
          "_meta": {
            "type": "object",
            "properties": {
              "response_type": { "type": "string" },
              "version": { "type": "string" },
              "query": { "type": "string" },
              "site": { "type": "string" }
            }
          }
        }
      },
      "JsonRpcRequest": {
        "type": "object",
        "required": ["jsonrpc", "method"],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": ["2.0"]
          },
          "id": {
            "nullable": true,
            "oneOf": [
              { "type": "string" },
              { "type": "integer" }
            ]
          },
          "method": {
            "type": "string",
            "enum": ["server/discover", "initialize", "ping", "tools/list", "tools/call", "prompts/list", "prompts/get"]
          },
          "params": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "JsonRpcResponse": {
        "type": "object",
        "required": ["jsonrpc", "id"],
        "properties": {
          "jsonrpc": {
            "type": "string",
            "enum": ["2.0"]
          },
          "id": {
            "nullable": true,
            "oneOf": [
              { "type": "string" },
              { "type": "integer" }
            ]
          },
          "result": {
            "type": "object",
            "additionalProperties": true
          },
          "error": {
            "type": "object",
            "properties": {
              "code": { "type": "integer" },
              "message": { "type": "string" }
            }
          }
        }
      },
      "MakerAccount": {
        "type": "object",
        "required": ["id", "username", "profile_url", "listings"],
        "properties": {
          "id": { "type": "string", "format": "uuid" },
          "username": { "type": "string" },
          "profile_url": { "type": "string", "format": "uri" },
          "listings": { "type": "integer", "minimum": 0 }
        }
      },
      "Listing": {
        "type": "object",
        "required": ["id", "slug", "title", "state", "url"],
        "properties": {
          "id": { "type": "string", "format": "uuid" },
          "slug": { "type": "string" },
          "title": { "type": "string" },
          "tagline": { "type": "string" },
          "description": { "type": "string" },
          "category": { "$ref": "#/components/schemas/CategoryId" },
          "molt_subcategory": {
            "type": "string",
            "nullable": true,
            "description": "Subcategory ID when category is molt (social_forum, aggregator_reader, token_launchpad_crypto, developer_tools_integration, gaming_competition, visualization_world, marketplace_economy, messaging_private_comm); null otherwise."
          },
          "tags": {
            "type": "array",
            "items": { "type": "string" }
          },
          "pricing_model": {
            "type": "string",
            "nullable": true,
            "description": "Pricing model when set (free, freemium, paid, free_trial); null when unset."
          },
          "website_url": { "type": "string", "nullable": true },
          "twitter_url": { "type": "string", "nullable": true },
          "github_url": { "type": "string", "nullable": true },
          "logo_url": { "type": "string", "nullable": true },
          "state": {
            "type": "string",
            "enum": ["awaiting_payment", "in_review", "scheduled", "live", "rejected", "archived"],
            "description": "Derived listing lifecycle state."
          },
          "status": {
            "type": "string",
            "enum": ["pending", "active", "rejected", "archived"],
            "description": "Underlying moderation status."
          },
          "backlink_type": {
            "type": "string",
            "enum": ["dofollow", "nofollow"]
          },
          "launch_week": {
            "type": "string",
            "format": "date",
            "nullable": true,
            "description": "Monday (UTC) of the assigned launch week."
          },
          "points": { "type": "integer" },
          "upvotes": { "type": "integer" },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Public listing URL on saascity.io (returns 404 until state is live)."
          },
          "live_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "description": "Timestamp when the listing became visible on saascity.io (later of approval and launch week Monday)."
          },
          "created_at": { "type": "string", "format": "date-time" },
          "updated_at": { "type": "string", "format": "date-time" }
        }
      },
      "MakerListingListResponse": {
        "type": "object",
        "required": ["listings", "has_more", "next_offset"],
        "properties": {
          "listings": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/Listing" }
          },
          "has_more": { "type": "boolean" },
          "next_offset": { "type": "integer", "nullable": true }
        }
      },
      "ListingPatchRequest": {
        "type": "object",
        "minProperties": 1,
        "additionalProperties": false,
        "properties": {
          "title": { "type": "string", "minLength": 3, "maxLength": 60 },
          "tagline": { "type": "string", "minLength": 10, "maxLength": 100 },
          "description": { "type": "string", "minLength": 50, "maxLength": 5000 },
          "category": { "$ref": "#/components/schemas/CategoryId" },
          "molt_subcategory": {
            "type": "string",
            "nullable": true,
            "description": "Required when category is molt; null or omitted otherwise."
          },
          "website_url": { "type": "string", "maxLength": 500 },
          "twitter_url": { "type": "string", "nullable": true, "maxLength": 500 },
          "github_url": { "type": "string", "nullable": true, "maxLength": 500 },
          "tags": {
            "type": "array",
            "maxItems": 10,
            "items": { "type": "string", "maxLength": 30 }
          },
          "pricing_model": {
            "type": "string",
            "nullable": true,
            "description": "One of free, freemium, paid, free_trial, or null to clear."
          }
        }
      },
      "UpvoteItem": {
        "type": "object",
        "required": ["id", "listing_id", "listing_slug", "listing_title", "listing_url", "created_at"],
        "properties": {
          "id": { "type": "string", "description": "Opaque anonymous HMAC vote ID for deduplication." },
          "listing_id": { "type": "string", "format": "uuid" },
          "listing_slug": { "type": "string" },
          "listing_title": { "type": "string" },
          "listing_url": { "type": "string", "format": "uri" },
          "created_at": { "type": "string", "format": "date-time" }
        }
      },
      "MakerUpvoteListResponse": {
        "type": "object",
        "required": ["upvotes", "has_more", "next_offset"],
        "properties": {
          "upvotes": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/UpvoteItem" }
          },
          "has_more": { "type": "boolean" },
          "next_offset": { "type": "integer", "nullable": true }
        }
      },
      "DirectoryListingItem": {
        "type": "object",
        "required": ["id", "slug", "title", "category", "points", "url"],
        "properties": {
          "id": { "type": "string", "format": "uuid" },
          "slug": { "type": "string" },
          "title": { "type": "string" },
          "tagline": { "type": "string" },
          "category": { "$ref": "#/components/schemas/CategoryId" },
          "website_url": { "type": "string", "nullable": true },
          "points": { "type": "integer" },
          "url": { "type": "string", "format": "uri" },
          "live_at": { "type": "string", "format": "date-time", "nullable": true },
          "created_at": { "type": "string", "format": "date-time" }
        }
      },
      "DirectorySearchResponse": {
        "type": "object",
        "required": ["listings", "has_more", "next_offset"],
        "properties": {
          "listings": {
            "type": "array",
            "items": { "$ref": "#/components/schemas/DirectoryListingItem" }
          },
          "has_more": { "type": "boolean" },
          "next_offset": { "type": "integer", "nullable": true }
        }
      },
      "CreateDraftRequest": {
        "type": "object",
        "required": ["title", "tagline", "category", "description", "website_url"],
        "properties": {
          "title": { "type": "string", "minLength": 3, "maxLength": 60 },
          "tagline": { "type": "string", "minLength": 10, "maxLength": 100 },
          "category": { "$ref": "#/components/schemas/CategoryId" },
          "description": { "type": "string", "minLength": 50, "maxLength": 5000 },
          "website_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 500,
            "description": "Product URL on its own domain (https; free subdomain hosts are refused)."
          },
          "twitter_url": { "type": "string", "maxLength": 200 },
          "github_url": { "type": "string", "maxLength": 200 },
          "tags": {
            "type": "array",
            "maxItems": 10,
            "items": { "type": "string", "maxLength": 40 }
          }
        }
      },
      "CreateDraftResponse": {
        "type": "object",
        "required": ["id", "claim_url", "expires_at"],
        "properties": {
          "id": { "type": "string", "format": "uuid" },
          "claim_url": { "type": "string", "format": "uri" },
          "expires_at": { "type": "string", "format": "date-time" },
          "next_step": { "type": "string" }
        }
      }
    },
    "responses": {
      "PublicBadRequest": {
        "description": "Malformed query or request body.",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/PublicError" }
          }
        }
      },
      "PublicRateLimited": {
        "description": "Rate limit exceeded. Retry after the seconds in Retry-After.",
        "headers": {
          "Retry-After": {
            "schema": { "type": "integer" }
          }
        },
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/PublicError" }
          }
        }
      },
      "MakerBadRequest": {
        "description": "Validation failed (VALIDATION_FAILED or BANNED_CONTENT).",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/MakerError" }
          }
        }
      },
      "MakerUnauthorized": {
        "description": "Missing, malformed, unknown, or revoked Maker API key (INVALID_KEY).",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/MakerError" }
          }
        }
      },
      "MakerNotFound": {
        "description": "Listing does not exist or belongs to another account (NOT_FOUND).",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/MakerError" }
          }
        }
      },
      "MakerConflict": {
        "description": "Domain already listed (DUPLICATE_DOMAIN) or listing is rejected (NOT_EDITABLE).",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/MakerError" }
          }
        }
      },
      "MakerPayloadTooLarge": {
        "description": "Request body exceeds 32 KB (PAYLOAD_TOO_LARGE).",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/MakerError" }
          }
        }
      },
      "MakerUnprocessable": {
        "description": "Free subdomain hosting domain refused (FREE_HOSTING_DOMAIN).",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/MakerError" }
          }
        }
      },
      "MakerRateLimited": {
        "description": "Over 60 requests/minute per key (RATE_LIMITED) or over 10 drafts/day per account (DAILY_LIMIT_REACHED).",
        "headers": {
          "Retry-After": {
            "schema": { "type": "integer" }
          }
        },
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/MakerError" }
          }
        }
      },
      "MakerServiceUnavailable": {
        "description": "Temporary backend failure (SERVER_ERROR).",
        "content": {
          "application/json": {
            "schema": { "$ref": "#/components/schemas/MakerError" }
          }
        }
      }
    }
  }
}
