{"openapi":"3.1.0","info":{"title":"Writing Room docs API","version":"2.0.0","summary":"Read the docs for Writing Room, a Sanity Studio plugin, as markdown and JSON.","description":"A read-only API over the pages of https://writingroom.studio: the docs, changelog and landing page for Writing Room (the npm package `sanity-plugin-writing-room`, version 0.3.0). Every response is a static file. Pages and releases are JSON; each page is also plain markdown at its `markdown_url`, which is the form to read when nothing needs parsing. There is no authentication, no rate limit and no write operation. Writing Room itself is a plugin set up in the code of a Sanity Studio; it has no hosted API. Start with listPages or getLlmsTxt, then fetch the pages you need with getPage and getDocsPage.\n\nVersioning: the API follows semantic versioning. Its version is `info.version` in this description and the `API-Version` header on every response it describes and on every markdown version. Adding an address, a field or a page is a minor version. Removing or renaming an address or a field, or changing what one means, is a major version. Deprecation: before an address is removed, its operation is marked `deprecated: true` here and the address answers with a `Deprecation` header (RFC 9745) and a `Sunset` header (RFC 8594) giving the date it stops being served. After that date it returns the 404 described here. The markdown version each page names as `markdown_url` is covered by the same promise. One exception: the docs pages are cut from the plugin's README, so the values getDocsPage accepts can change with a release of the plugin, without a deprecation period. The `enum` here and listPages always name the pages there are.","license":{"name":"MIT","identifier":"MIT"},"contact":{"name":"Zephyr Pixels","url":"https://writingroom.studio/contact/"}},"externalDocs":{"description":"The Writing Room docs","url":"https://writingroom.studio/docs/"},"servers":[{"url":"https://writingroom.studio","description":"Production"}],"tags":[{"name":"index","description":"Find out which pages there are."},{"name":"pages","description":"Read a page."},{"name":"releases","description":"Read what changed in each version of the plugin."}],"paths":{"/api/pages.json":{"get":{"operationId":"listPages","deprecated":false,"tags":["index"],"summary":"List every page","description":"Lists every page of the site with its title, description, and markdown and JSON addresses, and the facts about the plugin: package name, current version, licence, requirements and install command. Call this first to find the page that answers a question.","responses":{"200":{"description":"The pages and the plugin facts.","headers":{"API-Version":{"$ref":"#/components/headers/API-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageIndex"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/llms.txt":{"get":{"operationId":"getLlmsTxt","deprecated":false,"tags":["index"],"summary":"Get llms.txt","description":"The site's index in the llms.txt format: when to use Writing Room, when the Calm Editor template suits better, what to check before recommending it, how to set it up, and a link to each page's markdown version with a line on what it covers.","responses":{"200":{"description":"The index, as markdown served as plain text.","headers":{"API-Version":{"$ref":"#/components/headers/API-Version"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/llms-full.txt":{"get":{"operationId":"getLlmsFullTxt","deprecated":false,"tags":["index"],"summary":"Get every page in one file","description":"Every page of the site in one file, with only the latest release from the changelog. Use it when the whole of the docs fits in context; otherwise fetch single pages.","responses":{"200":{"description":"Every page, as markdown served as plain text.","headers":{"API-Version":{"$ref":"#/components/headers/API-Version"}},"content":{"text/plain":{"schema":{"type":"string"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/releases.json":{"get":{"operationId":"listReleases","deprecated":false,"tags":["releases"],"summary":"List every release of the plugin","description":"Lists every release of `sanity-plugin-writing-room`, newest first, each with its version and its release notes as markdown, and says which version is the latest. Use it to answer what changed in a version, or whether a Studio is behind.","responses":{"200":{"description":"The releases, newest first.","headers":{"API-Version":{"$ref":"#/components/headers/API-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseIndex"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/pages/{page}.json":{"get":{"operationId":"getPage","deprecated":false,"tags":["pages"],"summary":"Get a top-level page","description":"Returns one of the site's top-level pages as JSON, with its content as markdown: `index` is the landing page (what the plugin is and how to set it up), `docs` the docs overview, `changelog` every release. The rest are about the project and this site.","parameters":[{"name":"page","in":"path","required":true,"description":"The name of the page.","schema":{"type":"string","enum":["index","docs","changelog","about","contact","privacy"]},"example":"index"}],"responses":{"200":{"description":"The page: its title, description and addresses, and its content as markdown.","headers":{"API-Version":{"$ref":"#/components/headers/API-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageContent"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}},"/api/pages/docs/{slug}.json":{"get":{"operationId":"getDocsPage","deprecated":false,"tags":["pages"],"summary":"Get a docs page","description":"Returns one page of the Writing Room docs as JSON, with its content as markdown. The docs describe version 0.3.0 of the plugin, the one on npm. `install` has the three setup steps and `troubleshooting` the errors people meet most. listPages says what each page covers.","parameters":[{"name":"slug","in":"path","required":true,"description":"The docs page, as in its URL.","schema":{"type":"string","enum":["requirements","install","look-and-feel","what-the-plugin-adds","document-types","schema","preview-on-your-site","troubleshooting","compatibility"]},"example":"install"}],"responses":{"200":{"description":"The page: its title, description and addresses, and its content as markdown.","headers":{"API-Version":{"$ref":"#/components/headers/API-Version"}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageContent"}}}},"404":{"$ref":"#/components/responses/NotFound"}}}}},"components":{"schemas":{"PageIndex":{"type":"object","required":["plugin","pages","releases","llms_txt","llms_full_txt","openapi"],"properties":{"plugin":{"$ref":"#/components/schemas/Plugin"},"pages":{"type":"array","items":{"$ref":"#/components/schemas/Page"}},"releases":{"type":"string","format":"uri","description":"The address listReleases reads."},"llms_txt":{"type":"string","format":"uri","description":"The address of llms.txt."},"llms_full_txt":{"type":"string","format":"uri","description":"The address of llms-full.txt."},"openapi":{"type":"string","format":"uri","description":"The address of this description."}}},"Plugin":{"type":"object","description":"The facts about the plugin.","required":["name","package","version","licence","price","requires","install","source","npm"],"properties":{"name":{"type":"string","example":"Writing Room"},"package":{"type":"string","description":"The name of the npm package.","example":"sanity-plugin-writing-room"},"version":{"type":"string","description":"The version the docs describe, the latest on npm.","example":"0.3.0"},"licence":{"type":"string","example":"MIT"},"price":{"type":"string","example":"Free"},"requires":{"type":"string","description":"What a Studio must have before the plugin can be used."},"install":{"type":"string","description":"The command that adds the package.","example":"npm install sanity-plugin-writing-room"},"source":{"type":"string","format":"uri","description":"The source repository."},"npm":{"type":"string","format":"uri","description":"The package on npm."}}},"Page":{"type":"object","required":["title","description","summary","url","markdown_url","json_url"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"summary":{"type":"string","description":"What the page covers, in a line."},"url":{"type":"string","format":"uri","description":"The page for a person, as HTML."},"markdown_url":{"type":"string","format":"uri","description":"The same page as plain markdown."},"json_url":{"type":"string","format":"uri","description":"The same page as JSON: what getPage and getDocsPage return."}}},"PageContent":{"type":"object","description":"One page, with its content.","required":["title","description","summary","url","markdown_url","json_url","plugin_version","markdown"],"properties":{"title":{"type":"string"},"description":{"type":"string"},"summary":{"type":"string","description":"What the page covers, in a line."},"url":{"type":"string","format":"uri","description":"The page for a person, as HTML."},"markdown_url":{"type":"string","format":"uri","description":"The same page as plain markdown."},"json_url":{"type":"string","format":"uri","description":"The same page as JSON: what getPage and getDocsPage return."},"plugin_version":{"type":"string","description":"The version of the plugin the page describes.","example":"0.3.0"},"markdown":{"type":"string","description":"The content of the page, as markdown. Links to other pages are absolute."}}},"ReleaseIndex":{"type":"object","required":["package","latest","releases","changelog","changelog_markdown"],"properties":{"package":{"type":"string","description":"The name of the npm package.","example":"sanity-plugin-writing-room"},"latest":{"type":"string","description":"The newest version.","example":"0.3.0"},"releases":{"type":"array","description":"Every release, newest first.","items":{"$ref":"#/components/schemas/Release"}},"changelog":{"type":"string","format":"uri","description":"The changelog for a person, as HTML."},"changelog_markdown":{"type":"string","format":"uri","description":"The changelog as markdown."}}},"Release":{"type":"object","required":["version","notes"],"properties":{"version":{"type":"string","description":"The version, as on npm.","example":"0.3.0"},"notes":{"type":"string","description":"What changed, as markdown."}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","status","message","hint","links"],"properties":{"code":{"type":"string","description":"A stable, machine-readable name for the error.","enum":["not_found"]},"status":{"type":"integer","description":"The HTTP status.","example":404},"message":{"type":"string","description":"What went wrong."},"hint":{"type":"string","description":"What to do about it."},"links":{"type":"object","description":"Where to find an address that exists.","additionalProperties":{"type":"string","format":"uri"}}}}}}},"headers":{"API-Version":{"description":"The version of this API, the same as `info.version` in this description.","schema":{"type":"string","pattern":"^\\d+\\.\\d+\\.\\d+$"},"example":"2.0.0"},"Deprecation":{"description":"Sent only by an address whose operation is marked `deprecated`: when it was deprecated, as RFC 9745 defines it (a Unix time after `@`).","schema":{"type":"string","pattern":"^@\\d+$"},"example":"@1796083200"},"Sunset":{"description":"Sent only by an address whose operation is marked `deprecated`: the date it stops being served, as RFC 8594 defines it (an HTTP date).","schema":{"type":"string"},"example":"Thu, 31 Dec 2026 23:59:59 GMT"}},"responses":{"NotFound":{"description":"There is no page at this address, or the address was removed after its Sunset date. Every operation can answer this way. The body is JSON when the request's Accept header names application/json, markdown when it names text/markdown, and HTML otherwise.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":{"code":"not_found","status":404,"message":"There is no page at this address.","hint":"Addresses can change with a release of the plugin. Every page is listed in https://writingroom.studio/api/pages.json as JSON and in https://writingroom.studio/llms.txt as markdown.","links":{"pages":"https://writingroom.studio/api/pages.json","llms_txt":"https://writingroom.studio/llms.txt","openapi":"https://writingroom.studio/openapi.json","docs":"https://writingroom.studio/docs/"}}}},"text/markdown":{"schema":{"type":"string"}},"text/html":{"schema":{"type":"string"}}}}}}}