> ## 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.

# Plan an entity-level extraction into a new sibling branch

> Persists a frozen server-derived plan. This endpoint does not create a branch or move changes.



## OpenAPI

````yaml /openapi/customer-api.json post /project/{projectId}/branch/{branchId}/extraction-plans
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/{branchId}/extraction-plans:
    post:
      tags:
        - Branches
      summary: Plan an entity-level extraction into a new sibling branch
      description: >-
        Persists a frozen server-derived plan. This endpoint does not create a
        branch or move changes.
      operationId: BranchExtractionController_create
      parameters:
        - in: path
          name: projectId
          required: true
          schema:
            type: string
        - in: path
          name: branchId
          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/CreateBranchExtractionPlanDto'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BranchExtractionPlanResponseDto'
          description: ''
        '400':
          description: >-
            Exactly one supported selector is required, and every manually
            selected entity must be changed.
        '401':
          description: ''
        '404':
          description: Source branch was not found.
      security:
        - api-key: []
        - bearer: []
components:
  schemas:
    CreateBranchExtractionPlanDto:
      properties:
        entity_ids:
          items:
            type: string
          maxItems: 500
          minItems: 1
          type: array
        selector:
          enum:
            - non_variant
          type: string
      type: object
    BranchExtractionPlanResponseDto:
      properties:
        counts:
          $ref: '#/components/schemas/BranchExtractionPlanCountsDto'
        created_at:
          format: date-time
          type: string
        entities:
          items:
            $ref: '#/components/schemas/BranchExtractionPlanMembershipDto'
          type: array
        expires_at:
          format: date-time
          type: string
        id:
          type: string
        project_id:
          type: string
        proposed_destination_name:
          type: string
        selector:
          enum:
            - entities
            - non_variant
          type: string
        source_branch_id:
          type: string
        source_snapshot_seq_id:
          description: Frozen global diff watermark.
          type: string
        status:
          enum:
            - ready
            - stale
            - expired
            - consumed
          type: string
      required:
        - id
        - project_id
        - source_branch_id
        - selector
        - status
        - proposed_destination_name
        - counts
        - entities
        - source_snapshot_seq_id
        - created_at
        - expires_at
      type: object
    BranchExtractionPlanCountsDto:
      properties:
        additionally_affected:
          type: number
        diffs:
          description: Bigint-safe ordered source row count.
          type: string
        required:
          type: number
        selected:
          type: number
      required:
        - selected
        - required
        - additionally_affected
        - diffs
      type: object
    BranchExtractionPlanMembershipDto:
      properties:
        entity_id:
          type: string
        reason_entity_id:
          nullable: true
          type: string
        role:
          enum:
            - selected
            - required
            - additionally_affected
          type: string
      required:
        - entity_id
        - role
        - reason_entity_id
      type: object
  securitySchemes:
    api-key:
      in: header
      name: X-API-Key
      type: apiKey
    bearer:
      bearerFormat: JWT
      scheme: bearer
      type: http

````