Scan a site
scan_siteQueue a launch-readiness scan of a URL and return at once; the crawl runs in the background. The project comes from the URL (same site → that project; none → a new one). Poll get_report after pollAfterMs until status is completed or failed. On Free, the first custom domain answers binding_required with proposedDomain: the workspace then checks that one site for good (subdomains and preview URLs stay open). Ask the user before repeating with confirmDomain: true. Never confirm on their behalf. A redirect to another site answers target_mismatch with redirectedTo. Scan a deploy only once it is live.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | The deployed address to check, e.g. https://staging.client.com/. | |
| scanMode | No | Default never spends. Full requires subscription or explicit credit consent. | |
| projectId | No | Only when project_ambiguous lists candidates. | |
| allowCredit | No | Explicitly allow reserving one Full Scan Credit; requires idempotencyKey. | |
| environment | No | Override what the host implies. Production on a preview URL reports preview-only settings as blockers. | |
| confirmDomain | No | Free only: true once the user agreed to bind the workspace to proposedDomain. | |
| idempotencyKey | No | Commit SHA or deploy id, so a retry returns the same scan instead of queuing another. | |
| acknowledgeWithdrawal | No | Needed when the credit spent is a purchased one: the account holder asks for the Full Scan now and accepts that the right of withdrawal from that purchase ends once the report is delivered. Ask them first. |