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

# List deleted branches

> One page of branches created after this update was deployed and then soft-deleted, whether discarded through the delete endpoint (merged_at null) or archived by a merge (merged_at set), newest archive first. A page holds at most 200 rows (pass a smaller limit to take fewer); to continue, pass the cursor of the last row shown as `before`. `search` keeps only names containing the text, ignoring case. Every merge archives its branch, so pass merged=false to list only discarded branches, or merged=true only merged ones. Each row is a candidate for the restore preview and the restore endpoint.



## OpenAPI

````yaml /openapi/customer-api.json get /project/{projectId}/branch/archived
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/archived:
    get:
      tags:
        - Branches
      summary: List deleted branches
      description: >-
        One page of branches created after this update was deployed and then
        soft-deleted, whether discarded through the delete endpoint (merged_at
        null) or archived by a merge (merged_at set), newest archive first. A
        page holds at most 200 rows (pass a smaller limit to take fewer); to
        continue, pass the cursor of the last row shown as `before`. `search`
        keeps only names containing the text, ignoring case. Every merge
        archives its branch, so pass merged=false to list only discarded
        branches, or merged=true only merged ones. Each row is a candidate for
        the restore preview and the restore endpoint.
      operationId: BranchController_findArchived
      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: query
          name: limit
          required: false
          schema:
            type: number
        - description: >-
            false lists only discarded branches, true only merged ones; omitted
            lists both.
          in: query
          name: merged
          required: false
          schema:
            type: boolean
        - description: >-
            Case-insensitive substring of the branch name; omitted or blank
            lists every deleted branch.
          in: query
          name: search
          required: false
          schema:
            type: string
        - description: >-
            The `cursor` of the last row already shown; returns the page after
            it. Omit for the first page.
          in: query
          name: before
          required: false
          schema:
            type: string
        - description: Workspace identifier
          in: header
          name: customer
          required: true
          schema:
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/DeletedBranchListRowDto'
                type: array
          description: ''
      security:
        - api-key: []
        - bearer: []
components:
  schemas:
    DeletedBranchListRowDto:
      properties:
        cursor:
          description: >-
            Pass as `before` to fetch the page after this row. Opaque; valid
            only as handed out.
          type: string
        deleted_at:
          description: >-
            When the branch was archived: the merge time for a merged branch,
            the delete time for a discarded one.
          type: string
        deleted_by_id:
          description: >-
            Who deleted a discarded branch. Null for a merged branch: the merge
            does not record its actor on the row.
          nullable: true
          type: string
        id:
          type: string
        merged_at:
          description: >-
            Set when a merge archived the branch; null when it was discarded
            through the delete endpoint.
          nullable: true
          type: string
        name:
          type: string
        number:
          description: Project-scoped branch number.
          type: number
        parent_id:
          nullable: true
          type: string
        parent_name:
          description: Name of the parent branch; null when the parent is Base.
          nullable: true
          type: string
      required:
        - id
        - number
        - name
        - parent_id
        - parent_name
        - merged_at
        - deleted_at
        - deleted_by_id
        - cursor
      type: object
  securitySchemes:
    api-key:
      in: header
      name: X-API-Key
      type: apiKey
    bearer:
      bearerFormat: JWT
      scheme: bearer
      type: http

````