Graphite Stacks API

Create, submit, sync, and merge stacked pull requests via the gt CLI.

Operations 3

POST /stacks/branches Create a stacked branch #
POST /stacks/submit Submit a stack to GitHub #
POST /stacks/sync Sync branches with remote #

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/graphite-com-stacks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

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

OpenAPI Specification

graphite-com-stacks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Graphite Platform Authentication Stacks API
  description: 'Graphite does not publish a standalone public REST API. Graphite is built on top of GitHub: it installs as a GitHub App (graphite-app) that consumes GitHub webhooks and calls GitHub''s APIs with short-lived tokens, and it is driven by the gt CLI which authenticates with a Graphite auth token. This OpenAPI models the real, observable surface area as logical operations: the GitHub App install entry point and the documented gt CLI stacked-PR workflow operations. Endpoint paths for CLI operations are illustrative of the platform actions the CLI performs and are not a documented public HTTP contract.'
  termsOfService: https://graphite.dev/terms
  contact:
    name: Graphite Support
    url: https://graphite.com/docs/feature-requests-bugs
  version: '1.0'
servers:
- url: https://app.graphite.dev
  description: Graphite hosted platform (driven by the gt CLI and web app)
- url: https://github.com
  description: GitHub App install and marketplace entry points (GitHub-mediated)
security:
- graphiteAuthToken: []
tags:
- name: Stacks
  description: Create, submit, sync, and merge stacked pull requests via the gt CLI.
paths:
  /stacks/branches:
    post:
      operationId: createBranch
      tags:
      - Stacks
      summary: Create a stacked branch
      description: 'Logical representation of `gt create`: create a new branch stacked on the current branch with committed changes.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBranchRequest'
      responses:
        '201':
          description: Stacked branch created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Branch'
  /stacks/submit:
    post:
      operationId: submitStack
      tags:
      - Stacks
      summary: Submit a stack to GitHub
      description: 'Logical representation of `gt submit`: push stacked branches to GitHub and create or update their pull requests.'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
      responses:
        '200':
          description: Pull requests created or updated.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PullRequest'
  /stacks/sync:
    post:
      operationId: syncStack
      tags:
      - Stacks
      summary: Sync branches with remote
      description: 'Logical representation of `gt sync`: pull from remote, delete merged PRs, and restack local branches.'
      responses:
        '200':
          description: Local stack synced with remote.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SyncResult'
components:
  schemas:
    CreateBranchRequest:
      type: object
      properties:
        name:
          type: string
        message:
          type: string
          description: Commit message for the new branch.
        all:
          type: boolean
          description: Stage all changes before committing.
      required:
      - name
    SubmitRequest:
      type: object
      properties:
        stack:
          type: boolean
          description: Submit the entire stack rather than only the current branch.
        draft:
          type: boolean
        publish:
          type: boolean
    PullRequest:
      type: object
      properties:
        number:
          type: integer
        title:
          type: string
        branch:
          type: string
        url:
          type: string
          format: uri
        state:
          type: string
          enum:
          - draft
          - open
          - merged
          - closed
    Branch:
      type: object
      properties:
        name:
          type: string
        parent:
          type: string
          description: Parent branch in the stack.
        trunk:
          type: boolean
    SyncResult:
      type: object
      properties:
        restacked:
          type: array
          items:
            type: string
        deleted:
          type: array
          items:
            type: string
  securitySchemes:
    graphiteAuthToken:
      type: http
      scheme: bearer
      description: Graphite auth token registered via `gt auth`, used by the CLI to act on the user's behalf.