> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowengineering.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Revert a baseline by proposing an inverse-diff branch

> Creates a new branch off the baseline's target branch containing diffs that undo the baseline's changes when rolled up, and returns that branch. Review and merge it to apply the revert. Non-destructive: the original history is untouched, so any baseline can be reverted. Pass entity_id to undo only one item's part of the merge.



## OpenAPI

````yaml /openapi/customer-api.json post /project/{projectId}/branch/baseline/{baselineId}/revert
openapi: 3.0.0
info:
  contact: {}
  description: >-
    Flow customer API reference. Start with the [quickstart](/api/quickstart)
    and [authentication guide](/api/authentication).
  title: Customer API
  version: 1.0.0
servers:
  - description: Flow API
    url: https://backend.branch.flowengineering.com
security: []
tags:
  - name: Automations
  - name: Branches
  - name: Comments
  - name: Convert
  - name: Data Model
  - name: Diagrams
  - name: Entities
  - name: Files
  - name: Import
  - name: Notifications
  - name: Projects
  - name: ReqIF
  - name: ReqIF Import
  - name: Shared Access Grants
  - name: User Groups
  - name: Users
paths:
  /project/{projectId}/branch/baseline/{baselineId}/revert:
    post:
      tags:
        - Branches
      summary: Revert a baseline by proposing an inverse-diff branch
      description: >-
        Creates a new branch off the baseline's target branch containing diffs
        that undo the baseline's changes when rolled up, and returns that
        branch. Review and merge it to apply the revert. Non-destructive: the
        original history is untouched, so any baseline can be reverted. Pass
        entity_id to undo only one item's part of the merge.
      operationId: BranchController_revertBaseline
      parameters:
        - in: path
          name: projectId
          required: true
          schema:
            description: >-
              Project UUID, not a slug. Resolve a slug with GET
              /project/slug/{slug} using the same workspace and credentials,
              then pass the returned id.
            type: string
        - in: path
          name: baselineId
          required: true
          schema:
            type: string
        - description: Workspace identifier
          in: header
          name: customer
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RevertBaselineDto'
        required: false
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BranchCreatedDto'
          description: ''
      security:
        - api-key: []
        - bearer: []
components:
  schemas:
    RevertBaselineDto:
      properties:
        entity_id:
          description: >-
            Narrow the revert to one item the baseline changed. The proposed
            branch then undoes only that item's part of the merge — its fields,
            its links at either end, and its child order. Omit to revert the
            whole baseline. The id must be one the baseline actually changed;
            any other id is rejected.
          maxLength: 255
          type: string
      type: object
    BranchCreatedDto:
      properties:
        id:
          type: string
        number:
          type: number
      required:
        - id
        - number
      type: object
  securitySchemes:
    api-key:
      in: header
      name: X-API-Key
      type: apiKey
    bearer:
      bearerFormat: JWT
      scheme: bearer
      type: http

````