Documentation Menu

REST API

For maximum flexibility, you can interact directly with the RegressionBot REST API. All endpoints are hosted at https://api.regressionbot.com/v1.

Authentication

Provide your API key via the x-api-key header in all requests.

Start a Job

Initiate a visual regression scan. You can test a single URL, an array of paths, or automatically crawl a sitemap.

POST /crawl
curl -X POST https://api.regressionbot.com/v1/crawl \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "project": "my-web-app",
    "testOrigin": "https://preview.myapp.com",
    "baseOrigin": "https://myapp.com",
    "devices": ["Desktop Chrome"],
    "sitemapUrl": "https://preview.myapp.com/sitemap.xml",
    "scan": "**"
  }'

Tip: Use the ** (globstar) pattern in the scan field to recursively test all URLs found in the sitemap, including nested directories.

Check Status & Results

Poll /job/{jobId} to track progress, then fetch /job/{jobId}/summary once the job reaches COMPLETED for the full results including diff images, AI-powered [RegressionBot Summaries](/docs/regressionbot-summaries), and perceptual similarity scores.

GET /job/{jobId}/summary
curl https://api.regressionbot.com/v1/job/JOB_ID_HERE/summary \
  -H "x-api-key: YOUR_API_KEY"

Job Lifecycle

Jobs move through the following statuses. Poll /job/{jobId} until you see COMPLETED, APPROVED, or FAILED.

StatusMeaning
INITIALIZINGJob accepted, workers starting up.
PROCESSINGScreenshots being captured and compared in parallel.
SUMMARIZINGAll screenshots done. [RegressionBot Summaries](/docs/regressionbot-summaries) are being generated for regressions.
COMPLETEDJob finished. Full results and AI summaries available.
APPROVEDChanges were approved and promoted to baselines.
FAILEDA critical error stopped the job.

Result Fields

Each URL/device combination in the results array includes two complementary signals for understanding what changed.

FieldDescription
diffPercentagePercentage of pixels that changed. Values ≥ 0.01% are flagged as regressions.
visualMatchScorePerceptual similarity score (0–100). A score ≥ 99 alongside a small diffPercentage indicates rendering noise or anti-aliasing rather than a real change.
regressionbotSummaryA concise AI-generated description of what visually changed — available after the job reaches COMPLETED. See [RegressionBot Summaries](/docs/regressionbot-summaries) for details.
diffUrlPre-signed URL to a 3-panel side-by-side image (before / after / highlighted diff). Expires after 1 hour.
baselineUrlPre-signed URL to the baseline screenshot.
currentUrlPre-signed URL to the current screenshot.

Interpreting the signals together: A page with diffPercentage: 0.03% and visualMatchScore: 99.8 is almost certainly rendering noise. A page with diffPercentage: 12% and visualMatchScore: 74 is a real regression worth investigating.