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

# (Client) Create a whitelist

This operation enables you to create a whitelist for the specified job.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Job API (Legacy)",
    "contact": {},
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://sentinel.whitehatsec.com"
    }
  ],
  "paths": {
    "/api/{client_id}/job/{job_id}/whitelist": {
      "post": {
        "tags": [
          "Job API v1.0"
        ],
        "summary": "(Client) Create a whitelist",
        "description": "This operation enables you to create a whitelist for the specified job.",
        "operationId": "postClientWhitelist",
        "parameters": [
          {
            "name": "job_id",
            "in": "path",
            "description": "The ID number of the desired Job resource.",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          },
          {
            "name": "client_id",
            "in": "path",
            "description": "Client ID.",
            "required": true,
            "style": "simple",
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "requestBody": {
          "description": "Holds the information to about create client whitelist.",
          "content": {
            "application/json": {
              "encoding": {},
              "schema": {
                "$ref": "#/components/schemas/JobWhitelistRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Provides the information of created client whitelist.",
            "headers": {},
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Job"
                }
              }
            }
          },
          "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": {}
          },
          "500": {
            "description": "GenericError generic error.",
            "content": {}
          }
        },
        "deprecated": false
      }
    }
  },
  "components": {
    "schemas": {
      "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
          }
        }
      },
      "JobTarget": {
        "properties": {
          "type": {
            "type": "string"
          },
          "application": {
            "properties": {
              "id": {
                "type": "number"
              },
              "label": {
                "type": "string"
              },
              "href": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "site": {
            "properties": {
              "id": {
                "type": "number"
              },
              "label": {
                "type": "string"
              },
              "href": {
                "type": "string"
              }
            },
            "type": "object"
          },
          "id": {
            "type": "number"
          }
        }
      },
      "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"
          }
        }
      },
      "Job": {
        "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/JobTarget"
          },
          "whitelist": {
            "$ref": "#/components/schemas/JobWhitelist"
          },
          "schedule": {
            "$ref": "#/components/schemas/JobSchedule"
          }
        }
      },
      "JobWhitelistRequest": {
        "properties": {
          "job": {
            "properties": {
              "whitelist": {
                "properties": {
                  "patterns": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "pattern": {
                          "type": "string",
                          "description": "Kleen star or literal substring match."
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  },
  "x-explorer-enabled": false,
  "x-readme": {
    "proxy-enabled": true
  }
}
```