The Create Scan endpoint submits a URL to your Webhood instance for analysis. Scanning is asynchronous: the endpoint immediately returns HTTPDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/webhood-io/webhood/llms.txt
Use this file to discover all available pages before exploring further.
202 Accepted with a new scan record whose status is pending. Your application must then poll GET /api/v1/scans/:id until the status transitions to done or error before retrieving the screenshot, HTML, or network trace.
Request
POST /api/v1/scans
Authentication
All requests require a valid Bearer token in theAuthorization header.
Request Body
Send a JSON body with the following fields.The fully-qualified URL to scan, including scheme. Must be a valid HTTP or HTTPS URL.Example:
"https://example.com"Optional scan configuration. If omitted, Webhood uses the instance defaults.
Response
Returns HTTP 202 Accepted with the newly created scan record. Thestatus field will be pending at this point. A Location header is also set pointing to the scan’s GET endpoint.
Response Headers
| Header | Value |
|---|---|
Location | /api/beta/scans/<id> — URL to poll for status updates |
Response Fields
Unique identifier for the new scan record. Use this value to poll for status.
Auto-generated human-readable identifier in
hostname-timestamp format, e.g. example.com-1714001200.The URL that was submitted.
Always
pending immediately after creation.ISO 8601 timestamp of when the scan record was created.
ISO 8601 timestamp of the last update.
Empty string on creation. Populated only if the scan later transitions to
error.Empty array on creation. Populated with file IDs after the scan completes.
Empty array on creation. Populated with file IDs after the scan completes.
Empty array on creation. Populated with IDs of any additional artifact files attached to the scan.
Empty string on creation. Populated when the scan finishes.
Empty string on creation. Populated with the resolved URL after redirects once the scan is done.
The
ScanOptions submitted with the request.Empty on creation. Populated with full scan metadata once the scan completes.
Examples
Submit a URL for Scanning
Response — HTTP 202 Accepted
Async Polling Pattern
Because scanning is asynchronous, follow these steps to retrieve results: Step 1 — Submit the URLPOST /api/v1/scans with the url and any options. Save the id from the response.
Step 2 — Poll for completion
Repeatedly call GET /api/v1/scans/:id using the saved id. While status is pending or running, the server returns HTTP 202 with a Location header. Continue polling until status is done or error.
status is done, download the scan artifacts as needed:
- Screenshot →
GET /api/v1/scans/:id/screenshot - Captured HTML →
GET /api/v1/scans/:id/html - Network trace →
GET /api/v1/scans/:id/trace
A scan remains in
pending status until an available scanner picks it up. If no scanner is currently connected and running, the scan will stay pending indefinitely. Ensure at least one scanner is online before submitting scans, or implement a timeout in your polling loop.