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

# Delete policy documents by id.



## OpenAPI

````yaml /openapi.json delete /policies/{policyId}/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}/documents:
    delete:
      tags:
        - policy
      summary: Delete policy documents by id.
      operationId: PolicyController_deletePolicyDocuments
      parameters:
        - name: policyId
          required: true
          in: path
          schema:
            type: string
        - name: ids
          required: true
          in: query
          description: the document ids to delete
          schema:
            type: array
            items:
              type: string
        - name: branchId
          required: false
          in: query
          schema:
            type: string
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeletePolicyDocumentsOutput'
        '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'
                  - $ref: '#/components/schemas/DocumentNotFoundErrorDto'
              examples:
                POLICY_NOT_FOUND:
                  $ref: '#/components/schemas/PolicyNotFoundErrorDto'
                DOCUMENT_NOT_FOUND:
                  $ref: '#/components/schemas/DocumentNotFoundErrorDto'
          description: ''
components:
  schemas:
    DeletePolicyDocumentsOutput:
      type: object
      properties: {}
    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
    DocumentNotFoundErrorDto:
      type: object
      properties:
        code:
          type: string
          enum:
            - DOCUMENT_NOT_FOUND
        message:
          type: string
          example: Document {id} not found ({policyId})
        details:
          $ref: '#/components/schemas/DocumentNotFoundDetailsDto'
      required:
        - code
        - message
        - details
    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
    DocumentNotFoundDetailsDto:
      type: object
      properties:
        id:
          type: string
        policyId:
          type: string
      required:
        - id

````