---
updatedAt: 2026-05-12T09:58:42.000Z
---

# Batch creation of scan schedules

This operation allows you to create or replace the scan schedule for the specified asset(s).
The requestBody contains information about the asset(s) and the new scan schedule for each asset.

# OpenAPI definition

```json
{
  "components": {
    "responses": {
      "BadRequestResponse": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ErrorMessage"
            }
          }
        },
        "description": "BadRequestResponse indicates a request with invalid parameters"
      },
      "ForbiddenResponse": {
        "description": "ForbiddenResponse signals a request for a resource that does not exist or is not authorized"
      },
      "GenericError": {
        "description": "GenericError generic error"
      },
      "UnauthorizedResponse": {
        "description": "UnauthorizedResponse signals an unauthorized API access"
      },
      "UpdateSchedulesResponse": {
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/UpdateSchedulesSwagger"
            }
          }
        },
        "description": "UpdateSchedulesResponse provides the response body structure for schedules POST api"
      }
    },
    "schemas": {
      "AssetScheduleInput": {
        "properties": {
          "assetID": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "name": {
            "description": "Name is the name of the schedule\nMust contain only utf8 valid characters\n\nin: body",
            "maxLength": 256,
            "type": "string"
          },
          "specs": {
            "description": "Specs is a list of specs, each one being a discrete part of the schedule\nApplications can only have a single spec, but sites can have multiple specs\n\nin: body",
            "items": {
              "$ref": "#/components/schemas/Spec"
            },
            "type": "array"
          },
          "timeZone": {
            "description": "TimeZone is the timezone for the schedule\nAcceptable values are:\n\"America/New_York\",\n\"America/Chicago\",\n\"America/Denver\",\n\"America/Los_Angeles\",\n\"America/Anchorage\",\n\"America/Lima\",\n\"America/Santiago\",\n\"America/Sao_Paulo\",\n\"America/St_Johns\",\n\"America/Tegucigalpa\",\n\"America/Toronto\",\n\"Africa/Cairo\",\n\"Africa/Johannesburg\",\n\"Asia/Bangkok\",\n\"Asia/Calcutta\",\n\"Asia/Colombo\",\n\"Asia/Dubai\",\n\"Asia/Hong_Kong\",\n\"Asia/Jerusalem\",\n\"Asia/Kamchatka\",\n\"Asia/Karachi\",\n\"Asia/Singapore\",\n\"Asia/Tokyo\",\n\"Asia/Vladivostok\",\n\"Australia/Adelaide\",\n\"Australia/Sydney\",\n\"Europe/Amsterdam\",\n\"Europe/Athens\",\n\"Europe/London\",\n\"Europe/Moscow\",\n\"Pacific/Auckland\",\n\"Pacific/Honolulu\"\n\nin: body",
            "type": "string"
          }
        },
        "required": [
          "name",
          "timeZone",
          "specs"
        ],
        "type": "object"
      },
      "ErrorMessage": {
        "description": "ErrorMessage describes the error",
        "properties": {
          "code": {
            "format": "int64",
            "type": "integer"
          },
          "reason": {
            "type": "string"
          }
        },
        "type": "object"
      },
      "Spec": {
        "description": "Spec is the representation of a single schedule spec",
        "properties": {
          "cronString": {
            "description": "CronString is a crontab-like representation of the start time for this schedule spec.\nAcceptable values will have 6 fields, each one being either a * or a number.\nThe 6th crontab field represents the year. Its supported values are either '*' or a full YYYY,\nrestricting the crontab to the specific year in question.",
            "type": "string"
          },
          "duration": {
            "description": "Duration is the duration that a job will will run.\nApplication schedules are required to have a duration of zero, meaning the scan will run\nonce until completion, and not start again until the next scheduled scan.",
            "format": "uint64",
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "cronString",
          "duration"
        ],
        "type": "object"
      },
      "UpdateSchedulesSwagger": {
        "description": "UpdateSchedulesSwagger hold the response body structure for schedules",
        "properties": {
          "assetCount": {
            "format": "int64",
            "type": "integer"
          },
          "excludedApplicationNames": {
            "nullable": true,
            "type": "string"
          }
        },
        "type": "object"
      }
    }
  },
  "info": {
    "license": {
      "name": "(c) Copyright 2022 WhiteHat Security"
    },
    "title": "Schedules API",
    "version": "2.0.0"
  },
  "openapi": "3.0.1",
  "paths": {
    "/api/updateAssetSchedules": {
      "post": {
        "description": "This operation allows you to create or replace the scan schedule for the specified asset(s).\nThe requestBody contains information about the asset(s) and the new scan schedule for each asset.",
        "operationId": "updateSchedulesReqSwagger",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssetScheduleInput"
              }
            }
          },
          "description": "Body of the request holds the data to input when creating a schedule.\nThe asset(s) that this schedule is created for is indicated in the request body assetID parameter.\nThe assetID is the \"id\" field returned from a different request which is documented here:<br/>\nhttps://apidocs.whitehatsec.com/whs/reference/assets",
          "required": true,
          "x-go-name": "Body"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/UpdateSchedulesResponse"
          },
          "400": {
            "$ref": "#/components/responses/BadRequestResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenResponse"
          },
          "500": {
            "$ref": "#/components/responses/GenericError"
          }
        },
        "summary": "Batch creation of scan schedules",
        "tags": [
          "Schedules API v2.0"
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com/"
    }
  ],
  "tags": [
    {
      "name": "Schedules API v2.0"
    }
  ],
  "x-explorer-enabled": false,
  "x-readme": {
    "proxy-enabled": true
  }
}
```