---
title: "Trigger a scan"
method: POST
path: "/sites/{id}/scan"
tags: ["Scanner"]
---

# Trigger a scan

`POST /sites/{id}/scan`

## Request

- Base URL: `http://localhost:3001/api/v1`
- URL: `http://localhost:3001/api/v1/sites/{id}/scan`
- Auth: HTTP bearer

Triggers a new cookie/script scan for a site. Optionally provide a specific URL to scan.

## Path parameters

- `id` string, uuid, required: Site ID

## Request body

- object
  - `url` string, uri
  - `urls` string[]
  - `storefrontPassword` string

## Response `201`

Scan created

- object
  - `id` string, uuid, required
  - `siteId` string, uuid, required
  - `url` string, required
  - `status` 'completed' | 'failed', required
  - `detectedServices` unknown
  - `unrecognizedScripts` unknown
  - `errorMessage` string, nullable, required
  - `createdAt` string, required

## Other responses

- `400`: Validation error
- `401`: Unauthorized
- `404`: Site not found

---

[API](https://skmtc.dev/consentlayer/apis/consentlayer-api.md) · [All operations](https://skmtc.dev/consentlayer/apis/consentlayer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/consentlayer/apis/consentlayer-api/revisions/b89d4b189d50?raw)
