Fail a pull request on visual regression
Compare production against a preview deploy and fail the check past a mismatch threshold.
curl --request POST \
--url https://api.prod.ss.snapshot-site.com/api/v3/compare \
--header 'Content-Type: application/json' \
--header 'x-snapshotsiteapi-key: YOUR_API_KEY' \
--data '{
"before": {"url": "https://example.com/pricing", "width": 1440, "fullSize": true},
"after": {"url": "https://preview.example.com/pricing", "width": 1440, "fullSize": true},
"threshold": 0.1
}'