Developers
VZ-Scan API
Everything this site does goes through one JSON API, and you can call it yourself: issue a token, prove you control a domain, choose what to scan, and fetch the report.
Version 1.0.0 · OpenAPI 3.1 document: /api/openapi.json
Basics
-
Base URL.
https://scan.vulzero.cc/api. Paths have no trailing slash. -
Authentication. Send
Authorization: Bearer <token>on every route exceptPOST /api/tokens, which issues the token. A missing, unknown, revoked or expired token gets401. - Format. Request bodies and responses are JSON. The one exception is the report, which can also be fetched as an HTML document.
-
Errors. Every error from the API has the same shape; read
error.code, not the message.
{"error": {"code": "not_verified", "message": "Domain must be verified before scanning."}}
-
A request with a method the route does not accept gets
405with anAllowheader and no JSON body. A path that matches no route, including an id that is not a UUID, gets a plain404. -
Routes that call the scanning engine answer
502withengine_unreachableorengine_errorwhen it is unavailable. Those requests are safe to retry later.
Quickstart
Six calls take you from nothing to a report. The examples use
curl and keep values in shell variables.
-
Get a token
The token is shown once. Store it somewhere safe.
export VZ_API="https://scan.vulzero.cc/api" curl -sS -X POST "$VZ_API/tokens" \ -H "Content-Type: application/json" \ -d '{"label": "laptop-cli"}' export VZ_TOKEN="vzs_..." # the "token" value from the response -
Register a domain
Keep the
domain_idfrom the response.curl -sS -X POST "$VZ_API/domains" \ -H "Authorization: Bearer $VZ_TOKEN" \ -H "Content-Type: application/json" \ -d '{"fqdn": "example.com"}' export DOMAIN_ID="..." # the "domain_id" value from the response -
Verify that you control it
Ask for a proof, publish it, then ask the service to check. For
dns_txt, create a TXT record namedrecord_namewith the valuedns_token. Forhttp_file, servedns_tokenathttp_pathon the domain.curl -sS -X POST "$VZ_API/domains/$DOMAIN_ID/verify" \ -H "Authorization: Bearer $VZ_TOKEN" \ -H "Content-Type: application/json" \ -d '{"method": "dns_txt"}' # after publishing the record: curl -sS -X POST "$VZ_API/domains/$DOMAIN_ID/verify/check" \ -H "Authorization: Bearer $VZ_TOKEN" \ -H "Content-Type: application/json" \ -d '{}'Repeat the check until the response says
"verified": true. -
List what can be scanned
The response lists the assets found for the domain. Nothing is scanned yet.
curl -sS "$VZ_API/domains/$DOMAIN_ID/scope" \ -H "Authorization: Bearer $VZ_TOKEN"
-
Submit a scan
Choose assets from the scope response and a request rate for each.
"consent": trueis required: it is your statement that you are authorized to scan these assets, and it is recorded with the scan.curl -sS -X POST "$VZ_API/scans" \ -H "Authorization: Bearer $VZ_TOKEN" \ -H "Content-Type: application/json" \ -d '{"domain_id": "'"$DOMAIN_ID"'", "consent": true, "selections": [{"asset_url": "https://app.example.com", "req_per_sec": 3}]}' export SCAN_ID="..." # the "scan_id" value from the response -
Follow the scan and fetch the report
Poll the status until it is
completed,failedorcancelled, then fetch the report.curl -sS "$VZ_API/scans/$SCAN_ID" \ -H "Authorization: Bearer $VZ_TOKEN" curl -sS "$VZ_API/scans/$SCAN_ID/report?format=json" \ -H "Authorization: Bearer $VZ_TOKEN"
Limits
These are the values this service enforces now.
| Limit | Value | When you reach it |
|---|---|---|
| Tokens issued | 5 per client address per 60 minutes | 429 rate_limited with a Retry-After header |
| Token lifetime | 30 days from issue | 401 unauthorized; issue a new token |
| Scans submitted per domain | 5 per 60 minutes | 429 rate_limited |
| Scans submitted per client address | 20 per 60 minutes | 429 rate_limited |
| Free scans | 1 per domain; a scan that fails hands it back | 402 payment_required |
| Request rate per asset | 1 to 5 requests per second | A higher value is lowered to 5 and listed in clamped |
| Requests per scan | 400 in total | The scan stops sending requests |
| Report lifetime | 30 days from creation | 404 expired |
| Scan list | The 200 newest scans | Older scans are not listed; fetch them by scan_id |
The per-address limits count IPv6 clients per /64 network. Limits are counted over a rolling window, not from the top of the hour.
vzscan CLI
vzscan is the command-line client for this API. It calls the same
routes with the same token and does no scanning of its own, so every limit and
check on this page applies to it as well. Point it at this service with
--api-url or the VZSCAN_API_URL environment variable.
vzscan login --label "laptop-cli" --api-url https://scan.vulzero.cc/api vzscan verify example.com # prints the proof to publish vzscan verify example.com --check # confirms it vzscan scope example.com vzscan scan example.com # pick assets and rates, then confirm vzscan status <scan_id> vzscan report <scan_id> --format json --output report.json vzscan list
Reference: Tokens
Issue the bearer token every other route needs.
Issue a token
POST
/api/tokens
No token needed
Creates a new bearer token. The plaintext token is returned once in this response and is never shown again; only its SHA-256 hash is stored. No authentication is needed. Tokens expire 30 days after issue by default (expires_at is null when the service is configured without expiry); an expired token is rejected with 401 like an unknown one.
Rate limit. 5 tokens per client address per rolling hour by default. Over the limit: 429 with a Retry-After header (seconds).
Request body (optional)
| Field | Type | Description |
|---|---|---|
label |
string | Optional name for the token. Kept to 200 characters. |
Example
curl -sS \
-X POST \
"https://scan.vulzero.cc/api/tokens" \
-H "Content-Type: application/json" \
-d '{"label": "laptop-cli"}'
Responses
| Status | Meaning |
|---|---|
201 |
Token issued. |
400 |
bad_request: the body is not a JSON object. |
409 |
conflict: the token could not be stored; retry. |
429 |
rate_limited: too many tokens issued from this address. Headers: Retry-After. |
Response fields (201)
| Field | Type | Description |
|---|---|---|
token |
string | The bearer token, starting vzs_. Shown once. |
token_id |
UUID string | Identifier of the token record. |
expires_at |
ISO 8601 time or null | When the token stops working; null if it does not expire. |
Reference: Domains
Register a domain, prove you control it, and list what can be scanned.
Register a domain
POST
/api/domains
Bearer token required
Registers a fully-qualified domain name under your token. The value is lowercased and a pasted scheme, path, port or trailing dot is removed before validation. The domain starts as pending_verification.
Request body
| Field | Type | Description |
|---|---|---|
fqdn |
string, required | Fully-qualified domain name, for example example.com. |
Example
curl -sS \
-X POST \
"https://scan.vulzero.cc/api/domains" \
-H "Authorization: Bearer $VZ_TOKEN" \
-H "Content-Type: application/json" \
-d '{"fqdn": "example.com"}'
Responses
| Status | Meaning |
|---|---|
201 |
Domain registered. |
400 |
bad_request: the body is not a JSON object. invalid_fqdn: fqdn is missing or not a valid domain name. |
401 |
unauthorized: the Authorization header is missing, or the token is unknown, revoked or expired. |
409 |
already_registered: this token has already registered this domain. |
Response fields (201)
| Field | Type | Description |
|---|---|---|
domain_id |
UUID string | Use this id in the domain and scan routes. |
fqdn |
string | The normalized domain name that was stored. |
status |
string | pending_verification for a new domain. One of: pending_verification, verified, disabled. |
Begin ownership verification
POST
/api/domains/{domain_id}/verify
Bearer token required
Returns the proof to publish. For dns_txt, create a TXT record named record_name (_vzscan.<your domain>) whose value is dns_token. For http_file, serve dns_token at http_path (/.well-known/vzscan-verify.txt) on the domain. A pending verification for the domain is reused.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
domain_id |
path, required | UUID string | domain_id returned by POST /domains. |
Request body (optional)
| Field | Type | Description |
|---|---|---|
method |
string | How you will prove control of the domain. One of: dns_txt, http_file. |
Example
curl -sS \
-X POST \
"https://scan.vulzero.cc/api/domains/$DOMAIN_ID/verify" \
-H "Authorization: Bearer $VZ_TOKEN" \
-H "Content-Type: application/json" \
-d '{"method": "dns_txt"}'
Responses
| Status | Meaning |
|---|---|
200 |
The proof to publish. |
400 |
bad_request: the body is not a JSON object. invalid_method: method is not dns_txt or http_file. |
401 |
unauthorized: the Authorization header is missing, or the token is unknown, revoked or expired. |
404 |
not_found: no such domain under this token. |
502 |
engine_unreachable: the scanning engine could not be reached. engine_error: the engine rejected the request. Safe to retry later. |
Response fields (200)
| Field | Type | Description |
|---|---|---|
verification_id |
UUID string | Identifier of this verification attempt. |
method |
string | The method this proof is for. One of: dns_txt, http_file. |
dns_token |
string | The proof value to publish (TXT record value or file content). |
record_name |
string | TXT record name for dns_txt: _vzscan.<your domain>. |
http_path |
string or null | Path to serve the proof at for http_file; null for dns_txt. |
expires_at |
ISO 8601 time | When this proof stops being accepted. |
Confirm ownership verification
POST
/api/domains/{domain_id}/verify/check
Bearer token required
Checks the published proof. Without verification_id the latest pending verification for the domain is checked. When verified is true the domain becomes verified and can be enumerated and scanned.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
domain_id |
path, required | UUID string | domain_id returned by POST /domains. |
Request body (optional)
| Field | Type | Description |
|---|---|---|
verification_id |
UUID string | Optional. Defaults to the latest pending verification for the domain. |
Example
curl -sS \
-X POST \
"https://scan.vulzero.cc/api/domains/$DOMAIN_ID/verify/check" \
-H "Authorization: Bearer $VZ_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'
Responses
| Status | Meaning |
|---|---|
200 |
Result of the check. |
400 |
bad_request: the body is not a JSON object. |
401 |
unauthorized: the Authorization header is missing, or the token is unknown, revoked or expired. |
404 |
not_found: no such domain under this token. engine_error: the engine did not find the verification. |
409 |
no_pending: the domain has no pending verification; begin one first. |
502 |
engine_unreachable: the scanning engine could not be reached. engine_error: the engine rejected the request. Safe to retry later. |
Response fields (200)
| Field | Type | Description |
|---|---|---|
status |
string | State of the verification after this check. One of: pending, verified, failed, expired. |
verified |
boolean | true once the proof was found. |
List the assets that can be scanned
GET
/api/domains/{domain_id}/scope
Bearer token required
Enumerates the hosts, URLs and endpoints found for a verified domain. Pick the assets to scan from this list. Enumeration runs when you call this route, so the response can take several seconds.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
domain_id |
path, required | UUID string | domain_id returned by POST /domains. |
Example
curl -sS \ "https://scan.vulzero.cc/api/domains/$DOMAIN_ID/scope" \ -H "Authorization: Bearer $VZ_TOKEN"
Responses
| Status | Meaning |
|---|---|
200 |
Enumerated assets. |
401 |
unauthorized: the Authorization header is missing, or the token is unknown, revoked or expired. |
404 |
not_found: no such domain under this token. |
409 |
not_verified: the domain must be verified before enumeration. |
502 |
engine_unreachable: the scanning engine could not be reached. engine_error: the engine rejected the request. Safe to retry later. |
Response fields (200)
| Field | Type | Description |
|---|---|---|
domain_id |
UUID string | The domain that was enumerated. |
assets |
array of object | Assets you can select for a scan. |
assets[].asset_url |
string | Pass this value as asset_url when submitting a scan. |
assets[].asset_type |
string | Kind of asset. One of: host, url, endpoint. |
assets[].signals |
object | What enumeration observed about the asset. |
Reference: Scans
Submit a scan of selected assets, follow it, and fetch the report.
List your scans
GET
/api/scans
Bearer token required
Returns the scans submitted with this token, newest first, up to 200.
Example
curl -sS \ "https://scan.vulzero.cc/api/scans" \ -H "Authorization: Bearer $VZ_TOKEN"
Responses
| Status | Meaning |
|---|---|
200 |
Scans for this token. |
401 |
unauthorized: the Authorization header is missing, or the token is unknown, revoked or expired. |
Response fields (200)
| Field | Type | Description |
|---|---|---|
scans |
array of object | Newest first, at most 200. |
scans[].scan_id |
UUID string | The scan. |
scans[].domain |
string | Domain name the scan ran against. |
scans[].status |
string | queued on submission; completed, failed and cancelled are final. One of: queued, enumerating, scanning, completed, failed, cancelled. |
scans[].created_at |
ISO 8601 time or null | When the scan was submitted. |
Submit a scan
POST
/api/scans
Bearer token required
Starts a read-only scan of the selected assets on a verified domain. consent must be the JSON value true: it is your statement that you are authorized to scan these assets, and the selection is stored as the record of that authorization. Each req_per_sec is clamped to the range 1 to the server cap (default 5); any value that was changed is listed in clamped. A scan sends at most a fixed number of requests in total (default 400). Each domain has one free scan; a failed scan hands it back.
Rate limit. 5 submissions per domain and 20 per client address per rolling hour by default. Over either limit: 429.
Request body
| Field | Type | Description |
|---|---|---|
domain_id |
UUID string, required | A verified domain registered with this token. |
consent |
boolean, required | Must be true: you state that you are authorized to scan the selected assets. |
selections |
array of object, required | The assets to scan and the rate for each. |
selections[].asset_url |
string, required | An asset_url from the scope response. |
selections[].req_per_sec |
integer | Requested request rate for this asset. Clamped to the server cap (default 5). |
Example
curl -sS \
-X POST \
"https://scan.vulzero.cc/api/scans" \
-H "Authorization: Bearer $VZ_TOKEN" \
-H "Content-Type: application/json" \
-d '{"domain_id": "3f2b8c1e-5a47-4e0b-9a55-0c1d2e3f4a5b", "consent": true, "selections": [{"asset_url": "https://app.example.com", "req_per_sec": 3}]}'
Responses
| Status | Meaning |
|---|---|
201 |
Scan accepted and queued. |
400 |
bad_request: the body is not a JSON object. no_selections: selections is missing or empty. bad_selection: a selection has no asset_url. |
401 |
unauthorized: the Authorization header is missing, or the token is unknown, revoked or expired. |
402 |
payment_required: the free scan for this domain has been used. |
403 |
consent_required: consent was not the JSON value true. |
404 |
not_found: no such domain under this token. |
409 |
not_verified: the domain must be verified before scanning. |
429 |
rate_limited: too many recent scans for this domain or from this address. |
502 |
engine_unreachable: the scanning engine could not be reached. engine_error: the engine rejected the request. Safe to retry later. |
Response fields (201)
| Field | Type | Description |
|---|---|---|
scan_id |
UUID string | Use this id to follow the scan and fetch its report. |
status |
string | queued on submission; completed, failed and cancelled are final. One of: queued, enumerating, scanning, completed, failed, cancelled. |
is_free_scan |
boolean | true when this scan used the domain's free scan. |
clamped |
array of object | Selections whose rate was changed; empty when none were. |
clamped[].asset_url |
string | The asset whose rate was changed. |
clamped[].requested |
integer | The rate you asked for. |
clamped[].applied |
integer | The rate the scan will use. |
List your scans (alias)
GET
/api/scans/list
Bearer token required
Same response as GET /scans.
Example
curl -sS \ "https://scan.vulzero.cc/api/scans/list" \ -H "Authorization: Bearer $VZ_TOKEN"
Responses
| Status | Meaning |
|---|---|
200 |
Scans for this token. |
401 |
unauthorized: the Authorization header is missing, or the token is unknown, revoked or expired. |
Response fields (200)
| Field | Type | Description |
|---|---|---|
scans |
array of object | Newest first, at most 200. |
scans[].scan_id |
UUID string | The scan. |
scans[].domain |
string | Domain name the scan ran against. |
scans[].status |
string | queued on submission; completed, failed and cancelled are final. One of: queued, enumerating, scanning, completed, failed, cancelled. |
scans[].created_at |
ISO 8601 time or null | When the scan was submitted. |
Get scan status
GET
/api/scans/{scan_id}
Bearer token required
Status and request usage of one scan. Poll this until status is completed, failed or cancelled.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
scan_id |
path, required | UUID string | scan_id returned by POST /scans. |
Example
curl -sS \ "https://scan.vulzero.cc/api/scans/$SCAN_ID" \ -H "Authorization: Bearer $VZ_TOKEN"
Responses
| Status | Meaning |
|---|---|
200 |
Scan status. |
401 |
unauthorized: the Authorization header is missing, or the token is unknown, revoked or expired. |
404 |
not_found: no such scan under this token. |
502 |
engine_unreachable: the scanning engine could not be reached. engine_error: the engine rejected the request. Safe to retry later. |
Response fields (200)
| Field | Type | Description |
|---|---|---|
scan_id |
UUID string | The scan. |
status |
string | queued on submission; completed, failed and cancelled are final. One of: queued, enumerating, scanning, completed, failed, cancelled. |
requests_used |
integer | Requests the scan has sent so far. |
global_request_budget |
integer | The most requests this scan may send in total. |
created_at |
ISO 8601 time or null | When the scan was submitted. |
finished_at |
ISO 8601 time or null | When the scan ended; null while it is running. |
Fetch the report
GET
/api/scans/{scan_id}/report
Bearer token required
Returns the report of a completed scan, as JSON (default) or as an HTML document. Only the token that submitted the scan can fetch it. Reports expire 30 days after they are created by default; after that this route answers 404.
Parameters
| Name | In | Type | Description |
|---|---|---|---|
scan_id |
path, required | UUID string | scan_id returned by POST /scans. |
format |
query | string | json (default) or html. |
Example
curl -sS \ "https://scan.vulzero.cc/api/scans/$SCAN_ID/report?format=json" \ -H "Authorization: Bearer $VZ_TOKEN"
Responses
| Status | Meaning |
|---|---|
200 |
The report. Content types: application/json, text/html. |
400 |
bad_format: format is not json or html. |
401 |
unauthorized: the Authorization header is missing, or the token is unknown, revoked or expired. |
404 |
not_found: no such scan under this token. expired: the report has passed its expiry. engine_error: the scan has no report yet. |
502 |
engine_unreachable: the scanning engine could not be reached. engine_error: the engine rejected the request. Safe to retry later. |
Response fields (200)
| Field | Type | Description |
|---|---|---|
scan_id |
UUID string | The scan this report belongs to. |
summary |
object | Counts for the scan. |
findings |
array of object | The findings of the scan. |
findings[].check_id |
string | Identifier of the check that fired. |
findings[].title |
string | Short description of the finding. |
findings[].severity |
string | Severity of the finding. One of: info, low, medium, high, critical. |
findings[].asset_url |
string | The asset the finding applies to. |
findings[].evidence |
object | Limited supporting evidence. Never a raw response body. |
expires_at |
ISO 8601 time or null | When the report stops being available. |
Questions
VZ-Scan is operated by Vulzero Cybersecurity Inc. Before you scan, read the acceptable use and terms pages. To report a security problem in this service, see security.txt.