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

# List archived branches

> List deleted and merged branches that can be restored within their 30-day retention window. `status` says which.



## OpenAPI

````yaml api-reference/agents/openapi.json GET /v1/agents/{agentId}/branches/archive
openapi: 3.1.0
info:
  title: PolyAI Agents API
  version: 1.0.11
  description: Manage PolyAI agents, telephony, deployments, and real-time configs.
servers:
  - url: https://api.us.poly.ai
    description: US region
  - url: https://api.eu.poly.ai
    description: EU region
  - url: https://api.uk.poly.ai
    description: UK region
  - url: https://api.studio.poly.ai
    description: Studio region
security:
  - polyApiKey: []
paths:
  /v1/agents/{agentId}/branches/archive:
    parameters:
      - name: agentId
        in: path
        required: true
        schema:
          type: string
    get:
      tags:
        - Branches
      summary: List archived branches
      description: >-
        List deleted and merged branches that can be restored within their
        30-day retention window. `status` says which.
      responses:
        '200':
          description: Archived branches
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListArchivedBranchesPublicResponse'
        '404':
          description: Deployment simplification not enabled
components:
  schemas:
    ListArchivedBranchesPublicResponse:
      type: object
      title: ListArchivedBranchesPublicResponse
      description: Deleted and merged branches that can be restored within 30 days.
      properties:
        branches:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              accountId:
                type: string
              projectId:
                type: string
              branchId:
                type: string
              createdBy:
                type:
                  - string
                  - 'null'
              archivedAt:
                type: string
              daysLeft:
                type: number
              tag:
                type:
                  - string
                  - 'null'
              parentBranchId:
                type:
                  - string
                  - 'null'
              status:
                type: string
                enum:
                  - merged
                  - deleted
                description: Whether the branch was merged or deleted.
            required:
              - id
              - name
              - accountId
              - projectId
              - branchId
              - createdBy
              - archivedAt
              - daysLeft
              - tag
              - parentBranchId
              - status
            additionalProperties: false
      required:
        - branches
      additionalProperties: false
  securitySchemes:
    polyApiKey:
      type: apiKey
      in: header
      name: X-API-KEY

````