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

# Create a job

This operation enables you to create a job, which is a configuration that can be run on a target asset (site), such as a scan or a vuln retest.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Job API (Legacy)",
    "contact": {},
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com"
    }
  ],
  "paths": {
    "/api/job": {
      "post": {
        "tags": [
          "Job API v1.0"
        ],
        "summary": "Create a job",
        "description": "This operation enables you to create a job, which is a configuration that can be run on a target asset (site), such as a scan or a vuln retest.",
        "operationId": "createJob",
        "parameters": [],
        "requestBody": {
          "description": "Holds the information to create a job.",
          "content": {
            "application/json": {
              "encoding": {},
              "schema": {
                "properties": {
                  "job": {
                    "$ref": "#/components/schemas/JobPostRequest"
                  }
                }
              }
            },
            "application/xml": {
              "encoding": {},
              "schema": {
                "$ref": "#/components/schemas/JobPostRequest"
              },
              "example": "XML preview is currently not supported."
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Provides the information about created job.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/JobPostResponse"
                }
              },
              "application/xml": {
                "example": "XML preview is currently not supported."
              }
            }
          },
          "400": {
            "description": "BadRequestResponse indicates a request with invalid parameters.",
            "content": {}
          },
          "401": {
            "description": "UnauthorizedResponse signals an unauthorized API access.",
            "content": {}
          },
          "403": {
            "description": "ForbiddenResponse signals a request for a resource that does not exist or is not authorized.",
            "content": {}
          },
          "404": {
            "description": "NotFound the requested resource could not be found.",
            "content": {}
          },
          "500": {
            "description": "GenericError generic error.",
            "content": {}
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "JobTargetPostRequest": {
        "description": "Two options are available: id or type. The ''id'' specifies the target ID, a unique identifier. The ''type'' specifies the target type where the job will run (only 'site' is supported). If a type is given, the site id property is also required.",
        "properties": {
          "type": {
            "type": "string"
          },
          "site": {
            "type": "object",
            "properties": {
              "id": {
                "type": "number",
                "description": "Site ID where this job should run."
              }
            }
          }
        }
      },
      "JobRequest": {
        "properties": {
          "name": {
            "type": "string",
            "description": "Desired name for job."
          },
          "jobtype": {
            "type": "string",
            "description": "Type of job. EXAMPLE: ''scan'', ''scan_sca''"
          },
          "target": {
            "$ref": "#/components/schemas/JobTargetPostRequest"
          }
        }
      },
      "JobPostRequest": {
        "allOf": [
          {
            "$ref": "#/components/schemas/JobRequest"
          }
        ]
      },
      "JobInstance": {
        "properties": {
          "end": {
            "type": "number",
            "nullable": true
          },
          "requested_status": {
            "type": "string"
          },
          "begin": {
            "type": "number",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "type": "string",
            "nullable": true
          },
          "href": {
            "type": "string"
          },
          "timestamp": {
            "type": "number"
          },
          "id": {
            "type": "number"
          },
          "job": {
            "type": "number"
          },
          "duration": {
            "type": "number",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          }
        }
      },
      "JobWhitelist": {
        "properties": {
          "use_patterns": {
            "type": "boolean"
          },
          "patterns": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "pattern": {
                  "type": "string"
                },
                "id": {
                  "type": "number"
                }
              }
            }
          },
          "use_urls": {
            "type": "boolean"
          }
        }
      },
      "JobSchedule": {
        "properties": {
          "name": {
            "type": "string"
          },
          "api-version": {
            "type": "number"
          },
          "creator": {
            "type": "string",
            "nullable": true
          },
          "start_date": {
            "type": "string",
            "nullable": true
          },
          "job": {
            "properties": {
              "id": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "id": {
            "type": "string"
          },
          "specs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "time": {
                  "type": "string"
                },
                "type": {
                  "type": "string"
                },
                "cron_spec": {
                  "type": "string"
                },
                "id": {
                  "type": "string"
                },
                "duration": {
                  "type": "number",
                  "nullable": true
                }
              }
            }
          },
          "timezone": {
            "type": "string"
          },
          "href": {
            "type": "string"
          }
        }
      },
      "JobTargetPostResponse": {
        "properties": {
          "type": {
            "type": "string"
          },
          "site": {
            "properties": {
              "id": {
                "type": "number"
              },
              "label": {
                "type": "string"
              },
              "href": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "id": {
            "type": "number"
          }
        }
      },
      "JobPostResponse": {
        "properties": {
          "creator": {
            "type": "string",
            "nullable": true
          },
          "href": {
            "type": "string"
          },
          "id": {
            "type": "number"
          },
          "jobtype": {
            "type": "string"
          },
          "instances": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/JobInstance"
            }
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "target": {
            "$ref": "#/components/schemas/JobTargetPostResponse"
          },
          "whitelist": {
            "$ref": "#/components/schemas/JobWhitelist"
          },
          "schedule": {
            "$ref": "#/components/schemas/JobSchedule"
          }
        }
      }
    }
  },
  "x-explorer-enabled": false,
  "x-readme": {
    "proxy-enabled": true
  }
}
```