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

# Update schedules configuration

> Updates schedule retention configuration.



## OpenAPI

````yaml https://raw.githubusercontent.com/InsForge/InsForge/main/openapi/schedules.yaml patch /api/schedules/config
openapi: 3.0.3
info:
  title: Insforge Schedules API
  version: 1.0.0
  description: Schedule management endpoints
servers: []
security: []
paths:
  /api/schedules/config:
    patch:
      tags:
        - Admin
      summary: Update schedules configuration
      description: Updates schedule retention configuration.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateSchedulesConfigRequest'
      responses:
        '200':
          description: Configuration updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    UpdateSchedulesConfigRequest:
      type: object
      required:
        - retentionDays
      properties:
        retentionDays:
          type: integer
          minimum: 1
          nullable: true
    ErrorResponse:
      type: object
      required:
        - error
        - message
        - statusCode
      properties:
        error:
          type: string
        message:
          type: string
        statusCode:
          type: integer
        nextActions:
          type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````