{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/webex/json-schema/webex-update-campaign-request-schema.json",
  "title": "UpdateCampaignRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/webex-campaign-manager-api-openapi.yml#/components/schemas/UpdateCampaignRequest",
  "required": [
    "dialingRate",
    "dialingListFetchURL",
    "outdialANI"
  ],
  "type": "object",
  "properties": {
    "dialingRate": {
      "type": "number",
      "format": "float",
      "description": "Number of contacts to be dialed out per available Agent. For Progressive 1:1 Dialer, it will support for only 1 contact and for Progressive 1:N Dialer it can support upto 10 contacts to be dialed out per available Agent"
    },
    "campaignName": {
      "type": "string",
      "description": "(Optional) Used if different than id, maximum length 64 characters."
    },
    "authToken": {
      "type": "string",
      "description": "(Not in use) The token needed by the dialer for querying records."
    },
    "dialingListFetchURL": {
      "type": "string",
      "description": "URL the dialer will use to fetch the list of contacts to dial for the campaign from campaign manager, maximum length 1024 characters."
    },
    "outdialANI": {
      "type": "string",
      "description": "The ANI (E164)  that will be presented to the customer. These must be restricted to the configured outdial Eps in Webex Contact Center, maximum length 50 characters."
    },
    "noAnswerRingLimit": {
      "type": "integer",
      "description": "(Optional) Number of seconds before a dialed call from the dialer is considered not answered. The range is from 16 to 80, default is 32. This field is not applicable for Direct preview campaigns."
    },
    "maxDialingRate": {
      "type": "number",
      "format": "float",
      "description": "Caps the maximum dialing rate per agent at this value. The range is from 1.0 to 10.0, default is 1.0."
    },
    "reservationPercentage": {
      "type": "integer",
      "description": "(Not in use) The percentage of agents to reserve within the queue associated with the campaign. The range is from 0 to 100 , default is 100."
    },
    "previewOfferTimeout": {
      "type": "integer",
      "description": "(Required only if previewOfferTimeoutAutoAction is provided) The number of seconds dialer waits for an agent to act on a preview campaign record, before performing the provided previewOfferTimeoutAutoAction. The range is from 0 to 7200 seconds(2 hours) for ACCEPT auto-action, and from 10 to 7200 seconds(2 hours) for other auto-actions. The default value is 600 seconds(10 minutes)."
    },
    "previewOfferTimeoutAutoAction": {
      "type": "string",
      "description": "(Required only if previewOfferTimeout is provided) The automatic action to be performed after the previewOfferTimeout duration has elapsed, if agent takes no action on the preview campaign record offered. The action can be \"ACCEPT\", \"SKIP\" or \"REMOVE\". The default action is \"SKIP\"."
    },
    "previewActionsDisabled": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "(Optional) The list of preview actions to be disabled for the agent when a preview campaign record is offered. The list can be empty if no action should be disabled, otherwise it can be either \"SKIP\" or \"REMOVE\" or both. The default is an empty list"
    },
    "validCampaignTimes": {
      "$ref": "#/$defs/ValidCampaignTimes"
    }
  },
  "$defs": {
    "DateOverride": {
      "type": "object",
      "required": [
        "date",
        "shiftTimes"
      ],
      "properties": {
        "date": {
          "type": "string",
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
          "description": "The specific date for which the shift schedule should be overridden, in YYYY-MM-DD format."
        },
        "shiftTimes": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ShiftTime"
          },
          "minItems": 0,
          "description": "The list of shift times that apply on this specific date, overriding the weekly schedule. An empty array indicates no shifts are scheduled for this date (e.g., holidays, company closures)."
        }
      }
    },
    "ShiftTime": {
      "type": "object",
      "required": [
        "start",
        "end"
      ],
      "properties": {
        "start": {
          "type": "string",
          "pattern": "^([0-1][0-9]|2[0-3]):[0-5][0-9]$",
          "description": "The start time of the shift in 24-hour format (HH:MM). Must be earlier than the end time."
        },
        "end": {
          "type": "string",
          "pattern": "^([0-1][0-9]|2[0-3]):[0-5][0-9]$",
          "description": "The end time of the shift in 24-hour format (HH:MM). Must be later than the start time."
        }
      }
    },
    "ValidCampaignTimes": {
      "type": "object",
      "description": "(Optional) Defines the valid operating hours for the campaign based on a weekly schedule and optional date-specific overrides. The campaign will only be active during the specified time windows.",
      "required": [
        "timeZone",
        "weeklySchedule"
      ],
      "properties": {
        "timeZone": {
          "type": "string",
          "description": "The IANA timezone name (e.g., 'America/New_York') that defines the timezone for all shift times in the schedule. This timezone is used to interpret the start and end times in the weekly schedule and date overrides."
        },
        "weeklySchedule": {
          "$ref": "#/$defs/WeeklyShiftSchedule",
          "description": "The recurring weekly schedule that defines when the campaign should be active. Each day of the week can have multiple shift time ranges."
        },
        "dateOverrides": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/DateOverride"
          },
          "description": "Optional list of date-specific schedule overrides that take precedence over the weekly schedule for particular dates (e.g., holidays, special events)."
        }
      }
    },
    "WeeklyShiftSchedule": {
      "type": "object",
      "required": [
        "monday",
        "tuesday",
        "wednesday",
        "thursday",
        "friday",
        "saturday",
        "sunday"
      ],
      "properties": {
        "monday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ShiftTime"
          },
          "description": "List of shift times for Monday. Can be empty if no shifts are scheduled."
        },
        "tuesday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ShiftTime"
          },
          "description": "List of shift times for Tuesday. Can be empty if no shifts are scheduled."
        },
        "wednesday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ShiftTime"
          },
          "description": "List of shift times for Wednesday. Can be empty if no shifts are scheduled."
        },
        "thursday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ShiftTime"
          },
          "description": "List of shift times for Thursday. Can be empty if no shifts are scheduled."
        },
        "friday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ShiftTime"
          },
          "description": "List of shift times for Friday. Can be empty if no shifts are scheduled."
        },
        "saturday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ShiftTime"
          },
          "description": "List of shift times for Saturday. Can be empty if no shifts are scheduled."
        },
        "sunday": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ShiftTime"
          },
          "description": "List of shift times for Sunday. Can be empty if no shifts are scheduled."
        }
      }
    }
  }
}