WitWiki Versions API

The Versions API from WitWiki, for versions.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 5

GET /api/page-versions/{path} List versions of a page #
GET /api/page-version/{path} Get a specific page version #
DELETE /api/page-version/{path} Delete a page version (role: admin+) #
POST /api/page-restore/{path} Restore a page to a prior version (role: member+) #
POST /api/page-disagreements/{path} Settle a disagreement block on a page (role: member+, a signed-in person) #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/witwiki-app:witwiki-app-versions-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

witwiki-app-versions-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WitWiki Versions API
  version: 1.0.0
  description: 'REST API for **WitWiki** — a hosted, MCP-native, cross-linked knowledge base

    that gives LLM agents and humans a shared, persistent wiki.


    This document is hand-authored (source at `api/internal/openapi/openapi.yaml`,

    embedded into the binary) and served at `GET /openapi.yaml`, with interactive

    Swagger UI at `GET /docs`. It covers the

    REST surface rooted at `/api`, plus the open auth routes, OAuth discovery, and

    the Stripe webhook. The MCP transport at `/mcp` is documented separately

    (`docs/witwiki-mcp.md`); it is not a REST surface.


    ## Authentication

    All `/api/*` routes (except the open auth routes below) require a bearer token

    in the `Authorization` header. The token may be either:

    - a **project API key** (resolves directly to a project), or

    - a **JWT session access token** (from `POST /api/auth/login`). On the JWT path,

    send the active project in the `X-Project-ID` header.


    ## Errors

    Errors are returned as `{ "error": "" }` with an appropriate status

    (400 invalid input, 401 unauthenticated, 403 role/scope denied, 404 not found,

    402 quota exceeded, 409/410 transfer state conflicts, 500 internal).'
servers:
- url: https://api.witwiki.app
  description: Production
- url: http://localhost:8080
  description: Local development
security:
- bearerAuth: []
tags:
- name: Versions
paths:
  /api/page-versions/{path}:
    get:
      tags:
      - Versions
      summary: List versions of a page
      parameters:
      - $ref: '#/components/parameters/PagePath'
      - $ref: '#/components/parameters/ProjectID'
      responses:
        '200':
          description: Version list
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
      operationId: getApiPageVersionsByPath
      x-operation-id-source: derived
  /api/page-version/{path}:
    parameters:
    - $ref: '#/components/parameters/PagePath'
    - $ref: '#/components/parameters/ProjectID'
    get:
      tags:
      - Versions
      summary: Get a specific page version
      parameters:
      - name: version_id
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Version
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page'
      operationId: getApiPageVersionByPath
      x-operation-id-source: derived
    delete:
      tags:
      - Versions
      summary: 'Delete a page version (role: admin+)'
      parameters:
      - name: version_id
        in: query
        schema:
          type: string
      responses:
        '204':
          description: Deleted
      operationId: deleteApiPageVersionByPath
      x-operation-id-source: derived
  /api/page-restore/{path}:
    post:
      tags:
      - Versions
      summary: 'Restore a page to a prior version (role: member+)'
      parameters:
      - $ref: '#/components/parameters/PagePath'
      - name: version_id
        in: query
        schema:
          type: string
      - $ref: '#/components/parameters/ProjectID'
      responses:
        '200':
          description: Restored page
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page'
      operationId: postApiPageRestoreByPath
      x-operation-id-source: derived
  /api/page-disagreements/{path}:
    post:
      tags:
      - Versions
      summary: 'Settle a disagreement block on a page (role: member+, a signed-in person)'
      description: 'Replaces the page''s disagreement block named by `id` with one claim''s text (`choice: claim` and its zero-based `claim` index), every claim''s text as its own paragraph (`choice: both`), or the person''s own words (`choice: custom` and `text`, at most 20,000 characters). The result is a new page version of write kind `resolve`, attributed to the person. Claim text is inserted trimmed; a claim whose text holds an unclosed code fence or a `disagreement` fence is refused with 400 (code `claim_not_insertable`), and the person can write their own text instead. `expected_version` is the page token being read; a stale one is refused with 409 and nothing changes. API keys and delegated OAuth tokens are refused whatever their role. Not behind any feature switch.'
      parameters:
      - $ref: '#/components/parameters/PagePath'
      - $ref: '#/components/parameters/ProjectID'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - id
              - choice
              - expected_version
              additionalProperties: false
              properties:
                id:
                  type: string
                  pattern: ^[a-z0-9][a-z0-9-]{0,63}$
                choice:
                  type: string
                  enum:
                  - claim
                  - both
                  - custom
                claim:
                  type: integer
                  minimum: 0
                  description: Required when choice is claim
                text:
                  type: string
                  maxLength: 20000
                  description: Required and not blank when choice is custom
                expected_version:
                  type: string
      responses:
        '200':
          description: The settled page
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Page'
        '400':
          $ref: '#/components/responses/BadRequest'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          description: No such page in this project, or the page has no open disagreement with that id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: The page changed since expected_version (VERSION_CONFLICT, with current_version and a diff)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: postApiPageDisagreementsByPath
      x-operation-id-source: derived
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
      required:
      - error
    Page:
      type: object
      properties:
        path:
          type: string
        title:
          type: string
        content:
          type: string
        metadata:
          type: object
          additionalProperties: true
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        version_id:
          type: string
  parameters:
    PagePath:
      name: path
      in: path
      required: true
      schema:
        type: string
      description: Wiki page path, e.g. `concepts/llm-wiki` (may contain slashes).
    ProjectID:
      name: X-Project-ID
      in: header
      required: false
      schema:
        type: string
      description: Active project ID. Required on the JWT-session auth path; ignored when using a project API key.
  responses:
    BadRequest:
      description: Invalid input
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: Authenticated but lacks the required role or scope
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A project API key or a JWT session access token.