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).
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.
openapi: 3.2.0
info:
title: WitWiki OAuth 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: OAuth
paths:
/.well-known/oauth-authorization-server:
get:
tags:
- OAuth
summary: OAuth 2.0 Authorization Server metadata (RFC 8414)
security: []
responses:
'200':
description: AS metadata
operationId: getWellKnownOauthAuthorizationServer
x-operation-id-source: derived
/.well-known/oauth-protected-resource:
get:
tags:
- OAuth
summary: OAuth 2.0 Protected Resource metadata (RFC 9728)
security: []
responses:
'200':
description: PR metadata
operationId: getWellKnownOauthProtectedResource
x-operation-id-source: derived
/.well-known/jwks.json:
get:
tags:
- OAuth
summary: JSON Web Key Set
security: []
responses:
'200':
description: JWKS
operationId: getWellKnownJwksJson
x-operation-id-source: derived
/oauth/authorize:
get:
tags:
- OAuth
summary: Authorization endpoint (redirects to consent)
security: []
responses:
'302':
description: Redirect to consent
operationId: getOauthAuthorize
x-operation-id-source: derived
/oauth/token:
post:
tags:
- OAuth
summary: Token endpoint (authorization_code + PKCE)
security: []
responses:
'200':
description: Token response
operationId: postOauthToken
x-operation-id-source: derived
/oauth/register:
post:
tags:
- OAuth
summary: Dynamic client registration (RFC 7591)
security: []
responses:
'201':
description: Registered client
operationId: postOauthRegister
x-operation-id-source: derived
/api/oauth/authorize:
post:
tags:
- OAuth
summary: Submit the consent decision (authenticated)
responses:
'302':
description: Redirect with authorization code
operationId: postApiOauthAuthorize
x-operation-id-source: derived
components:
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: A project API key or a JWT session access token.