{"openapi":"3.1.0","info":{"title":"GIST AI Public API","version":"1.0.0","description":"Read-only score/fixes/citations, one write action (trigger-audit), and outbound webhook subscription management. See /developers for a quickstart. Auth: Bearer API key (Settings -> API Keys in the GIST portal)."},"servers":[{"url":"https://api.gistai.app","description":"Production"}],"tags":[{"name":"Sites","description":"Score reports, fixes, citations, and triggering new audits."},{"name":"Webhooks","description":"Subscribe to audit/fix/score events (see /developers for HMAC verification)."}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"GIST API key (Settings -> API Keys). Scoped as read or trigger — see backend/src/auth/apiKeyMiddleware.ts."}},"schemas":{},"parameters":{}},"paths":{"/api/v1/public/sites/{id}/score":{"get":{"operationId":"getSiteScore","tags":["Sites"],"summary":"Get the latest GIST Score report for a site","description":"Returns the report built from the site's most recently completed audit.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"GIST site id"},"required":true,"description":"GIST site id","name":"id","in":"path"}],"responses":{"200":{"description":"Latest completed audit's report","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"report":{"type":"object","properties":{"auditId":{"type":"string"},"siteUrl":{"type":"string"},"builderId":{"type":["string","null"]},"accessTiers":{"type":"array","items":{"type":"string"}},"gistScore":{"type":"number"},"band":{"type":"string"},"pillars":{"type":"array","items":{"type":"object","properties":{"pillar":{"type":"string","enum":["AI_CITABILITY","BRAND_AUTHORITY","CONTENT_EEAT","TECHNICAL_SEO","STRUCTURED_DATA","PLATFORM_COVERAGE"]},"score":{"type":"number"},"weight":{"type":"number"}},"required":["pillar","score","weight"]}},"actions":{"type":"array","items":{"type":"object","properties":{"checkId":{"type":"string"},"pillar":{"type":"string","enum":["AI_CITABILITY","BRAND_AUTHORITY","CONTENT_EEAT","TECHNICAL_SEO","STRUCTURED_DATA","PLATFORM_COVERAGE"]},"title":{"type":"string"},"score":{"type":"number"},"weight":{"type":"number"},"deliveryPath":{"type":"string"},"reachable":{"type":"boolean"},"suggestedUpgrade":{"type":"string"},"priority":{"type":"number"}},"required":["checkId","pillar","title","score","weight","deliveryPath","reachable","priority"]}},"deployableNow":{"type":"integer"},"upgradePaths":{"type":"integer"},"generatedAt":{"type":"string"}},"required":["auditId","siteUrl","builderId","accessTiers","gistScore","band","pillars","actions","deployableNow","upgradePaths","generatedAt"]}},"required":["report"]},"meta":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","pageSize","total","totalPages"]}},"required":["ok","data"]}}}},"401":{"description":"Missing/invalid/revoked API key","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"403":{"description":"Key lacks the required scope, or plan does not include API access","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/public/sites/{id}/fixes":{"get":{"operationId":"listSiteFixes","tags":["Sites"],"summary":"List fixes for a site's latest completed audit","description":"Paginated; returns an empty page if the site has no completed audit yet.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"GIST site id"},"required":true,"description":"GIST site id","name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"pageSize","in":"query"}],"responses":{"200":{"description":"Paginated fixes","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"fixes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"auditId":{"type":"string"},"siteId":{"type":"string"},"reportId":{"type":["string","null"]},"checkId":{"type":"string"},"fixType":{"type":"string","enum":["jsonld","llms_txt","robots_patch","meta_og","sitemap","content_rewrite","security_headers"]},"state":{"type":"string","enum":["proposed","approved","deployed","deployed_pending_client","verified","verified_js_only","regressed"]},"supportedTiers":{"type":"array","items":{"type":"string","enum":["T1","T2","T3","T4","T5","T6"]}},"idempotencyKey":{"type":"string"},"artifacts":{"type":"object","additionalProperties":{}},"params":{"type":"object","additionalProperties":{}},"deliveryPath":{"type":["string","null"]},"suggestedUpgrade":{"type":["string","null"]},"createdAt":{"type":"string"},"updatedAt":{"type":"string"},"appliedAt":{"type":["string","null"]},"verifiedAt":{"type":["string","null"]},"error":{"type":["string","null"]},"lastVerifyAt":{"type":["string","null"]}},"required":["id","tenantId","auditId","siteId","reportId","checkId","fixType","state","supportedTiers","idempotencyKey","artifacts","params","deliveryPath","suggestedUpgrade","createdAt","updatedAt","appliedAt","verifiedAt","error","lastVerifyAt"]}}},"required":["fixes"]},"meta":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","pageSize","total","totalPages"]}},"required":["ok","data"]}}}},"401":{"description":"Missing/invalid/revoked API key","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"403":{"description":"Key lacks the required scope, or plan does not include API access","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/public/sites/{id}/citations":{"get":{"operationId":"listSiteCitations","tags":["Sites"],"summary":"List AI-engine citations recorded for a site","description":"Paginated; optionally filtered by a from/to createdAt window.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"GIST site id"},"required":true,"description":"GIST site id","name":"id","in":"path"},{"schema":{"type":"integer","minimum":1,"default":1},"required":false,"name":"page","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"pageSize","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"from","in":"query"},{"schema":{"type":"string","format":"date-time"},"required":false,"name":"to","in":"query"}],"responses":{"200":{"description":"Paginated citations","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"citations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"tenantId":{"type":"string"},"sampleId":{"type":"string"},"domain":{"type":"string"},"url":{"type":["string","null"]},"mentionType":{"type":"string","enum":["cited","mentioned"]},"isClientDomain":{"type":"boolean"},"isSatelliteDomain":{"type":"boolean"},"isCompetitorDomain":{"type":"boolean"},"snippet":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","tenantId","sampleId","domain","url","mentionType","isClientDomain","isSatelliteDomain","isCompetitorDomain","snippet","createdAt"]}}},"required":["citations"]},"meta":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","pageSize","total","totalPages"]}},"required":["ok","data"]}}}},"401":{"description":"Missing/invalid/revoked API key","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"403":{"description":"Key lacks the required scope, or plan does not include API access","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/public/sites/{id}/audits":{"post":{"operationId":"triggerSiteAudit","tags":["Sites"],"summary":"Trigger a new audit for a site (idempotent)","description":"Requires an Idempotency-Key header. Retrying the same key returns the already-queued job (`deduplicated: true`) instead of enqueuing a second audit or consuming a second audit credit.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"GIST site id"},"required":true,"description":"GIST site id","name":"id","in":"path"},{"schema":{"type":"string","description":"Client-supplied idempotency key for this trigger-audit request"},"required":true,"description":"Client-supplied idempotency key for this trigger-audit request","name":"Idempotency-Key","in":"header"}],"responses":{"202":{"description":"Audit enqueued (or already-queued, if deduplicated)","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"jobId":{"type":"string"},"siteId":{"type":"string"},"deduplicated":{"type":"boolean"}},"required":["jobId","siteId","deduplicated"]},"meta":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","pageSize","total","totalPages"]}},"required":["ok","data"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing/invalid/revoked API key","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"403":{"description":"Key lacks the required scope, or plan does not include API access","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/public/webhooks":{"get":{"operationId":"listWebhookSubscriptions","tags":["Webhooks"],"summary":"List this tenant's webhook subscriptions","description":"Never includes the signing secret — that is only ever returned once, at creation.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Webhook subscriptions","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"webhooks":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string","enum":["audit_completed","fix_verified","score_changed"]}},"active":{"type":"boolean"},"consecutiveFailures":{"type":"integer"},"createdAt":{"type":"string"}},"required":["id","url","eventTypes","active","consecutiveFailures","createdAt"]}}},"required":["webhooks"]},"meta":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","pageSize","total","totalPages"]}},"required":["ok","data"]}}}},"401":{"description":"Missing/invalid/revoked API key","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"403":{"description":"Key lacks the required scope, or plan does not include API access","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}},"post":{"operationId":"createWebhookSubscription","tags":["Webhooks"],"summary":"Register a webhook subscription","description":"The returned `secret` is shown ONLY in this response — store it to verify the `X-GIST-Signature` header on every delivery (see docs/designs/wp-20.md §4).","security":[{"bearerAuth":[]}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2048,"format":"uri"},"eventTypes":{"type":"array","items":{"type":"string","enum":["audit_completed","fix_verified","score_changed"]},"minItems":1}},"required":["url","eventTypes"]}}}},"responses":{"201":{"description":"Subscription created","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"secret":{"type":"string"},"webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string","enum":["audit_completed","fix_verified","score_changed"]}},"active":{"type":"boolean"},"consecutiveFailures":{"type":"integer"},"createdAt":{"type":"string"}},"required":["id","url","eventTypes","active","consecutiveFailures","createdAt"]}},"required":["secret","webhook"]},"meta":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","pageSize","total","totalPages"]}},"required":["ok","data"]}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"401":{"description":"Missing/invalid/revoked API key","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"403":{"description":"Key lacks the required scope, or plan does not include API access","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/public/webhooks/{id}":{"delete":{"operationId":"deleteWebhookSubscription","tags":["Webhooks"],"summary":"Delete a webhook subscription","description":"Permanent — stops delivery immediately. There is no undo; register a new subscription instead.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Webhook subscription id"},"required":true,"description":"Webhook subscription id","name":"id","in":"path"}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"deleted":{"type":"boolean","enum":[true]}},"required":["deleted"]},"meta":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","pageSize","total","totalPages"]}},"required":["ok","data"]}}}},"401":{"description":"Missing/invalid/revoked API key","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"403":{"description":"Key lacks the required scope, or plan does not include API access","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}},"patch":{"operationId":"reactivateWebhookSubscription","tags":["Webhooks"],"summary":"Reactivate a webhook subscription auto-deactivated after repeated delivery failures","description":"Resets the consecutive-failure counter to 0 and sets active back to true.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string","description":"Webhook subscription id"},"required":true,"description":"Webhook subscription id","name":"id","in":"path"}],"responses":{"200":{"description":"Reactivated","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[true]},"data":{"type":"object","properties":{"webhook":{"type":"object","properties":{"id":{"type":"string"},"url":{"type":"string"},"eventTypes":{"type":"array","items":{"type":"string","enum":["audit_completed","fix_verified","score_changed"]}},"active":{"type":"boolean"},"consecutiveFailures":{"type":"integer"},"createdAt":{"type":"string"}},"required":["id","url","eventTypes","active","consecutiveFailures","createdAt"]}},"required":["webhook"]},"meta":{"type":"object","properties":{"page":{"type":"integer"},"pageSize":{"type":"integer"},"total":{"type":"integer"},"totalPages":{"type":"integer"}},"required":["page","pageSize","total","totalPages"]}},"required":["ok","data"]}}}},"401":{"description":"Missing/invalid/revoked API key","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"403":{"description":"Key lacks the required scope, or plan does not include API access","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}},"/api/v1/public/fixes/{id}/approve":{"post":{"operationId":"approveFix","tags":["Fixes"],"summary":"Approve a proposed fix","description":"Requires the tenant API deployment flag, recorded ToS acknowledgment, fixes:write scope, and Idempotency-Key.","security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"required":true,"name":"id","in":"path"},{"schema":{"type":"string","description":"Client-supplied idempotency key for this trigger-audit request"},"required":true,"description":"Client-supplied idempotency key for this trigger-audit request","name":"Idempotency-Key","in":"header"}],"responses":{"200":{"description":"Approved"},"400":{"description":"Rejected"},"401":{"description":"Missing/invalid/revoked API key","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"403":{"description":"Key lacks the required scope, or plan does not include API access","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"type":"object","properties":{"ok":{"type":"boolean","enum":[false]},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["message"]}},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["ok","error"]}}}}}}}},"webhooks":{}}