Error
A valid request URL is required to generate request examples{
"scanJobId": "cmrasmw4702sdstu9j4iq1x55",
"id": "<string>",
"repository": {
"id": "<string>",
"fullName": "my-org/payments-api",
"newlyCreated": true
}
}{
"error": "Invalid or expired API token"
}{
"error": "API token missing required scope",
"required": "scans:trigger",
"granted": [
"scans:read"
]
}{
"error": "Scan job not found"
}Scans
Trigger a scan on an existing Domain (DAST / pentest target)
POST
/
api
/
domains
/
{domainId}
/
scan
Error
A valid request URL is required to generate request examples{
"scanJobId": "cmrasmw4702sdstu9j4iq1x55",
"id": "<string>",
"repository": {
"id": "<string>",
"fullName": "my-org/payments-api",
"newlyCreated": true
}
}{
"error": "Invalid or expired API token"
}{
"error": "API token missing required scope",
"required": "scans:trigger",
"granted": [
"scans:read"
]
}{
"error": "Scan job not found"
}Authorizations
Scoped API token from Settings → API Tokens (scopes: scans:trigger, scans:read).
Headers
Cloudflare Access service-token client id (ends in .access). Only for CF-Access-fronted deployments; leave blank for self-hosted.
Cloudflare Access service-token secret. Pair it with CF-Access-Client-Id.
Path Parameters
BreachLens Domain ID.
Body
application/json
Optional body. Omit to run the server default scan set for the target.
Scan tiers to run. Omit for the server default (SAST, SCA, SECRET, IAC for repositories). Valid values depend on target type.
Example:
["SAST", "SCA", "SECRET", "IAC"]