{"openapi":"3.1.0","info":{"title":"Geolyzer AIO API","version":"1.0.0","description":"Authenticated REST-API for Geolyzer AIO Brand-Knowledge. Use Bearer-Token authentication (kglz_...) and a project-token from the GeoProject.","contact":{"name":"Geolyzer Support","url":"https://geolyzer.io"},"license":{"name":"Commercial","url":"https://geolyzer.io/terms"}},"servers":[{"url":"https://app.geolyzer.io/api/v1","description":"Current environment"},{"url":"https://api.geolyzer.io/v1","description":"Geolyzer Edge (Phase 2)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"kglz_...","description":"API-Key generated in the AIO-Studio Admin (kglz_ prefix + 40 base62 chars)."}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string"},"reason":{"type":"string"},"message":{"type":"string"}},"required":["error"]},"Languages":{"type":"object","properties":{"primaryLanguage":{"type":"string","example":"de"},"alwaysEnglish":{"type":"boolean"},"additionalLanguages":{"type":"array","items":{"type":"string"}},"availableLanguages":{"type":"array","items":{"type":"string"}}}},"Brief":{"type":"object","properties":{"language":{"type":"string"},"markdown":{"type":"string"},"structured":{"type":"object"},"provenance":{"type":"object"},"modelVersion":{"type":"string"},"kgFactsHash":{"type":"string"},"approved":{"type":"boolean"},"approvedAt":{"type":"string","nullable":true},"briefStale":{"type":"boolean"},"generatedAt":{"type":"string"},"criticFindings":{"type":"array"}}},"Topic":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"factsCount":{"type":"integer"},"pluginUrl":{"type":"string"},"markdown":{"type":"string"}}},"ArtifactLanguageMeta":{"type":"object","properties":{"lang":{"type":"string"},"updatedAt":{"type":"string","format":"date-time"},"hash":{"type":"string"},"href":{"type":"string"}},"required":["lang","updatedAt","hash","href"]},"ArtifactMeta":{"type":"object","properties":{"type":{"type":"string","enum":["llms_txt","llms_full_txt","brief","jsonld","faqs"]},"name":{"type":"string"},"mediaType":{"type":"string"},"available":{"type":"boolean"},"availableLanguages":{"type":"array","items":{"type":"string"}},"languages":{"type":"array","items":{"$ref":"#/components/schemas/ArtifactLanguageMeta"}}}},"ArtifactsDiscovery":{"type":"object","properties":{"generator":{"type":"string","example":"geolyzer"},"project":{"type":"object","properties":{"name":{"type":"string"},"domain":{"type":"string","nullable":true},"primaryLanguage":{"type":"string"}}},"updatedAt":{"type":"string","format":"date-time"},"artifacts":{"type":"array","items":{"$ref":"#/components/schemas/ArtifactMeta"}}}}}},"paths":{"/embed.js":{"get":{"summary":"Get embeddable JSON-LD injector snippet","description":"Returns an embeddable JavaScript snippet that injects JSON-LD into the host page. Configure via data-token/data-key/data-mode/data-path/data-api-base attributes.","security":[],"responses":{"200":{"description":"Embeddable JavaScript snippet","content":{"text/javascript":{"schema":{"type":"string"}}}}}}},"/projects/{token}/languages":{"get":{"summary":"List languages for a project","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Language config","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Languages"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project not found"},"429":{"description":"Rate-limited"}}}},"/projects/{token}/brief":{"get":{"summary":"Get the approved Agent-Brief","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Approved brief","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Brief"}}}},"400":{"description":"Invalid language"},"401":{"description":"Unauthorized"},"404":{"description":"Project not found or no approved brief"},"429":{"description":"Rate-limited"}}}},"/projects/{token}/facts":{"get":{"summary":"Get active KG facts grouped by node path","description":"Requires scope `read:facts` (or `read:*`). Excludes admin-only `_custom` facts.","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Grouped facts payload","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object"},"factCount":{"type":"integer"},"nodes":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project not found"},"429":{"description":"Rate-limited"}}}},"/projects/{token}/jsonld":{"get":{"summary":"Get project JSON-LD graph as JSON object","description":"Requires scope `read:jsonld` (or `read:*`). Uses active, non-custom facts.","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"path","in":"query","required":false,"schema":{"type":"string"},"description":"Optional. Liefert WebPage-JSON-LD fuer eine einzelne Seite statt des Organisations-Graphen."}],"responses":{"200":{"description":"JSON-LD object","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project not found"},"422":{"description":"Industry schema missing"},"429":{"description":"Rate-limited"}}}},"/projects/{token}/personas":{"get":{"summary":"Get full personas with journey stages","description":"Requires scope `read:personas` (or `read:*`). Returns parsed JSON fields.","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Personas payload","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object"},"personaCount":{"type":"integer"},"personas":{"type":"array","items":{"type":"object"}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project not found"},"429":{"description":"Rate-limited"}}}},"/projects/{token}/topics":{"get":{"summary":"List topic-fragments with metadata","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string"}},{"name":"raw","in":"query","required":false,"schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"Topics array","content":{"application/json":{"schema":{"type":"object","properties":{"language":{"type":"string"},"topics":{"type":"array","items":{"$ref":"#/components/schemas/Topic"}},"count":{"type":"integer"}}}}}}}}},"/projects/{token}/codes":{"get":{"summary":"Full aggregator (brief + topics + plugin URLs)","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"lang","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Full aggregator response"},"400":{"description":"Invalid language"},"401":{"description":"Unauthorized"},"404":{"description":"Project not found"},"429":{"description":"Rate-limited"}}}},"/projects/{token}/artifacts":{"get":{"summary":"Discover available project artifacts (partner sync catalog)","description":"Requires scope `read:artifacts` (or `read:*`). Returns per-artifact language metadata with updatedAt/hash/href for incremental sync.","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Artifact discovery catalog","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ArtifactsDiscovery"}}}},"304":{"description":"Not modified (ETag)"},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Project not found"},"429":{"description":"Rate-limited"}}}},"/projects/{token}/artifacts/{type}":{"get":{"summary":"Fetch a single artifact payload by type","description":"Requires `read:artifacts` or the type-specific scope (`read:brief`, `read:jsonld`, `read:faqs`). Follow href from discovery; do not construct URLs manually.","security":[{"bearerAuth":[]}],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"type","in":"path","required":true,"schema":{"type":"string","enum":["llms_txt","llms_full_txt","brief","jsonld","faqs"]}},{"name":"lang","in":"query","required":false,"schema":{"type":"string"}},{"name":"tag","in":"query","required":false,"schema":{"type":"string"},"description":"FAQ tag filter (faqs only)"}],"responses":{"200":{"description":"Artifact payload (discriminated by type)"},"304":{"description":"Not modified (ETag)"},"400":{"description":"Invalid language"},"401":{"description":"Unauthorized"},"404":{"description":"Unknown type or not available"},"422":{"description":"Industry schema missing (jsonld)"},"429":{"description":"Rate-limited"}}}}}}