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

# List policy documents (Admin only - includes deleted)



## OpenAPI

````yaml /openapi.json get /policies/{policyId}/admin/documents
openapi: 3.0.0
info:
  title: Korint Documentation
  description: Korint API Documentation
  version: 1.0.0
  contact: {}
servers: []
security:
  - bearerAuth: []
tags: []
paths:
  /policies/{policyId}/admin/documents:
    get:
      tags:
        - policy
      summary: List policy documents (Admin only - includes deleted)
      operationId: PolicyController_listPolicyDocumentsAdmin
      parameters:
        - name: policyId
          required: true
          in: path
          description: the policy id
          schema:
            type: string
        - name: whenAt
          required: false
          in: query
          description: 'Optional: the whenAt datetime'
          schema:
            type: string
        - name: simulatedAt
          required: false
          in: query
          description: 'Optional: the simulatedAt datetime'
          schema:
            type: string
        - name: branchId
          required: false
          in: query
          description: 'Optional: the branchId'
          schema:
            type: string
        - name: archived
          required: false
          in: query
          description: Are documents archives
          schema:
            type: boolean
        - name: onlyOnBranch
          required: false
          in: query
          description: Are documents only on branch
          schema:
            type: boolean
        - name: includeDeleted
          required: false
          in: query
          description: Include deleted documents
          schema:
            type: boolean
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListPolicyDocumentsOutput'
        '403':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/ForbiddenErrorDto'
              examples:
                FORBIDDEN:
                  $ref: '#/components/schemas/ForbiddenErrorDto'
          description: ''
        '404':
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/PolicyNotFoundErrorDto'
              examples:
                POLICY_NOT_FOUND:
                  $ref: '#/components/schemas/PolicyNotFoundErrorDto'
          description: ''
components:
  schemas:
    ListPolicyDocumentsOutput:
      type: object
      properties:
        data:
          description: the list of items in the page
          type: array
          items:
            $ref: '#/components/schemas/PolicyDocumentsDto'
        pageInfo:
          description: the page info
          allOf:
            - $ref: '#/components/schemas/ResponsePageInfo'
        totalCount:
          type: number
          description: the total number of items
        currentPage:
          type: number
          description: the current page
        totalPages:
          type: number
          description: the total number of pages
      required:
        - data
        - pageInfo
        - totalCount
        - currentPage
        - totalPages
    ForbiddenErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - FORBIDDEN
        message:
          type: string
          example: Forbidden
        details:
          $ref: '#/components/schemas/ForbiddenDetailsDto'
      required:
        - code
        - message
        - details
    PolicyNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - POLICY_NOT_FOUND
        message:
          type: string
          example: Policy {policyId} ({branchId}) not found
        details:
          $ref: '#/components/schemas/PolicyNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    PolicyDocumentsDto:
      type: object
      properties:
        metadata:
          description: metadata assigned to the object
          type: array
          items:
            $ref: '#/components/schemas/Metadata'
        id:
          type: string
          description: the id of the document
        name:
          type: string
          description: the name of the document
        path:
          type: string
          description: the path from Korint CDNof the document
        createdAt:
          format: date-time
          type: string
          description: the date of creation of the document
        signedUrl:
          type: string
          description: the signed url to download the document
        isSigned:
          type: boolean
          description: Is the document signed ?
      required:
        - metadata
        - id
        - name
        - path
        - createdAt
        - signedUrl
    ResponsePageInfo:
      type: object
      properties:
        first:
          type: boolean
          description: whether this is the first page
        last:
          type: boolean
          description: whether this is the last page
    ForbiddenDetailsDto:
      type: object
      properties:
        message:
          type: string
        documentKey:
          type: string
        userId:
          type: string
        ownerId:
          type: string
      required:
        - message
        - documentKey
        - userId
        - ownerId
    PolicyNotFoundDetailsDto:
      type: object
      properties:
        policyId:
          type: string
        branchId:
          type: string
        whenAt:
          type: string
        simulatedAt:
          type: string
      required:
        - policyId
    Metadata:
      type: object
      properties:
        key:
          type: string
          description: the key of the metadata
        value:
          type: string
          description: the value of the metadata
      required:
        - key
        - value

````