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

# Patch Data Retention

> PATCH /settings/data-retention — update data policy (admin or owner).



## OpenAPI

````yaml /openapi.json patch /v1/settings/data-retention
openapi: 3.1.0
info:
  description: Causeloop Platform Backend
  title: Causeloop API
  version: 1.0.0
servers: []
security: []
paths:
  /v1/settings/data-retention:
    patch:
      tags:
        - settings
      summary: Patch Data Retention
      description: PATCH /settings/data-retention — update data policy (admin or owner).
      operationId: patch_data_retention_v1_settings_data_retention_patch
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DataRetentionPolicyPatch'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema: {}
          description: Successful Response
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    DataRetentionPolicyPatch:
      properties:
        activity_retention_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Activity Retention Days
        anonymize_reporters:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Anonymize Reporters
        audit_log_retention_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Audit Log Retention Days
        hash_ids:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Hash Ids
        include_ip_in_audit:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Include Ip In Audit
        issue_retention_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Issue Retention Days
        pattern_retention_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Pattern Retention Days
        prompt_log_retention_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Prompt Log Retention Days
        scheduled_export_enabled:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Scheduled Export Enabled
        strip_pii:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Strip Pii
      title: DataRetentionPolicyPatch
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    HTTPBearer:
      scheme: bearer
      type: http

````