Plandex Diffs API

Per-file pending changes, apply, and reject operations.

Documentation

Specifications

Schemas & Data

Other Resources

OpenAPI Specification

plandex-diffs-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Plandex Server Accounts Diffs API
  description: Management and orchestration REST API exposed by the Plandex server (open-source, Go) used by the Plandex CLI/REPL to drive long-running coding plans across organizations, projects, plans, branches, context, conversation, model packs, and configuration. The same API powered Plandex Cloud (winding down 2025-10-03) and now powers self-hosted / local-mode deployments via Docker. Default local-mode bind is http://localhost:8099.
  version: '2'
  contact:
    name: Plandex AI
    url: https://plandex.ai
  license:
    name: MIT
    url: https://github.com/plandex-ai/plandex/blob/main/LICENSE
  termsOfService: https://plandex.ai/terms
servers:
- url: http://localhost:8099
  description: Default self-hosted / local-mode Plandex server (Docker)
- url: https://api.plandex.ai
  description: Plandex Cloud (winding down as of 2025-10-03; no longer accepting new users)
security:
- BearerAuth: []
tags:
- name: Diffs
  description: Per-file pending changes, apply, and reject operations.
paths:
  /plans/{planId}/{branch}/apply:
    patch:
      tags:
      - Diffs
      summary: Apply Plan Changes
      description: Apply all pending file changes for the plan on the given branch.
      operationId: applyPlan
      parameters:
      - in: path
        name: planId
        required: true
        schema:
          type: string
      - in: path
        name: branch
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Changes applied.
  /plans/{planId}/{branch}/reject_all:
    patch:
      tags:
      - Diffs
      summary: Reject All Plan Changes
      description: Reject every pending file change for the plan on the branch.
      operationId: rejectAllChanges
      parameters:
      - in: path
        name: planId
        required: true
        schema:
          type: string
      - in: path
        name: branch
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Changes rejected.
  /plans/{planId}/{branch}/reject_file:
    patch:
      tags:
      - Diffs
      summary: Reject Plan File Change
      description: Reject pending changes for a single file.
      operationId: rejectFile
      parameters:
      - in: path
        name: planId
        required: true
        schema:
          type: string
      - in: path
        name: branch
        required: true
        schema:
          type: string
      responses:
        '200':
          description: File change rejected.
  /plans/{planId}/{branch}/reject_files:
    patch:
      tags:
      - Diffs
      summary: Reject Multiple File Changes
      description: Reject pending changes for the supplied list of files.
      operationId: rejectFiles
      parameters:
      - in: path
        name: planId
        required: true
        schema:
          type: string
      - in: path
        name: branch
        required: true
        schema:
          type: string
      responses:
        '200':
          description: File changes rejected.
  /plans/{planId}/{branch}/diffs:
    get:
      tags:
      - Diffs
      summary: Get Plan Diffs
      description: Get the unified diff of pending changes for the plan branch.
      operationId: getPlanDiffs
      parameters:
      - in: path
        name: planId
        required: true
        schema:
          type: string
      - in: path
        name: branch
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Diff payload.
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Bearer token issued by the Plandex server on sign-in. Used by the CLI/REPL for all authenticated API calls.