{"openapi":"3.1.0","info":{"title":"MicroSaaS Directory AI-First API","version":"2.0.0","description":"Machine-first API for searching verified indie micro-SaaS apps, managing maker listings, triggering weekly recrawls, and purchasing directory SKUs via MPP HTTP 402 / x402 or MCP.","contact":{"email":"info@microsaas.directory","url":"https://microsaas.directory/agents"}},"servers":[{"url":"https://microsaas.directory"}],"components":{"securitySchemes":{"mcpBearerKey":{"type":"http","scheme":"bearer","description":"Scoped Maker MCP API key (msd_*) created at /maker/growth"},"mcpOAuth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://microsaas.directory/oauth/authorize","tokenUrl":"https://microsaas.directory/oauth/token","scopes":{"listings:read":"listings:read","listings:write":"listings:write","recrawl:trigger":"recrawl:trigger","changelog:write":"changelog:write","commerce:checkout":"commerce:checkout"}}}}}},"paths":{"/api/saas":{"get":{"summary":"Search live indie micro-SaaS listings","operationId":"listSaas","parameters":[{"name":"search","in":"query","schema":{"type":"string"}},{"name":"category","in":"query","schema":{"type":"string"}},{"name":"limit","in":"query","schema":{"type":"integer","default":24}}],"responses":{"200":{"description":"Paginated list of live micro-SaaS products"}}}},"/api/search/ai":{"post":{"summary":"Semantic natural-language recommendation search","operationId":"searchSaasAi","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["query"],"properties":{"query":{"type":"string"}}}}}},"responses":{"200":{"description":"Ranked recommendations matching natural language intent"}}}},"/api/v1/machine/orders/validate":{"post":{"summary":"Dry-run validate and quote an MPP / x402 machine order","operationId":"validateMachineOrder","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sku","request_id"],"properties":{"sku":{"type":"string","enum":["instant_recrawl","beat_queue","badge_free_dofollow","radar_snapshot","pixel_wall_slot","agency_submit"]},"request_id":{"type":"string","minLength":8,"maxLength":128},"saas_slug":{"type":"string"},"saas_id":{"type":"string"},"slot_index":{"type":"integer","minimum":0,"maximum":99},"label":{"type":"string","maxLength":60},"buyer_email":{"type":"string","format":"email"}}}}}},"responses":{"200":{"description":"Validated quote with canonical request_hash and active payment rails"},"400":{"description":"Invalid input or missing required saas_slug"},"404":{"description":"Target SaaS not found"},"409":{"description":"Pixel wall slot already claimed"}}}},"/api/v1/machine/orders":{"post":{"summary":"Purchase and fulfill a one-time directory SKU via MPP HTTP 402 or x402","operationId":"createMachineOrder","x-payment-info":{"protocols":["mpp","x402"],"rails":["stripe_spt","tempo_usdc","x402_base_usdc"],"currency":"USD","skus":[{"id":"instant_recrawl","priceCents":200,"priceLabel":"$2 one-time (or 25 Indie Karma)","requiresSaas":true},{"id":"beat_queue","priceCents":900,"priceLabel":"$9 one-time (or 45 Indie Karma)","requiresSaas":true},{"id":"badge_free_dofollow","priceCents":2900,"priceLabel":"$29 one-time","requiresSaas":true},{"id":"radar_snapshot","priceCents":200,"priceLabel":"$2 one-time","requiresSaas":false},{"id":"pixel_wall_slot","priceCents":4900,"priceLabel":"$49 one-time","requiresSaas":true},{"id":"agency_submit","priceCents":1500,"priceLabel":"$15 one-time per listing","requiresSaas":true}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sku","request_id"],"properties":{"sku":{"type":"string","enum":["instant_recrawl","beat_queue","badge_free_dofollow","radar_snapshot","pixel_wall_slot","agency_submit"]},"request_id":{"type":"string","minLength":8,"maxLength":128},"saas_slug":{"type":"string"},"saas_id":{"type":"string"},"slot_index":{"type":"integer","minimum":0,"maximum":99},"label":{"type":"string","maxLength":60},"buyer_email":{"type":"string","format":"email"}}}}}},"responses":{"200":{"description":"Payment verified and SKU fulfilled idempotently"},"402":{"description":"Payment Required — returns WWW-Authenticate: Payment challenge, PAYMENT-REQUIRED header, and status_token"},"409":{"description":"Idempotency body-hash mismatch or duplicate payment credential replay"},"503":{"description":"Machine payment rails not configured"}}}},"/api/v1/machine/orders/{requestId}":{"get":{"summary":"Poll status and fulfillment payload for a machine order","operationId":"getMachineOrderStatus","parameters":[{"name":"requestId","in":"path","required":true,"schema":{"type":"string"}},{"name":"statusToken","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Machine order status and fulfillment payload"},"401":{"description":"Missing statusToken"},"403":{"description":"Invalid statusToken"},"404":{"description":"Order not found"}}}},"/api/maker/saas/{id}":{"get":{"summary":"Get owned listing details, crawled metadata suggestions, and edit audit trail","operationId":"getMakerSaas","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Owned SaaS record with audit log and recrawl cooldown"}}},"patch":{"summary":"Update owned listing metadata (allowlisted fields + audit trail)","operationId":"updateMakerSaas","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Updated SaaS listing and auditLogId"}}}},"/api/maker/saas/{id}/recrawl":{"post":{"summary":"Trigger free weekly recrawl (1× per 7 days per listing)","operationId":"triggerMakerRecrawl","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Recrawl queued and Temporal workflow dispatched"},"429":{"description":"Weekly cooldown active (returns Karma & MPP bypass options)"}}}},"/mcp":{"post":{"summary":"Streamable HTTP MCP JSON-RPC 2.0 Server (11 tools)","operationId":"mcpJsonRpc","security":[{},{"mcpBearerKey":[]},{"mcpOAuth2":["listings:read","listings:write","recrawl:trigger","changelog:write","commerce:checkout"]}],"responses":{"200":{"description":"JSON-RPC 2.0 MCP tool result"}}}}}}