WitWiki Admin API

The Admin API from WitWiki, for admin.

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 10

GET /api/admin/stats Platform stats (admin-email gated) #
GET /api/admin/users List all users (admin-email gated) #
GET /api/admin/users/{id} User detail — memberships + activity (admin-email gated) #
GET /api/admin/orgs List all orgs with member/project counts (admin-email gated) #
GET /api/admin/orgs/{id} Org detail — members, projects, plan, connectors, recent audit (admin-email… #
PUT /api/admin/orgs/{id}/features/{feature} Turn a feature on for an org (admin-email gated; refused while impersonating) #
DELETE /api/admin/orgs/{id}/features/{feature} Turn a feature off for an org (admin-email gated; refused while impersonating) #
POST /api/admin/imports/{id}/resume Raise the ceiling of an import paused at it and resume it (admin-email gated… #
POST /api/admin/impersonate Start read-only impersonation — mint a 30-min view-as token (admin-email gated) #
POST /api/admin/impersonate/stop End an impersonation session (audit ping; admin-email gated) #

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-admin-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-admin-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WitWiki Admin 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: Admin
paths:
  /api/admin/stats:
    get:
      tags:
      - Admin
      summary: Platform stats (admin-email gated)
      responses:
        '200':
          description: Stats
      operationId: getApiAdminStats
      x-operation-id-source: derived
  /api/admin/users:
    get:
      tags:
      - Admin
      summary: List all users (admin-email gated)
      responses:
        '200':
          description: Users
      operationId: getApiAdminUsers
      x-operation-id-source: derived
  /api/admin/users/{id}:
    get:
      tags:
      - Admin
      summary: User detail — memberships + activity (admin-email gated)
      parameters:
      - $ref: '#/components/parameters/IDPath'
      responses:
        '200':
          description: User detail
        '404':
          $ref: '#/components/responses/NotFound'
      operationId: getApiAdminUsersById
      x-operation-id-source: derived
  /api/admin/orgs:
    get:
      tags:
      - Admin
      summary: List all orgs with member/project counts (admin-email gated)
      responses:
        '200':
          description: Orgs
      operationId: getApiAdminOrgs
      x-operation-id-source: derived
  /api/admin/orgs/{id}:
    get:
      tags:
      - Admin
      summary: Org detail — members, projects, plan, connectors, recent audit (admin-email…
      parameters:
      - $ref: '#/components/parameters/IDPath'
      responses:
        '200':
          description: Org detail + recent_audit
        '404':
          $ref: '#/components/responses/NotFound'
      operationId: getApiAdminOrgsById
      x-operation-id-source: derived
  /api/admin/orgs/{id}/features/{feature}:
    put:
      tags:
      - Admin
      summary: Turn a feature on for an org (admin-email gated; refused while impersonating)
      parameters:
      - $ref: '#/components/parameters/IDPath'
      - name: feature
        in: path
        required: true
        schema:
          type: string
          enum:
          - notion_import
      responses:
        '200':
          description: The switch is on
          content:
            application/json:
              schema:
                type: object
                properties:
                  feature:
                    type: string
                  enabled:
                    type: boolean
        '400':
          description: Unknown feature
        '403':
          $ref: '#/components/responses/Forbidden'
      operationId: putApiAdminOrgsByIdFeaturesByFeature
      x-operation-id-source: derived
    delete:
      tags:
      - Admin
      summary: Turn a feature off for an org (admin-email gated; refused while impersonating)
      parameters:
      - $ref: '#/components/parameters/IDPath'
      - name: feature
        in: path
        required: true
        schema:
          type: string
          enum:
          - notion_import
      responses:
        '200':
          description: The switch is off
          content:
            application/json:
              schema:
                type: object
                properties:
                  feature:
                    type: string
                  enabled:
                    type: boolean
        '400':
          description: Unknown feature
        '403':
          $ref: '#/components/responses/Forbidden'
      operationId: deleteApiAdminOrgsByIdFeaturesByFeature
      x-operation-id-source: derived
  /api/admin/imports/{id}/resume:
    post:
      tags:
      - Admin
      summary: Raise the ceiling of an import paused at it and resume it (admin-email gated…
      description: Sets the import's ceiling, compare-and-set against the one it read, writes the audit entry `admin.import.resume` (the import, its org and the old and new ceilings), and only then queues it again at the step it paused at. If the entry cannot be written, or the requeue fails, the ceiling stays raised and the import stays paused (500).
      parameters:
      - $ref: '#/components/parameters/IDPath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - ceiling_usd
              properties:
                ceiling_usd:
                  type: number
                  example: 75
                  description: 'The new ceiling in US dollars, at most 6 decimal places: more than the import has spent, at most 500.'
      responses:
        '200':
          description: The resumed import
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ImportJob'
        '400':
          description: ceiling_usd is missing or malformed, not above what the import has spent, or above 500
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: The import is not paused; import is switched off for its organisation; "The import changed while it was being resumed. Look at it again." (another resume changed it first); or "The import is no longer paused." (it was cancelled after its ceiling was raised and audited)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: The ceiling was raised but could not be audited, or could not be requeued; the import is still paused
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Import is not set up on this server (it has no language model), or the import service is not wired
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: postApiAdminImportsByIdResume
      x-operation-id-source: derived
  /api/admin/impersonate:
    post:
      tags:
      - Admin
      summary: Start read-only impersonation — mint a 30-min view-as token (admin-email gated)
      description: 'Issues a short-lived, no-refresh access token carrying the target user''s claims plus an `imp` claim (the admin). The token is **read-only**: any non-GET request made with it is rejected 403. Refuses to impersonate the admin or another admin account. Audit-logged as `admin.impersonate.start`.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - user_id
              properties:
                user_id:
                  type: string
                org_id:
                  type: string
                  description: Optional; defaults to the user's first membership
      responses:
        '200':
          description: Impersonation token + target user/org
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                  user:
                    type: object
                    properties:
                      id:
                        type: string
                      email:
                        type: string
                  org:
                    type: object
                    properties:
                      id:
                        type: string
                  role:
                    type: string
                  expires_at:
                    type: string
                    format: date-time
        '400':
          $ref: '#/components/responses/BadRequest'
        '404':
          $ref: '#/components/responses/NotFound'
      operationId: postApiAdminImpersonate
      x-operation-id-source: derived
  /api/admin/impersonate/stop:
    post:
      tags:
      - Admin
      summary: End an impersonation session (audit ping; admin-email gated)
      responses:
        '204':
          description: Recorded
      operationId: postApiAdminImpersonateStop
      x-operation-id-source: derived
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
      required:
      - error
    ImportJob:
      type: object
      properties:
        id:
          type: string
        org_id:
          type: string
        project_id:
          type: string
        started_by:
          type: string
        status:
          type: string
          enum:
          - queued
          - running
          - paused
          - failed
          - cancelled
          - done
        step:
          type: string
          enum:
          - read
          - digest
          - plan
          - write
          - check
          - finish
        expected_archive_rate:
          type:
          - number
          - 'null'
        ceiling_micros:
          type: integer
          format: int64
          description: Most the import may spend, in micro-dollars.
        spent_micros:
          type: integer
          format: int64
          description: Spent so far, in micro-dollars.
        pages_total:
          type: integer
        error:
          type: string
          description: Why a failed import stopped, in a sentence for the org's admins; empty otherwise.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
        finished_at:
          type:
          - string
          - 'null'
          format: date-time
  responses:
    BadRequest:
      description: Invalid input
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: Resource not found
      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'
  parameters:
    IDPath:
      name: id
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: A project API key or a JWT session access token.