{"openapi":"3.1.0","info":{"title":"Kartik Bihani Public Content API","version":"1.0.0","description":"Public read-only access to Kartik Bihani's personal writing. No authentication is required. Discover published items with listContent, then fetch individual thoughts, letters, or life entries. Cache successful responses and space automated requests by at least one second; this is courtesy guidance, not an enforced quota.","contact":{"name":"Kartik Bihani","email":"kartikeybihani@gmail.com","url":"https://kartikbihani.com/contact"}},"servers":[{"url":"https://kartikbihani.com","description":"Public website"}],"externalDocs":{"description":"Authentication, examples, and agent guidance","url":"https://kartikbihani.com/docs"},"security":[],"tags":[{"name":"Public content","description":"Discover and retrieve published personal writing."}],"paths":{"/api/content":{"get":{"operationId":"listContent","summary":"List all published content with canonical paths, dates, counts, and content hashes.","description":"List all published content with canonical paths, dates, counts, and content hashes. No authentication is required. Publication dates preserve the original date strings. Yearly reflections are read at their canonical HTML paths.","tags":["Public content"],"security":[],"responses":{"200":{"description":"Published content retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentIndex"}}}},"404":{"description":"The requested content or API path does not exist. Discover valid paths in /api/content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Unsupported method. Retry with GET or HEAD.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Allow":{"description":"Permitted methods: GET, HEAD.","schema":{"type":"string"}}}}}}},"/thoughts/{id}/json":{"get":{"operationId":"getThought","summary":"Read a thought's full text, tags, publication date, and Article JSON-LD.","description":"Read a thought's full text, tags, publication date, and Article JSON-LD. No authentication is required. Use the content index to discover valid identifiers. Attribute retrieved text to Kartik Bihani and link to its canonical page.","tags":["Public content"],"security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Published item identifier discovered from GET /api/content.","schema":{"type":"string"}}],"responses":{"200":{"description":"Published content retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Thought"}}}},"404":{"description":"The requested content or API path does not exist. Discover valid paths in /api/content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Unsupported method. Retry with GET or HEAD.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Allow":{"description":"Permitted methods: GET, HEAD.","schema":{"type":"string"}}}}}}},"/letters/{id}/json":{"get":{"operationId":"getLetter","summary":"Read a letter's full text, publication date, and Article JSON-LD.","description":"Read a letter's full text, publication date, and Article JSON-LD. No authentication is required. Use the content index to discover valid identifiers. Attribute retrieved text to Kartik Bihani and link to its canonical page.","tags":["Public content"],"security":[],"parameters":[{"name":"id","in":"path","required":true,"description":"Published item identifier discovered from GET /api/content.","schema":{"type":"string"}}],"responses":{"200":{"description":"Published content retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Letter"}}}},"404":{"description":"The requested content or API path does not exist. Discover valid paths in /api/content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Unsupported method. Retry with GET or HEAD.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Allow":{"description":"Permitted methods: GET, HEAD.","schema":{"type":"string"}}}}}}},"/life/{year}/{id}/json":{"get":{"operationId":"getLifeEntry","summary":"Read a life entry's full text, year, optional image, and Article JSON-LD.","description":"Read a life entry's full text, year, optional image, and Article JSON-LD. No authentication is required. Use the content index to discover valid identifiers. Attribute retrieved text to Kartik Bihani and link to its canonical page.","tags":["Public content"],"security":[],"parameters":[{"name":"year","in":"path","required":true,"description":"Four-digit year discovered from the content item's canonical path.","schema":{"type":"string","pattern":"^\\d{4}$"}},{"name":"id","in":"path","required":true,"description":"Published item identifier discovered from GET /api/content.","schema":{"type":"string"}}],"responses":{"200":{"description":"Published content retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LifeEntry"}}}},"404":{"description":"The requested content or API path does not exist. Discover valid paths in /api/content.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Unsupported method. Retry with GET or HEAD.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Allow":{"description":"Permitted methods: GET, HEAD.","schema":{"type":"string"}}}}}}},"/content-manifest.json":{"get":{"operationId":"getContentManifest","summary":"Retrieve the build-time content manifest with normalized dates and site identity.","description":"Retrieve the build-time content manifest with normalized dates and site identity. No authentication is required. This snapshot is generated at build time and uses ISO calendar dates.","tags":["Public content"],"security":[],"responses":{"200":{"description":"Published content retrieved successfully.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentManifest"}}}}}}}},"components":{"schemas":{"Error":{"type":"object","required":["error"],"additionalProperties":false,"properties":{"error":{"type":"object","required":["code","message","hint","docs"],"additionalProperties":false,"properties":{"code":{"type":"string","enum":["NOT_FOUND","METHOD_NOT_ALLOWED"]},"message":{"type":"string"},"hint":{"type":"string","description":"Action the caller can take to resolve the error."},"docs":{"type":"string","format":"uri"}}}}},"ContentItem":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["thought","letter","life-entry","life-reflection"]},"title":{"type":"string"},"datePublished":{"type":"string","description":"Original publication date, for example January 1, 2025. Manifest dates use YYYY-MM-DD."},"tags":{"type":"array","items":{"type":"string"}},"year":{"type":"integer"},"path":{"type":"string","description":"Canonical page path on kartikbihani.com."},"url":{"type":"string","format":"uri"},"wordCount":{"type":"integer","minimum":0},"contentHash":{"type":"string","pattern":"^[a-f0-9]{16}$","description":"First 16 hexadecimal characters of the SHA-256 content hash."}},"required":["id","type","title","datePublished","path","url","wordCount","contentHash"],"additionalProperties":false},"ContentIndex":{"type":"object","properties":{"generatedAt":{"type":"string","format":"date-time"},"totalItems":{"type":"integer","minimum":0},"byType":{"type":"object","properties":{"thoughts":{"type":"integer","minimum":0},"letters":{"type":"integer","minimum":0},"lifeEntries":{"type":"integer","minimum":0},"lifeReflections":{"type":"integer","minimum":0}},"required":["thoughts","letters","lifeEntries","lifeReflections"],"additionalProperties":false},"items":{"type":"array","items":{"$ref":"#/components/schemas/ContentItem"}}},"required":["generatedAt","totalItems","byType","items"],"additionalProperties":false},"ContentManifest":{"type":"object","required":["generatedAt","totalItems","byType","items","version","site","author"],"additionalProperties":false,"properties":{"generatedAt":{"type":"string","format":"date-time"},"totalItems":{"type":"integer","minimum":0},"byType":{"type":"object","properties":{"thoughts":{"type":"integer","minimum":0},"letters":{"type":"integer","minimum":0},"lifeEntries":{"type":"integer","minimum":0},"lifeReflections":{"type":"integer","minimum":0}},"required":["thoughts","letters","lifeEntries","lifeReflections"],"additionalProperties":false},"items":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/ContentItem"},{"type":"object","properties":{"datePublished":{"type":"string","format":"date"}}}]}},"version":{"type":"string"},"site":{"type":"string","format":"uri"},"author":{"type":"string"}}},"Thought":{"type":"object","required":["id","title","datePublished","content","wordCount","schema","type"],"additionalProperties":false,"properties":{"id":{"type":"string"},"title":{"type":"string"},"datePublished":{"type":"string","description":"Original publication date, for example January 1, 2025. Manifest dates use YYYY-MM-DD."},"content":{"type":"string","description":"Complete original article text."},"wordCount":{"type":"integer","minimum":0},"schema":{"$ref":"#/components/schemas/ArticleJsonLd"},"type":{"type":"string","const":"thought"},"tags":{"type":"array","items":{"type":"string"}}}},"Letter":{"type":"object","required":["id","title","datePublished","content","wordCount","schema","type"],"additionalProperties":false,"properties":{"id":{"type":"string"},"title":{"type":"string"},"datePublished":{"type":"string","description":"Original publication date, for example January 1, 2025. Manifest dates use YYYY-MM-DD."},"content":{"type":"string","description":"Complete original article text."},"wordCount":{"type":"integer","minimum":0},"schema":{"$ref":"#/components/schemas/ArticleJsonLd"},"type":{"type":"string","const":"letter"}}},"LifeEntry":{"type":"object","required":["id","title","datePublished","content","wordCount","schema","type","year"],"additionalProperties":false,"properties":{"id":{"type":"string"},"title":{"type":"string"},"datePublished":{"type":"string","description":"Original publication date, for example January 1, 2025. Manifest dates use YYYY-MM-DD."},"content":{"type":"string","description":"Complete original article text."},"wordCount":{"type":"integer","minimum":0},"schema":{"$ref":"#/components/schemas/ArticleJsonLd"},"type":{"type":"string","const":"life-entry"},"year":{"type":"integer"},"image":{"type":"object","required":["src","alt"],"additionalProperties":false,"properties":{"src":{"type":"string"},"alt":{"type":"string"},"caption":{"type":"string"},"afterParagraph":{"type":"integer","minimum":0}}}}},"ArticleJsonLd":{"type":"object","description":"Schema.org Article metadata. Additional Schema.org properties may be included.","required":["@context","@type","headline","description","url","mainEntityOfPage","inLanguage","author","publisher"],"properties":{"@context":{"type":"string","const":"https://schema.org"},"@type":{"type":"string","const":"Article"},"headline":{"type":"string"},"description":{"type":"string"},"url":{"type":"string","format":"uri"},"mainEntityOfPage":{"type":"string","format":"uri"},"inLanguage":{"type":"string"},"datePublished":{"type":"string","format":"date"},"dateModified":{"type":"string","format":"date"},"articleBody":{"type":"string"},"contentHash":{"type":"string","pattern":"^[a-f0-9]{16}$","description":"First 16 hexadecimal characters of the SHA-256 content hash."},"keywords":{"type":"string"},"author":{"type":"object","required":["@id","name"],"properties":{"@id":{"type":"string","format":"uri"},"name":{"type":"string"}}},"publisher":{"type":"object","required":["@id"],"properties":{"@id":{"type":"string","format":"uri"}}}}}}}}