{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/whatsapp/json-schema/whatsapp-whats-app-business-account-schedules-connection-schema.json",
  "title": "WhatsAppBusinessAccountSchedulesConnection",
  "description": "Paginated collection of WhatsApp Business Account schedules",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/whatsapp-schedule-management-api-openapi.yml#/components/schemas/WhatsAppBusinessAccountSchedulesConnection",
  "type": "object",
  "required": [
    "data"
  ],
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/WhatsAppBusinessAccountSchedule"
      },
      "description": "Array of schedule records"
    },
    "paging": {
      "$ref": "#/$defs/CursorPaging"
    }
  },
  "$defs": {
    "CursorPaging": {
      "type": "object",
      "description": "Cursor-based pagination information",
      "properties": {
        "cursors": {
          "type": "object",
          "properties": {
            "before": {
              "type": "string",
              "description": "Cursor pointing to the start of the page of data"
            },
            "after": {
              "type": "string",
              "description": "Cursor pointing to the end of the page of data"
            }
          }
        },
        "previous": {
          "type": "string",
          "description": "URL for the previous page of results"
        },
        "next": {
          "type": "string",
          "description": "URL for the next page of results"
        }
      }
    },
    "DayOfWeek": {
      "type": "string",
      "description": "Day of the week",
      "enum": [
        "MONDAY",
        "TUESDAY",
        "WEDNESDAY",
        "THURSDAY",
        "FRIDAY",
        "SATURDAY",
        "SUNDAY"
      ]
    },
    "RecurrencePattern": {
      "type": "object",
      "description": "Pattern for recurring schedules",
      "properties": {
        "frequency": {
          "type": "string",
          "enum": [
            "DAILY",
            "WEEKLY",
            "MONTHLY",
            "YEARLY"
          ]
        },
        "interval": {
          "type": "integer",
          "minimum": 1,
          "description": "Interval between recurrences"
        },
        "end_date": {
          "type": "string",
          "format": "date",
          "description": "End date for the recurrence pattern"
        }
      }
    },
    "WhatsAppBusinessAccountSchedule": {
      "type": "object",
      "description": "WhatsApp Business Account schedule configuration and details",
      "required": [
        "id",
        "name",
        "status",
        "schedule_type"
      ],
      "properties": {
        "id": {
          "type": "string",
          "description": "Unique identifier for the schedule"
        },
        "name": {
          "type": "string",
          "description": "Human-readable name for the schedule",
          "minLength": 1,
          "maxLength": 100
        },
        "status": {
          "$ref": "#/$defs/WhatsAppScheduleStatus"
        },
        "schedule_type": {
          "$ref": "#/$defs/WhatsAppScheduleType"
        },
        "description": {
          "type": "string",
          "description": "Optional description of the schedule purpose",
          "maxLength": 500
        },
        "start_time": {
          "type": "string",
          "format": "time",
          "description": "Schedule start time in HH:MM format"
        },
        "end_time": {
          "type": "string",
          "format": "time",
          "description": "Schedule end time in HH:MM format"
        },
        "timezone": {
          "type": "string",
          "description": "Timezone identifier for the schedule"
        },
        "days_of_week": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DayOfWeek"
          },
          "description": "Days of the week when the schedule is active"
        },
        "created_time": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp when the schedule was created"
        },
        "updated_time": {
          "type": "string",
          "format": "date-time",
          "description": "ISO 8601 timestamp when the schedule was last updated"
        },
        "is_active": {
          "type": "boolean",
          "description": "Whether the schedule is currently active"
        },
        "recurrence_pattern": {
          "$ref": "#/$defs/RecurrencePattern"
        }
      }
    },
    "WhatsAppScheduleStatus": {
      "type": "string",
      "description": "Current status of the schedule",
      "enum": [
        "ACTIVE",
        "INACTIVE",
        "PAUSED",
        "EXPIRED",
        "DRAFT"
      ]
    },
    "WhatsAppScheduleType": {
      "type": "string",
      "description": "Type of schedule configuration",
      "enum": [
        "BUSINESS_HOURS",
        "AUTOMATED_RESPONSE",
        "MESSAGE_CAMPAIGN",
        "MAINTENANCE_WINDOW",
        "CUSTOM"
      ]
    }
  }
}