---
updatedAt: 2026-04-20T21:51:23.000Z
agentTools:
  siteIndex: https://developers.pismo.io/llms.txt
  projectIndex: https://developers.pismo.io/pismo-docs/llms.txt
---

# Create program calendar strategy

Create a program calendar strategy.

Program calendar strategies provide new methods of calendar creation. For example, in the `FIXED_CYCLE_CLOSING` strategy, the `cycle_closing_date` of the calendar is fixed, but the due date is dynamic. The due date is calculated from the values set in the `configuration` object.

This endpoint generates a [Program calendar strategy created](https://developers.pismo.io/events/docs/balance-program-calendar-strategy-created-1) event.

<b>Note:</b> This endpoint cannot be used to create a [fixed due date calendar](doc:fixed-due-date-calendars).


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Revolving credit - Calendar management",
    "description": "Endpoints to handle calendars",
    "termsOfService": "https://developers.pismo.io/terms/",
    "version": "1.0.0",
    "contact": {
      "name": "API Support",
      "url": "https://developers.pismo.io/support/"
    },
    "license": {
      "name": "Copyright Pismo"
    }
  },
  "servers": [
    {
      "url": "https://sandbox.pismolabs.io/calendar-management",
      "description": "Sandbox API server for testing"
    }
  ],
  "tags": [
    {
      "name": "Program calendar strategies",
      "description": "Endpoints for program calendar strategies"
    }
  ],
  "components": {
    "parameters": {
      "CorrelationIdHeader": {
        "in": "header",
        "name": "x-cid",
        "description": "The Correlation Identifier field is used to link related API requests and events. The x-cid can help the Pismo engineering team track everything related to a call. You can find the x-cid field in the response header of an API endpoint call.\nIf the x-cid value isn't passed, one is automatically generated.\n",
        "schema": {
          "type": "string",
          "example": "5bb05174-4e80-11ea-b77f-2e728ce88125"
        }
      },
      "ProgramIdPath": {
        "name": "programId",
        "in": "path",
        "description": "Program ID",
        "required": true,
        "style": "simple",
        "schema": {
          "type": "integer",
          "format": "int64",
          "example": 6912345
        }
      }
    },
    "schemas": {
      "Active": {
        "type": "boolean",
        "description": "Is the program calendar strategy active?",
        "default": true,
        "example": true
      },
      "CreatedAt": {
        "type": "string",
        "format": "date-time",
        "description": "Datetime program calendar strategy was created. Format = YYYY-MM-DDTHH:MM:SS:MM.",
        "example": "2024-09-12T16:46:16.43663522"
      },
      "CycleClosingDay": {
        "type": "integer",
        "format": "int32",
        "description": "Day of the month for the cycle closing. Must be in the range 1 to 28.",
        "example": 10
      },
      "DaysBetweenCycleClosingAndDueDate": {
        "type": "integer",
        "format": "int32",
        "description": "Number of days between cycle closing and due date",
        "example": 5
      },
      "DueDay": {
        "type": "integer",
        "format": "int32",
        "description": "Day of the month for the due date. Must be in the range 1 to 28.",
        "minimum": 1,
        "maximum": 28,
        "example": 20
      },
      "EveryXMonths": {
        "type": "integer",
        "format": "int32",
        "description": "Interval in months between cycles. Must be between 1 and 12. Defaults to 1.",
        "minimum": 1,
        "maximum": 12,
        "default": 1,
        "example": 1
      },
      "EveryXWeeks": {
        "type": "integer",
        "format": "int32",
        "description": "Interval in weeks between cycles. Must be between 1 and 52. Defaults to 1.",
        "minimum": 1,
        "maximum": 52,
        "default": 1,
        "example": 2
      },
      "EveryXDays": {
        "type": "integer",
        "format": "int32",
        "description": "Interval in days between cycles. Must be between 1 and 365. Defaults to 1.",
        "minimum": 1,
        "maximum": 365,
        "default": 1,
        "example": 7
      },
      "DayOfWeek": {
        "type": "string",
        "description": "Day of the week.",
        "enum": [
          "MONDAY",
          "TUESDAY",
          "WEDNESDAY",
          "THURSDAY",
          "FRIDAY",
          "SATURDAY",
          "SUNDAY"
        ],
        "example": "FRIDAY"
      },
      "WeekOfMonth": {
        "type": "integer",
        "format": "int32",
        "description": "Week of the month. 1 = first, 2 = second, 3 = third, 4 = fourth, 5 = last.",
        "minimum": 1,
        "maximum": 5,
        "example": 3
      },
      "NthSpecificWeekday": {
        "type": "object",
        "description": "Nth specific weekday of the month (e.g. 3rd Friday). Mutually exclusive with fixed day fields.",
        "required": [
          "day_of_week",
          "week_of_month"
        ],
        "properties": {
          "day_of_week": {
            "$ref": "#/components/schemas/DayOfWeek"
          },
          "week_of_month": {
            "$ref": "#/components/schemas/WeekOfMonth"
          }
        },
        "example": {
          "day_of_week": "FRIDAY",
          "week_of_month": 3
        }
      },
      "ErrorCode": {
        "type": "string",
        "description": "Error code",
        "example": "EX0001"
      },
      "CreateOrPatchProgramCalendarStrategyRequestDto": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/FIXED_CYCLE_CLOSING"
          },
          {
            "$ref": "#/components/schemas/MONTHLY_CYCLE_CLOSING"
          },
          {
            "$ref": "#/components/schemas/MONTHLY_DUE_DATE"
          },
          {
            "$ref": "#/components/schemas/WEEKLY_CYCLE_CLOSING"
          },
          {
            "$ref": "#/components/schemas/WEEKLY_DUE_DATE"
          },
          {
            "$ref": "#/components/schemas/DAILY_CYCLE_CLOSING"
          },
          {
            "$ref": "#/components/schemas/DAILY_DUE_DATE"
          }
        ],
        "discriminator": {
          "propertyName": "strategy",
          "mapping": {
            "FIXED_CYCLE_CLOSING": "#/components/schemas/FIXED_CYCLE_CLOSING_response",
            "MONTHLY_CYCLE_CLOSING": "#/components/schemas/MONTHLY_CYCLE_CLOSING_response",
            "MONTHLY_DUE_DATE": "#/components/schemas/MONTHLY_DUE_DATE_response",
            "WEEKLY_CYCLE_CLOSING": "#/components/schemas/WEEKLY_CYCLE_CLOSING_response",
            "WEEKLY_DUE_DATE": "#/components/schemas/WEEKLY_DUE_DATE_response",
            "DAILY_CYCLE_CLOSING": "#/components/schemas/DAILY_CYCLE_CLOSING_response",
            "DAILY_DUE_DATE": "#/components/schemas/DAILY_DUE_DATE_response"
          }
        }
      },
      "CreateProgramOrPatchCalendarStrategyResponseDto": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/FIXED_CYCLE_CLOSING_response"
          },
          {
            "$ref": "#/components/schemas/MONTHLY_CYCLE_CLOSING_response"
          },
          {
            "$ref": "#/components/schemas/MONTHLY_DUE_DATE_response"
          },
          {
            "$ref": "#/components/schemas/WEEKLY_CYCLE_CLOSING_response"
          },
          {
            "$ref": "#/components/schemas/WEEKLY_DUE_DATE_response"
          },
          {
            "$ref": "#/components/schemas/DAILY_CYCLE_CLOSING_response"
          },
          {
            "$ref": "#/components/schemas/DAILY_DUE_DATE_response"
          }
        ],
        "discriminator": {
          "propertyName": "strategy",
          "mapping": {
            "FIXED_CYCLE_CLOSING": "#/components/schemas/FIXED_CYCLE_CLOSING_response",
            "MONTHLY_CYCLE_CLOSING": "#/components/schemas/MONTHLY_CYCLE_CLOSING_response",
            "MONTHLY_DUE_DATE": "#/components/schemas/MONTHLY_DUE_DATE_response",
            "WEEKLY_CYCLE_CLOSING": "#/components/schemas/WEEKLY_CYCLE_CLOSING_response",
            "WEEKLY_DUE_DATE": "#/components/schemas/WEEKLY_DUE_DATE_response",
            "DAILY_CYCLE_CLOSING": "#/components/schemas/DAILY_CYCLE_CLOSING_response",
            "DAILY_DUE_DATE": "#/components/schemas/DAILY_DUE_DATE_response"
          }
        }
      },
      "FIXED_CYCLE_CLOSING": {
        "title": "Fixed cycle closing strategy",
        "description": "Cycle closing date is fixed. Due date is dynamic.",
        "type": "object",
        "required": [
          "configuration"
        ],
        "properties": {
          "strategy": {
            "type": "string",
            "description": "Program calendar strategy",
            "enum": [
              "FIXED_CYCLE_CLOSING"
            ]
          },
          "configuration": {
            "type": "object",
            "required": [
              "cycle_closing_day",
              "days_between_cycle_closing_and_due_date"
            ],
            "properties": {
              "cycle_closing_day": {
                "$ref": "#/components/schemas/CycleClosingDay"
              },
              "days_between_cycle_closing_and_due_date": {
                "$ref": "#/components/schemas/DaysBetweenCycleClosingAndDueDate"
              }
            }
          },
          "active": {
            "$ref": "#/components/schemas/Active"
          }
        }
      },
      "FIXED_CYCLE_CLOSING_response": {
        "title": "Fixed cycle closing strategy",
        "description": "Cycle closing date is fixed. Due date is dynamic.",
        "type": "object",
        "properties": {
          "program_calendar_strategy_id": {
            "$ref": "#/components/schemas/ProgramCalendarStrategyId"
          },
          "program_id": {
            "$ref": "#/components/schemas/ProgramId"
          },
          "created_at": {
            "$ref": "#/components/schemas/CreatedAt"
          },
          "updated_at": {
            "$ref": "#/components/schemas/UpdatedAt"
          },
          "strategy": {
            "$ref": "#/components/schemas/FixedCycleClosingStrategy"
          },
          "configuration": {
            "type": "object",
            "properties": {
              "cycle_closing_day": {
                "$ref": "#/components/schemas/CycleClosingDay"
              },
              "days_between_cycle_closing_and_due_date": {
                "$ref": "#/components/schemas/DaysBetweenCycleClosingAndDueDate"
              }
            }
          },
          "active": {
            "$ref": "#/components/schemas/Active"
          }
        }
      },
      "FixedCycleClosingStrategy": {
        "type": "string",
        "description": "Program calendar strategy",
        "enum": [
          "FIXED_CYCLE_CLOSING"
        ]
      },
      "ProgramId": {
        "type": "integer",
        "description": "Program ID",
        "format": "int64",
        "example": 1122
      },
      "MONTHLY_CYCLE_CLOSING": {
        "title": "Monthly cycle closing strategy",
        "description": "Cycle closes on a fixed day or Nth weekday each month. Due date is derived forward from the close date.\nEither `cycle_closing_day` or `nth_specific_weekday` must be provided — not both.\n",
        "type": "object",
        "required": [
          "configuration"
        ],
        "properties": {
          "strategy": {
            "type": "string",
            "description": "Program calendar strategy",
            "enum": [
              "MONTHLY_CYCLE_CLOSING"
            ]
          },
          "configuration": {
            "type": "object",
            "required": [
              "days_between_cycle_closing_and_due_date"
            ],
            "properties": {
              "cycle_closing_day": {
                "$ref": "#/components/schemas/CycleClosingDay"
              },
              "nth_specific_weekday": {
                "$ref": "#/components/schemas/NthSpecificWeekday"
              },
              "every_x_months": {
                "$ref": "#/components/schemas/EveryXMonths"
              },
              "days_between_cycle_closing_and_due_date": {
                "$ref": "#/components/schemas/DaysBetweenCycleClosingAndDueDate"
              }
            },
            "example": {
              "cycle_closing_day": 15,
              "every_x_months": 1,
              "days_between_cycle_closing_and_due_date": 10
            }
          },
          "active": {
            "$ref": "#/components/schemas/Active"
          }
        }
      },
      "MONTHLY_CYCLE_CLOSING_response": {
        "title": "Monthly cycle closing strategy",
        "description": "Cycle closes on a fixed day or Nth weekday each month. Due date is derived forward from the close date.",
        "type": "object",
        "properties": {
          "program_calendar_strategy_id": {
            "$ref": "#/components/schemas/ProgramCalendarStrategyId"
          },
          "program_id": {
            "$ref": "#/components/schemas/ProgramId"
          },
          "created_at": {
            "$ref": "#/components/schemas/CreatedAt"
          },
          "updated_at": {
            "$ref": "#/components/schemas/UpdatedAt"
          },
          "strategy": {
            "type": "string",
            "description": "Program calendar strategy",
            "enum": [
              "MONTHLY_CYCLE_CLOSING"
            ]
          },
          "configuration": {
            "type": "object",
            "properties": {
              "cycle_closing_day": {
                "$ref": "#/components/schemas/CycleClosingDay"
              },
              "nth_specific_weekday": {
                "$ref": "#/components/schemas/NthSpecificWeekday"
              },
              "every_x_months": {
                "$ref": "#/components/schemas/EveryXMonths"
              },
              "days_between_cycle_closing_and_due_date": {
                "$ref": "#/components/schemas/DaysBetweenCycleClosingAndDueDate"
              }
            }
          },
          "active": {
            "$ref": "#/components/schemas/Active"
          }
        }
      },
      "MONTHLY_DUE_DATE": {
        "title": "Monthly due date strategy",
        "description": "Due date falls on a fixed day or Nth weekday each month. Cycle close is derived backward from the due date.\nEither `due_day` or `nth_specific_weekday` must be provided — not both.\n",
        "type": "object",
        "required": [
          "configuration"
        ],
        "properties": {
          "strategy": {
            "type": "string",
            "description": "Program calendar strategy",
            "enum": [
              "MONTHLY_DUE_DATE"
            ]
          },
          "configuration": {
            "type": "object",
            "required": [
              "days_between_cycle_closing_and_due_date"
            ],
            "properties": {
              "due_day": {
                "$ref": "#/components/schemas/DueDay"
              },
              "nth_specific_weekday": {
                "$ref": "#/components/schemas/NthSpecificWeekday"
              },
              "every_x_months": {
                "$ref": "#/components/schemas/EveryXMonths"
              },
              "days_between_cycle_closing_and_due_date": {
                "$ref": "#/components/schemas/DaysBetweenCycleClosingAndDueDate"
              }
            },
            "example": {
              "due_day": 20,
              "every_x_months": 2,
              "days_between_cycle_closing_and_due_date": 10
            }
          },
          "active": {
            "$ref": "#/components/schemas/Active"
          }
        }
      },
      "MONTHLY_DUE_DATE_response": {
        "title": "Monthly due date strategy",
        "description": "Due date falls on a fixed day or Nth weekday each month. Cycle close is derived backward from the due date.",
        "type": "object",
        "properties": {
          "program_calendar_strategy_id": {
            "$ref": "#/components/schemas/ProgramCalendarStrategyId"
          },
          "program_id": {
            "$ref": "#/components/schemas/ProgramId"
          },
          "created_at": {
            "$ref": "#/components/schemas/CreatedAt"
          },
          "updated_at": {
            "$ref": "#/components/schemas/UpdatedAt"
          },
          "strategy": {
            "type": "string",
            "description": "Program calendar strategy",
            "enum": [
              "MONTHLY_DUE_DATE"
            ]
          },
          "configuration": {
            "type": "object",
            "properties": {
              "due_day": {
                "$ref": "#/components/schemas/DueDay"
              },
              "nth_specific_weekday": {
                "$ref": "#/components/schemas/NthSpecificWeekday"
              },
              "every_x_months": {
                "$ref": "#/components/schemas/EveryXMonths"
              },
              "days_between_cycle_closing_and_due_date": {
                "$ref": "#/components/schemas/DaysBetweenCycleClosingAndDueDate"
              }
            }
          },
          "active": {
            "$ref": "#/components/schemas/Active"
          }
        }
      },
      "WEEKLY_CYCLE_CLOSING": {
        "title": "Weekly cycle closing strategy",
        "description": "Cycle closes on a specific weekday every N weeks. Due date is derived forward from the close date.",
        "type": "object",
        "required": [
          "configuration"
        ],
        "properties": {
          "strategy": {
            "type": "string",
            "description": "Program calendar strategy",
            "enum": [
              "WEEKLY_CYCLE_CLOSING"
            ]
          },
          "configuration": {
            "type": "object",
            "required": [
              "day_of_week",
              "days_between_cycle_closing_and_due_date"
            ],
            "properties": {
              "day_of_week": {
                "$ref": "#/components/schemas/DayOfWeek"
              },
              "every_x_weeks": {
                "$ref": "#/components/schemas/EveryXWeeks"
              },
              "days_between_cycle_closing_and_due_date": {
                "$ref": "#/components/schemas/DaysBetweenCycleClosingAndDueDate"
              }
            },
            "example": {
              "day_of_week": "MONDAY",
              "every_x_weeks": 2,
              "days_between_cycle_closing_and_due_date": 5
            }
          },
          "active": {
            "$ref": "#/components/schemas/Active"
          }
        }
      },
      "WEEKLY_CYCLE_CLOSING_response": {
        "title": "Weekly cycle closing strategy",
        "description": "Cycle closes on a specific weekday every N weeks. Due date is derived forward from the close date.",
        "type": "object",
        "properties": {
          "program_calendar_strategy_id": {
            "$ref": "#/components/schemas/ProgramCalendarStrategyId"
          },
          "program_id": {
            "$ref": "#/components/schemas/ProgramId"
          },
          "created_at": {
            "$ref": "#/components/schemas/CreatedAt"
          },
          "updated_at": {
            "$ref": "#/components/schemas/UpdatedAt"
          },
          "strategy": {
            "type": "string",
            "description": "Program calendar strategy",
            "enum": [
              "WEEKLY_CYCLE_CLOSING"
            ]
          },
          "configuration": {
            "type": "object",
            "properties": {
              "day_of_week": {
                "$ref": "#/components/schemas/DayOfWeek"
              },
              "every_x_weeks": {
                "$ref": "#/components/schemas/EveryXWeeks"
              },
              "days_between_cycle_closing_and_due_date": {
                "$ref": "#/components/schemas/DaysBetweenCycleClosingAndDueDate"
              }
            }
          },
          "active": {
            "$ref": "#/components/schemas/Active"
          }
        }
      },
      "WEEKLY_DUE_DATE": {
        "title": "Weekly due date strategy",
        "description": "Due date falls on a specific weekday every N weeks. Cycle close is derived backward from the due date.",
        "type": "object",
        "required": [
          "configuration"
        ],
        "properties": {
          "strategy": {
            "type": "string",
            "description": "Program calendar strategy",
            "enum": [
              "WEEKLY_DUE_DATE"
            ]
          },
          "configuration": {
            "type": "object",
            "required": [
              "day_of_week",
              "days_between_cycle_closing_and_due_date"
            ],
            "properties": {
              "day_of_week": {
                "$ref": "#/components/schemas/DayOfWeek"
              },
              "every_x_weeks": {
                "$ref": "#/components/schemas/EveryXWeeks"
              },
              "days_between_cycle_closing_and_due_date": {
                "$ref": "#/components/schemas/DaysBetweenCycleClosingAndDueDate"
              }
            },
            "example": {
              "day_of_week": "FRIDAY",
              "every_x_weeks": 2,
              "days_between_cycle_closing_and_due_date": 5
            }
          },
          "active": {
            "$ref": "#/components/schemas/Active"
          }
        }
      },
      "WEEKLY_DUE_DATE_response": {
        "title": "Weekly due date strategy",
        "description": "Due date falls on a specific weekday every N weeks. Cycle close is derived backward from the due date.",
        "type": "object",
        "properties": {
          "program_calendar_strategy_id": {
            "$ref": "#/components/schemas/ProgramCalendarStrategyId"
          },
          "program_id": {
            "$ref": "#/components/schemas/ProgramId"
          },
          "created_at": {
            "$ref": "#/components/schemas/CreatedAt"
          },
          "updated_at": {
            "$ref": "#/components/schemas/UpdatedAt"
          },
          "strategy": {
            "type": "string",
            "description": "Program calendar strategy",
            "enum": [
              "WEEKLY_DUE_DATE"
            ]
          },
          "configuration": {
            "type": "object",
            "properties": {
              "day_of_week": {
                "$ref": "#/components/schemas/DayOfWeek"
              },
              "every_x_weeks": {
                "$ref": "#/components/schemas/EveryXWeeks"
              },
              "days_between_cycle_closing_and_due_date": {
                "$ref": "#/components/schemas/DaysBetweenCycleClosingAndDueDate"
              }
            }
          },
          "active": {
            "$ref": "#/components/schemas/Active"
          }
        }
      },
      "DAILY_CYCLE_CLOSING": {
        "title": "Daily cycle closing strategy",
        "description": "Cycle closes every N days. Due date is derived forward from the close date.",
        "type": "object",
        "required": [
          "configuration"
        ],
        "properties": {
          "strategy": {
            "type": "string",
            "description": "Program calendar strategy",
            "enum": [
              "DAILY_CYCLE_CLOSING"
            ]
          },
          "configuration": {
            "type": "object",
            "required": [
              "days_between_cycle_closing_and_due_date"
            ],
            "properties": {
              "every_x_days": {
                "$ref": "#/components/schemas/EveryXDays"
              },
              "days_between_cycle_closing_and_due_date": {
                "$ref": "#/components/schemas/DaysBetweenCycleClosingAndDueDate"
              }
            },
            "example": {
              "every_x_days": 7,
              "days_between_cycle_closing_and_due_date": 3
            }
          },
          "active": {
            "$ref": "#/components/schemas/Active"
          }
        }
      },
      "DAILY_CYCLE_CLOSING_response": {
        "title": "Daily cycle closing strategy",
        "description": "Cycle closes every N days. Due date is derived forward from the close date.",
        "type": "object",
        "properties": {
          "program_calendar_strategy_id": {
            "$ref": "#/components/schemas/ProgramCalendarStrategyId"
          },
          "program_id": {
            "$ref": "#/components/schemas/ProgramId"
          },
          "created_at": {
            "$ref": "#/components/schemas/CreatedAt"
          },
          "updated_at": {
            "$ref": "#/components/schemas/UpdatedAt"
          },
          "strategy": {
            "type": "string",
            "description": "Program calendar strategy",
            "enum": [
              "DAILY_CYCLE_CLOSING"
            ]
          },
          "configuration": {
            "type": "object",
            "properties": {
              "every_x_days": {
                "$ref": "#/components/schemas/EveryXDays"
              },
              "days_between_cycle_closing_and_due_date": {
                "$ref": "#/components/schemas/DaysBetweenCycleClosingAndDueDate"
              }
            }
          },
          "active": {
            "$ref": "#/components/schemas/Active"
          }
        }
      },
      "DAILY_DUE_DATE": {
        "title": "Daily due date strategy",
        "description": "Due date falls every N days. Cycle close is derived backward from the due date.",
        "type": "object",
        "required": [
          "configuration"
        ],
        "properties": {
          "strategy": {
            "type": "string",
            "description": "Program calendar strategy",
            "enum": [
              "DAILY_DUE_DATE"
            ]
          },
          "configuration": {
            "type": "object",
            "required": [
              "days_between_cycle_closing_and_due_date"
            ],
            "properties": {
              "every_x_days": {
                "$ref": "#/components/schemas/EveryXDays"
              },
              "days_between_cycle_closing_and_due_date": {
                "$ref": "#/components/schemas/DaysBetweenCycleClosingAndDueDate"
              }
            },
            "example": {
              "every_x_days": 7,
              "days_between_cycle_closing_and_due_date": 3
            }
          },
          "active": {
            "$ref": "#/components/schemas/Active"
          }
        }
      },
      "DAILY_DUE_DATE_response": {
        "title": "Daily due date strategy",
        "description": "Due date falls every N days. Cycle close is derived backward from the due date.",
        "type": "object",
        "properties": {
          "program_calendar_strategy_id": {
            "$ref": "#/components/schemas/ProgramCalendarStrategyId"
          },
          "program_id": {
            "$ref": "#/components/schemas/ProgramId"
          },
          "created_at": {
            "$ref": "#/components/schemas/CreatedAt"
          },
          "updated_at": {
            "$ref": "#/components/schemas/UpdatedAt"
          },
          "strategy": {
            "type": "string",
            "description": "Program calendar strategy",
            "enum": [
              "DAILY_DUE_DATE"
            ]
          },
          "configuration": {
            "type": "object",
            "properties": {
              "every_x_days": {
                "$ref": "#/components/schemas/EveryXDays"
              },
              "days_between_cycle_closing_and_due_date": {
                "$ref": "#/components/schemas/DaysBetweenCycleClosingAndDueDate"
              }
            }
          },
          "active": {
            "$ref": "#/components/schemas/Active"
          }
        }
      },
      "ProgramCalendarStrategyId": {
        "type": "integer",
        "description": "Program calendar strategy ID",
        "format": "int64",
        "example": 67854322
      },
      "StandardErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "$ref": "#/components/schemas/ErrorCode"
          },
          "message": {
            "type": "string",
            "description": "Error message",
            "example": "Internal error"
          }
        }
      },
      "UpdatedAt": {
        "type": "string",
        "format": "date-time",
        "description": "Datetime program calendar strategy was updated. Format = YYYY-MM-DDTHH:MM:SS:MM",
        "example": "2024-09-12T16:46:16.43663522"
      }
    },
    "responses": {
      "400BadRequest": {
        "description": "Bad request",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/StandardErrorResponse"
            },
            "examples": {
              "Missing request header": {
                "description": "Missing request header",
                "value": {
                  "code": "EX0002",
                  "message": "Missing request header for method parameter of type String"
                }
              }
            }
          }
        }
      },
      "500InternalServerError": {
        "description": "Internal server error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/StandardErrorResponse"
            },
            "examples": {
              "Internal Server Error": {
                "description": "Service is unavailable",
                "value": {
                  "code": "GN0001",
                  "message": "Service is unavailable"
                }
              }
            }
          }
        }
      }
    },
    "securitySchemes": {
      "BearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "Account access token. Tokens can expire quickly, which can result in an \"Unauthorized\" error.",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "BearerAuth": []
    }
  ],
  "paths": {
    "/v1/programs/{programId}/calendar-strategies": {
      "post": {
        "tags": [
          "Program calendar strategies"
        ],
        "summary": "Create program calendar strategy",
        "operationId": "CreateProgramCalendarStrategy",
        "description": "Create a program calendar strategy.\n\nProgram calendar strategies provide new methods of calendar creation. For example, in the `FIXED_CYCLE_CLOSING` strategy, the `cycle_closing_date` of the calendar is fixed, but the due date is dynamic. The due date is calculated from the values set in the `configuration` object.\n\nThis endpoint generates a [Program calendar strategy created](https://developers.pismo.io/events/docs/balance-program-calendar-strategy-created-1) event.\n\n<b>Note:</b> This endpoint cannot be used to create a [fixed due date calendar](https://developers.pismo.io/pismo-docs/docs/fixed-due-date-calendars).\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProgramIdPath"
          },
          {
            "$ref": "#/components/parameters/CorrelationIdHeader"
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrPatchProgramCalendarStrategyRequestDto"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CreateProgramOrPatchCalendarStrategyResponseDto"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400BadRequest"
          },
          "500": {
            "$ref": "#/components/responses/500InternalServerError"
          }
        }
      }
    }
  }
}
```