Commentary Knowledge Brain API

The Knowledge Brain API from Commentary — 7 operation(s) for knowledge brain.

GitHub OpenAPI

Operations 9

GET /api/v1/brain/reviews List Knowledge Brain reviews available to the token #
GET /api/v1/brain/review/changed-files List changed files for a Knowledge Brain review #
GET /api/v1/brain/review/comments List comments for a Knowledge Brain review #
GET /api/v1/brain/review/health-findings List health findings for a Knowledge Brain review #
GET /api/v1/brain/review/requested-revisions List requested revisions for a Knowledge Brain review #
POST /api/v1/brain/review/ready Mark a Knowledge Brain requested revision ready for review #
GET /api/v1/brain/review/evaluations List Knowledge Brain evaluation ledger entries #
POST /api/v1/brain/review/evaluations Create a Knowledge Brain evaluation ledger entry #
PATCH /api/v1/brain/review/evaluations Update a Knowledge Brain evaluation ledger entry #

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/commentary-dev:commentary-dev-knowledge-brain-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

commentary-dev-knowledge-brain-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Commentary Dev Knowledge Brain API
  version: 0.1.0
  x-commentary-api-version: v1
  x-commentary-compatibility-policy: /docs/api/versioning.md
  x-commentary-feature-key: api.openapi_docs
  description: 'Operations tagged Knowledge Brain across 2 of this provider''s published API definitions: commentary-dev-openapi.json, commentary-dev-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://commentary.dev
  description: Configured Commentary origin.
- url: http://localhost:3000
  description: Local development.
tags:
- name: Knowledge Brain
paths:
  /api/v1/brain/reviews:
    get:
      operationId: listBrainReviews
      tags:
      - Knowledge Brain
      summary: List Knowledge Brain reviews available to the token
      security:
      - bearerAuth:
        - commentary.review.read
      parameters:
      - name: owner
        in: query
        required: false
        schema:
          type: string
      - name: repo
        in: query
        required: false
        schema:
          type: string
      - name: rootFolder
        in: query
        required: false
        schema:
          type: string
      - name: brainRootFolder
        in: query
        required: false
        schema:
          type: string
      - name: X-Commentary-Workspace-Id
        in: header
        required: false
        description: Must match the credential workspace. This header cannot widen grant authority.
        schema:
          type: string
      - name: X-Correlation-Id
        in: header
        required: false
        schema:
          type: string
          maxLength: 128
      x-commentary-feature-key: brain.agent_api
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    const: true
                  reviews:
                    type: array
                    items:
                      $ref: '#/components/schemas/BrainReview'
        '400':
          description: The request was invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '401':
          description: Authentication is required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '403':
          description: The token or session does not have permission for this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '404':
          description: The resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '429':
          description: The request was rate limited.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
    servers:
    - url: https://commentary.dev
      description: Configured Commentary origin.
    - url: http://localhost:3000
      description: Local development.
  /api/v1/brain/review/changed-files:
    get:
      operationId: listChangedBrainFiles
      tags:
      - Knowledge Brain
      summary: List changed files for a Knowledge Brain review
      security:
      - bearerAuth:
        - commentary.review.read
      parameters:
      - name: provider
        in: query
        required: false
        schema:
          type: string
          enum:
          - github
      - name: owner
        in: query
        required: false
        schema:
          type: string
        description: Repository owner.
      - name: repo
        in: query
        required: false
        schema:
          type: string
        description: Repository name.
      - name: pr
        in: query
        required: false
        schema:
          type: integer
        description: Pull request number.
      - name: prNumber
        in: query
        required: false
        schema:
          type: integer
        description: Pull request number alias used by Brain endpoints.
      - name: branch
        in: query
        required: false
        schema:
          type: string
        description: Branch ref for branch document review.
      - name: branchRef
        in: query
        required: false
        schema:
          type: string
        description: Branch ref alias used by Brain endpoints.
      - name: rootFolder
        in: query
        required: false
        schema:
          type: string
        description: Knowledge Brain root folder.
      - name: brainRootFolder
        in: query
        required: false
        schema:
          type: string
        description: Knowledge Brain root folder alias.
      - name: file
        in: query
        required: false
        schema:
          type: string
      - name: filePath
        in: query
        required: false
        schema:
          type: string
      - name: state
        in: query
        required: false
        schema:
          type: string
      - name: X-Commentary-Workspace-Id
        in: header
        required: false
        description: Must match the credential workspace. This header cannot widen grant authority.
        schema:
          type: string
      - name: X-Correlation-Id
        in: header
        required: false
        schema:
          type: string
          maxLength: 128
      x-commentary-feature-key: brain.agent_api
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    const: true
                  changedFiles:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                additionalProperties: true
        '400':
          description: The request was invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '401':
          description: Authentication is required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '403':
          description: The token or session does not have permission for this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '404':
          description: The resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '429':
          description: The request was rate limited.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
    servers:
    - url: https://commentary.dev
      description: Configured Commentary origin.
    - url: http://localhost:3000
      description: Local development.
  /api/v1/brain/review/comments:
    get:
      operationId: listBrainReviewComments
      tags:
      - Knowledge Brain
      summary: List comments for a Knowledge Brain review
      security:
      - bearerAuth:
        - commentary.comments.read
      parameters:
      - name: provider
        in: query
        required: false
        schema:
          type: string
          enum:
          - github
      - name: owner
        in: query
        required: false
        schema:
          type: string
        description: Repository owner.
      - name: repo
        in: query
        required: false
        schema:
          type: string
        description: Repository name.
      - name: pr
        in: query
        required: false
        schema:
          type: integer
        description: Pull request number.
      - name: prNumber
        in: query
        required: false
        schema:
          type: integer
        description: Pull request number alias used by Brain endpoints.
      - name: branch
        in: query
        required: false
        schema:
          type: string
        description: Branch ref for branch document review.
      - name: branchRef
        in: query
        required: false
        schema:
          type: string
        description: Branch ref alias used by Brain endpoints.
      - name: rootFolder
        in: query
        required: false
        schema:
          type: string
        description: Knowledge Brain root folder.
      - name: brainRootFolder
        in: query
        required: false
        schema:
          type: string
        description: Knowledge Brain root folder alias.
      - name: file
        in: query
        required: false
        schema:
          type: string
      - name: filePath
        in: query
        required: false
        schema:
          type: string
      - name: state
        in: query
        required: false
        schema:
          type: string
      - name: X-Commentary-Workspace-Id
        in: header
        required: false
        description: Must match the credential workspace. This header cannot widen grant authority.
        schema:
          type: string
      - name: X-Correlation-Id
        in: header
        required: false
        schema:
          type: string
          maxLength: 128
      x-commentary-feature-key: brain.agent_api
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    const: true
                  threads:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                additionalProperties: true
        '400':
          description: The request was invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '401':
          description: Authentication is required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '403':
          description: The token or session does not have permission for this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '404':
          description: The resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '429':
          description: The request was rate limited.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
    servers:
    - url: https://commentary.dev
      description: Configured Commentary origin.
    - url: http://localhost:3000
      description: Local development.
  /api/v1/brain/review/health-findings:
    get:
      operationId: listBrainHealthFindings
      tags:
      - Knowledge Brain
      summary: List health findings for a Knowledge Brain review
      security:
      - bearerAuth:
        - commentary.review.read
      parameters:
      - name: provider
        in: query
        required: false
        schema:
          type: string
          enum:
          - github
      - name: owner
        in: query
        required: false
        schema:
          type: string
        description: Repository owner.
      - name: repo
        in: query
        required: false
        schema:
          type: string
        description: Repository name.
      - name: pr
        in: query
        required: false
        schema:
          type: integer
        description: Pull request number.
      - name: prNumber
        in: query
        required: false
        schema:
          type: integer
        description: Pull request number alias used by Brain endpoints.
      - name: branch
        in: query
        required: false
        schema:
          type: string
        description: Branch ref for branch document review.
      - name: branchRef
        in: query
        required: false
        schema:
          type: string
        description: Branch ref alias used by Brain endpoints.
      - name: rootFolder
        in: query
        required: false
        schema:
          type: string
        description: Knowledge Brain root folder.
      - name: brainRootFolder
        in: query
        required: false
        schema:
          type: string
        description: Knowledge Brain root folder alias.
      - name: file
        in: query
        required: false
        schema:
          type: string
      - name: filePath
        in: query
        required: false
        schema:
          type: string
      - name: state
        in: query
        required: false
        schema:
          type: string
      - name: X-Commentary-Workspace-Id
        in: header
        required: false
        description: Must match the credential workspace. This header cannot widen grant authority.
        schema:
          type: string
      - name: X-Correlation-Id
        in: header
        required: false
        schema:
          type: string
          maxLength: 128
      x-commentary-feature-key: brain.agent_api
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    const: true
                  healthFindings:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                additionalProperties: true
        '400':
          description: The request was invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '401':
          description: Authentication is required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '403':
          description: The token or session does not have permission for this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '404':
          description: The resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '429':
          description: The request was rate limited.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
    servers:
    - url: https://commentary.dev
      description: Configured Commentary origin.
    - url: http://localhost:3000
      description: Local development.
  /api/v1/brain/review/requested-revisions:
    get:
      operationId: listBrainRequestedRevisions
      tags:
      - Knowledge Brain
      summary: List requested revisions for a Knowledge Brain review
      security:
      - bearerAuth:
        - commentary.review.read
      parameters:
      - name: provider
        in: query
        required: false
        schema:
          type: string
          enum:
          - github
      - name: owner
        in: query
        required: false
        schema:
          type: string
        description: Repository owner.
      - name: repo
        in: query
        required: false
        schema:
          type: string
        description: Repository name.
      - name: pr
        in: query
        required: false
        schema:
          type: integer
        description: Pull request number.
      - name: prNumber
        in: query
        required: false
        schema:
          type: integer
        description: Pull request number alias used by Brain endpoints.
      - name: branch
        in: query
        required: false
        schema:
          type: string
        description: Branch ref for branch document review.
      - name: branchRef
        in: query
        required: false
        schema:
          type: string
        description: Branch ref alias used by Brain endpoints.
      - name: rootFolder
        in: query
        required: false
        schema:
          type: string
        description: Knowledge Brain root folder.
      - name: brainRootFolder
        in: query
        required: false
        schema:
          type: string
        description: Knowledge Brain root folder alias.
      - name: file
        in: query
        required: false
        schema:
          type: string
      - name: filePath
        in: query
        required: false
        schema:
          type: string
      - name: state
        in: query
        required: false
        schema:
          type: string
      - name: X-Commentary-Workspace-Id
        in: header
        required: false
        description: Must match the credential workspace. This header cannot widen grant authority.
        schema:
          type: string
      - name: X-Correlation-Id
        in: header
        required: false
        schema:
          type: string
          maxLength: 128
      x-commentary-feature-key: brain.agent_api
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    const: true
                  requestedRevisions:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
                additionalProperties: true
        '400':
          description: The request was invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '401':
          description: Authentication is required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '403':
          description: The token or session does not have permission for this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '404':
          description: The resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '429':
          description: The request was rate limited.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
    servers:
    - url: https://commentary.dev
      description: Configured Commentary origin.
    - url: http://localhost:3000
      description: Local development.
  /api/v1/brain/review/ready:
    post:
      operationId: markBrainReviewReady
      tags:
      - Knowledge Brain
      summary: Mark a Knowledge Brain requested revision ready for review
      security:
      - bearerAuth:
        - commentary.comments.write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BrainReadyRequest'
      x-commentary-feature-key: brain.agent_api
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
        '400':
          description: The request was invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '401':
          description: Authentication is required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '403':
          description: The token or session does not have permission for this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '404':
          description: The resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '429':
          description: The request was rate limited.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
      parameters:
      - name: X-Commentary-Workspace-Id
        in: header
        required: false
        description: Must match the credential workspace. This header cannot widen grant authority.
        schema:
          type: string
      - name: X-Correlation-Id
        in: header
        required: false
        schema:
          type: string
          maxLength: 128
    servers:
    - url: https://commentary.dev
      description: Configured Commentary origin.
    - url: http://localhost:3000
      description: Local development.
  /api/v1/brain/review/evaluations:
    get:
      operationId: listBrainEvaluations
      tags:
      - Knowledge Brain
      summary: List Knowledge Brain evaluation ledger entries
      security:
      - bearerAuth:
        - commentary.brain.evals.read
      parameters:
      - name: provider
        in: query
        required: false
        schema:
          type: string
          enum:
          - github
      - name: owner
        in: query
        required: false
        schema:
          type: string
        description: Repository owner.
      - name: repo
        in: query
        required: false
        schema:
          type: string
        description: Repository name.
      - name: pr
        in: query
        required: false
        schema:
          type: integer
        description: Pull request number.
      - name: prNumber
        in: query
        required: false
        schema:
          type: integer
        description: Pull request number alias used by Brain endpoints.
      - name: branch
        in: query
        required: false
        schema:
          type: string
        description: Branch ref for branch document review.
      - name: branchRef
        in: query
        required: false
        schema:
          type: string
        description: Branch ref alias used by Brain endpoints.
      - name: rootFolder
        in: query
        required: false
        schema:
          type: string
        description: Knowledge Brain root folder.
      - name: brainRootFolder
        in: query
        required: false
        schema:
          type: string
        description: Knowledge Brain root folder alias.
      - name: X-Commentary-Workspace-Id
        in: header
        required: false
        description: Must match the credential workspace. This header cannot widen grant authority.
        schema:
          type: string
      - name: X-Correlation-Id
        in: header
        required: false
        schema:
          type: string
          maxLength: 128
      x-commentary-feature-key: brain.evaluations
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    const: true
                  evaluations:
                    type: array
                    items:
                      $ref: '#/components/schemas/BrainEvaluation'
                additionalProperties: true
        '400':
          description: The request was invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '401':
          description: Authentication is required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '403':
          description: The token or session does not have permission for this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '404':
          description: The resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '429':
          description: The request was rate limited.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
    post:
      operationId: createBrainEvaluation
      tags:
      - Knowledge Brain
      summary: Create a Knowledge Brain evaluation ledger entry
      security:
      - bearerAuth:
        - commentary.brain.evals.write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BrainEvaluationRequest'
      x-commentary-feature-key: brain.evaluations
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    const: true
                  evaluation:
                    $ref: '#/components/schemas/BrainEvaluation'
                additionalProperties: true
        '400':
          description: The request was invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '401':
          description: Authentication is required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '403':
          description: The token or session does not have permission for this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '404':
          description: The resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '429':
          description: The request was rate limited.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
      parameters:
      - name: X-Commentary-Workspace-Id
        in: header
        required: false
        description: Must match the credential workspace. This header cannot widen grant authority.
        schema:
          type: string
      - name: X-Correlation-Id
        in: header
        required: false
        schema:
          type: string
          maxLength: 128
    patch:
      operationId: updateBrainEvaluation
      tags:
      - Knowledge Brain
      summary: Update a Knowledge Brain evaluation ledger entry
      security:
      - bearerAuth:
        - commentary.brain.evals.write
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BrainEvaluationRequest'
      x-commentary-feature-key: brain.evaluations
      responses:
        '200':
          description: Successful response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  ok:
                    const: true
                  evaluation:
                    $ref: '#/components/schemas/BrainEvaluation'
                additionalProperties: true
        '400':
          description: The request was invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '401':
          description: Authentication is required.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '403':
          description: The token or session does not have permission for this resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '404':
          description: The resource was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
        '429':
          description: The request was rate limited.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExternalError'
      parameters:
      - name: X-Commentary-Workspace-Id
        in: header
        required: false
        description: Must match the credential workspace. This header cannot widen grant authority.
        schema:
          type: string
      - name: X-Correlation-Id
        in: header
        required: false
        schema:
          type: string
          maxLength: 128
    servers:
    - url: https://commentary.dev
      description: Configured Commentary origin.
    - url: http://localhost:3000
      description: Local development.
components:
  schemas:
    ExternalError:
      type: object
      required:
      - ok
      - error
      properties:
        ok:
          const: false
        error:
          type: string
      additionalProperties: true
    BrainEvaluationRequest:
      type: object
      properties:
        provider:
          type: string
          enum:
          - github
        owner:
          type: string
        repo:
          type: string
        prNumber:
          type:
          - integer
          - 'null'
        branchRef:
          type:
          - string
          - 'null'
        rootFolder:
          type:
          - string
          - 'null'
        id:
          type:
          - string
          - 'null'
        question:
          type:
          - string
          - 'null'
        expectedAnswer:
          type:
          - string
          - 'null'
        expectedSourcePages: {}
        actualAnswer:
          type:
          - string
          - 'null'
        retrievedPages: {}
        grade: {}
        reviewerNotes:
          type:
          - string
          - 'null'
      additionalProperties: false
    BrainEvaluation:
      type: object
      additionalProperties: true
    BrainReview:
      type: object
      additionalProperties: true
    BrainReadyRequest:
      type: object
      properties:
        threadId:
          type: string
        bodyMarkdown:
          type:
          - string
          - 'null'
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Commentary external access token
      description: Bearer token from an API token, OAuth authorization code flow, OAuth refresh token flow, or OAuth device flow.
    commentarySession:
      type: apiKey
      in: cookie
      name: commentary_session
      description: Signed-in Commentary browser session. Used for API token management routes.
x-refined-from:
- commentary-dev-openapi.json


# --- truncated at 32 KB (505 KB total) ---
# Full source: https://artifacts.apis.io/commentary-dev/openapi/commentary-dev-knowledge-brain-api-openapi.yml