> ## 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 a retention policy



## OpenAPI

````yaml /api-reference/openapi.json put /v1/retention-policies/{policy_id}
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/retention-policies/{policy_id}:
    put:
      tags:
        - retention-policies
      summary: Update a retention policy
      operationId: updateRetentionPolicy
      parameters:
        - name: policy_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Policy Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RetentionPolicyUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/src__conversation__schemas__RetentionPolicyResponse
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    RetentionPolicyUpdate:
      properties:
        name:
          anyOf:
            - type: string
            - type: 'null'
          title: Name
        turn_retention_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Turn Retention Days
        session_retention_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Session Retention Days
        archive_strategy:
          anyOf:
            - type: string
              enum:
                - soft_delete
                - hard_delete
            - type: 'null'
          title: Archive Strategy
        is_default:
          anyOf:
            - type: boolean
            - type: 'null'
          title: Is Default
      type: object
      title: RetentionPolicyUpdate
    src__conversation__schemas__RetentionPolicyResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        organization_id:
          type: string
          format: uuid
          title: Organization Id
        name:
          type: string
          title: Name
        turn_retention_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Turn Retention Days
        session_retention_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Session Retention Days
        archive_strategy:
          type: string
          enum:
            - soft_delete
            - hard_delete
          title: Archive Strategy
        is_default:
          type: boolean
          title: Is Default
        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
        - name
        - archive_strategy
        - is_default
        - created_at
        - updated_at
      title: RetentionPolicyResponse
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
        message:
          type: string
          title: Message
      type: object
      required:
        - error
        - message
      title: ErrorResponse
      description: Standard error response returned by all API error handlers.
    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

````