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

# Update the org's KB audit retention policy / legal hold



## OpenAPI

````yaml /api-reference/openapi.json put /v1/knowledge-base/retention-policy
openapi: 3.1.0
info:
  title: Feather API
  description: >-
    Unified customer experience platform API. Manages identity, conversations,
    memory, agents, procedures, policies, model routing, knowledge bases,
    integrations, and runtime execution.
  version: 1.21.0
servers:
  - url: https://api-sandbox.featherhq.com
    description: Sandbox
  - url: http://localhost:8000
    description: Local dev
security: []
paths:
  /v1/knowledge-base/retention-policy:
    put:
      tags:
        - knowledge-base-governance
      summary: Update the org's KB audit retention policy / legal hold
      operationId: updateKBAuditRetentionPolicy
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetentionPolicyUpdateRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/src__knowledge_base__governance_schemas__RetentionPolicyResponse
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    RetentionPolicyUpdateRequest:
      properties:
        retention_days:
          anyOf:
            - type: integer
              minimum: 90
            - type: 'null'
          title: Retention Days
        legal_hold_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Legal Hold Enabled
        legal_hold_reason:
          anyOf:
            - type: string
              maxLength: 500
            - type: 'null'
          title: Legal Hold Reason
        archive_before_delete:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Archive Before Delete
        archive_destination:
          anyOf:
            - type: string
              maxLength: 255
            - type: 'null'
          title: Archive Destination
      additionalProperties: false
      type: object
      title: RetentionPolicyUpdateRequest
      description: |-
        PUT body for the retention policy. ``retention_days`` floor is enforced
        both here (422 at the edge) and in the service (defense in depth).
    src__knowledge_base__governance_schemas__RetentionPolicyResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        organization_id:
          type: string
          format: uuid
          title: Organization Id
        retention_days:
          type: integer
          title: Retention Days
        legal_hold_enabled:
          type: boolean
          title: Legal Hold Enabled
        legal_hold_reason:
          anyOf:
            - type: string
            - type: 'null'
          title: Legal Hold Reason
        legal_hold_set_by:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Legal Hold Set By
        legal_hold_set_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Legal Hold Set At
        archive_before_delete:
          type: boolean
          title: Archive Before Delete
        archive_destination:
          anyOf:
            - type: string
            - type: 'null'
          title: Archive Destination
        policy_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Policy Version
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - organization_id
        - retention_days
        - legal_hold_enabled
        - archive_before_delete
        - created_at
        - updated_at
      title: RetentionPolicyResponse
      description: Org audit-retention policy + legal-hold state.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: x-api-key

````