> ## Documentation Index
> Fetch the complete documentation index at: https://developer.onetrust.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Scan Websites

Use this API to start scans for the specified domains.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Consent & Preferences - Cookie Consent",
    "version": "1.0",
    "contact": {
      "name": "OneTrust Support",
      "url": "https://my.onetrust.com/s/contactsupport"
    },
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "description": "The Cookie Consent APIs are used to integrate external systems and streamline the flow of data with Cookie Consent in the OneTrust Platform."
  },
  "servers": [
    {
      "url": "https://{hostname}",
      "variables": {
        "hostname": {
          "default": "hostname",
          "description": "The OneTrust hostname such as app.onetrust.com, app-eu.onetrust.com, app-de.onetrust.com, app-uk.onetrust.com, app-apac.onetrust.com, trial.onetrust.com, or uat.onetrust.com."
        }
      }
    }
  ],
  "tags": [
    {
      "name": "Scans",
      "description": "The Scans APIs are used to manage website cookie scanning operations and results.",
      "externalDocs": {
        "description": "OpenAPI 3.1.0 - Download Definition",
        "url": "https://developer.onetrust.com/onetrust/openapi/consent-preferences-cookie-consent.json"
      }
    }
  ],
  "x-onetrust": {
    "spec-label": "OpenAPI 3.1.0"
  },
  "x-readme": {
    "explorer-enabled": false,
    "proxy-enabled": false,
    "metrics-enabled": false
  },
  "paths": {
    "/api/cmp/v1/webscans": {
      "post": {
        "operationId": "addScans",
        "summary": "Scan Websites",
        "description": "Use this API to start scans for the specified domains.",
        "tags": [
          "Scans"
        ],
        "x-onetrust": {
          "spec-label": "https://developer.onetrust.com/onetrust/openapi/consent-preferences-cookie-consent.json"
        },
        "parameters": [
          {
            "name": "externalOrgId",
            "in": "query",
            "description": "The external organization identifier.",
            "required": false,
            "schema": {
              "type": "string",
              "maxLength": 100
            },
            "example": "orgnameid"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ScanWebsiteRequest"
                },
                "uniqueItems": true
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ServiceResponseDto"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "429": {
            "description": "Too Many Requests. \nFor more information, see [API Rate Limits](https://developer.onetrust.com/onetrust/reference/rate-limits-overview).",
            "headers": {
              "Retry-After": {
                "schema": {
                  "description": "The number of seconds after which requests will be allowed again.",
                  "format": "int32"
                }
              },
              "ot-period": {
                "schema": {
                  "description": "The unit of time for which the rate limit applies",
                  "enum": [
                    "HOUR",
                    "MINUTE"
                  ]
                }
              },
              "ot-ratelimit-event-id": {
                "schema": {
                  "description": "The unique identifier for the rate-limiting event.",
                  "format": "uuid"
                }
              },
              "ot-request-made": {
                "schema": {
                  "description": "The number of requests made within the specified period.",
                  "format": "int32"
                }
              },
              "ot-requests-allowed": {
                "schema": {
                  "description": "The number of requests allowed within the specified period.",
                  "format": "int32"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        },
        "security": [
          {
            "OAUTH2": [
              "COOKIE"
            ]
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "ScanWebsiteRequest": {
        "type": "object",
        "properties": {
          "domain": {
            "description": "The website domain being managed.",
            "type": "string",
            "example": "amazon.com",
            "maxLength": 255,
            "minLength": 1
          },
          "numberOfPages": {
            "description": "The total number of web pages found during scanning.",
            "type": "integer",
            "format": "int32",
            "example": 100,
            "default": "1000"
          },
          "independentPaths": {
            "description": "The unique URL paths discovered during the scanning process.",
            "type": "boolean",
            "example": false,
            "default": "false"
          },
          "includedQueryParams": {
            "description": "The query parameters that are included in the scan.",
            "type": "string",
            "example": "_vercel_share=Hcj4MQ8SLN8pxXPrw7wbrCfxXBuZnPa6",
            "maxLength": 1000,
            "minLength": 1
          },
          "siteMapsUris": {
            "description": "The URLs of sitemaps used for the scanning process.",
            "type": "string",
            "example": "https://preprod.johnniewalker.com/sitemap.xml ",
            "maxLength": 3000,
            "minLength": 0
          },
          "geoLocation": {
            "description": "The geographic location settings for the scan.",
            "type": "string",
            "example": "northeurope",
            "maxLength": 100,
            "minLength": 1
          },
          "limitScanToSitemap": {
            "description": "This flag indicates whether to restrict scanning to sitemap URLs only.",
            "type": "boolean",
            "example": false,
            "default": "false"
          },
          "googleLoginState": {
            "description": "The login state for Google-authenticated scanning.",
            "type": "boolean",
            "example": false,
            "default": "false"
          },
          "captureDelayedCookies": {
            "description": "This flag indicates whether to capture cookies that load after the initial page load.",
            "type": "boolean",
            "example": true,
            "default": "false"
          },
          "delayTimeInSeconds": {
            "description": "The time duration in seconds to wait before capturing delayed cookies.",
            "type": "integer",
            "format": "int32",
            "example": 3,
            "default": "1"
          },
          "targetPageInputs": {
            "description": "The input parameters for specific pages to be scanned.",
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TargetPagesScanEntityDto"
            },
            "example": [
              {
                "pageListName": "page list 1",
                "targetType": "Target",
                "urlType": "Page",
                "pageUrls": "https://service.braun.com/hr/en/products/6032"
              }
            ],
            "maxItems": 1000,
            "minItems": 0
          }
        },
        "required": [
          "numberOfPages"
        ]
      },
      "TargetPagesScanEntityDto": {
        "type": "object",
        "properties": {
          "pageListName": {
            "description": "The name of the page list configuration.",
            "type": "string",
            "example": "page list 1",
            "maxLength": 255,
            "minLength": 1
          },
          "targetType": {
            "description": "The type of target being scanned.",
            "type": "string",
            "example": "Target",
            "enum": [
              "IncludeOnly",
              "Exclude",
              "Target"
            ],
            "maxLength": 50,
            "minLength": 1
          },
          "urlType": {
            "description": "The category or type of URL.",
            "type": "string",
            "example": "Page",
            "enum": [
              "Page",
              "Path",
              "Subdomain"
            ],
            "maxLength": 50,
            "minLength": 1
          },
          "pageUrls": {
            "description": "The list of specific page URLs to be scanned.",
            "type": "string",
            "example": "https://service.braun.com/hr/en/products/6032",
            "maxLength": 5000,
            "minLength": 1
          }
        }
      },
      "ServiceResponseDto": {
        "type": "object",
        "properties": {
          "message": {
            "description": "The message or notification text.",
            "type": "string",
            "example": "Scan initiated successfully.",
            "maxLength": 500,
            "minLength": 1
          },
          "consentPolicyId": {
            "description": "The unique identifier of the consent policy.",
            "type": "string",
            "example": "f2229953-b4b5-4042-8cb9-b78038cc4c46",
            "maxLength": 100,
            "minLength": 1
          },
          "domainId": {
            "description": "The unique identifier of the domain.",
            "type": "string",
            "format": "uuid",
            "example": "f2229953-b4b5-4042-8cb9-b78038cc4c46"
          },
          "scanId": {
            "description": "The unique identifier of the scan.",
            "type": "string",
            "format": "uuid",
            "example": "f2229953-b4b5-4042-8cb9-b78038cc4c46"
          },
          "scanType": {
            "description": "The type or method of scanning being performed.",
            "type": "integer",
            "format": "int32",
            "example": 1
          },
          "rescan": {
            "description": "This flag indicates whether to perform the scan operation again.",
            "type": "boolean"
          },
          "ok": {
            "description": "This flag indicates whether the operation was successful.",
            "type": "boolean"
          }
        }
      }
    },
    "securitySchemes": {
      "OAUTH2": {
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "https://{hostname}/api/access/v1/oauth/token",
            "scopes": {
              "COOKIE": "Cookie Scope gives the user access to read/write operations inside the Cookie Consent module.",
              "COOKIE_READ": "Cookie Read Scope gives the user read-only access to the Cookie Consent module."
            }
          }
        }
      }
    }
  }
}
```