Happo exposes a public, REST-like, API that you can use to create or enhance custom integrations. The API resides at https://happo.io, and all endpoints use the /api namespace.
OpenAPI spec for the public Happo API
Want to use Happo from Claude, ChatGPT, Cursor, or another AI assistant? Happo also runs an MCP server with OAuth so AI agents can list comparisons, inspect diffs, and accept, reject, or report flakes for them.
All API endpoints are auth protected. To successfully issue a command, you need to provide an authentication header with your request. There are two ways to authenticate. JWT authentication is more secure but can be a little tricky to set up. HTTP Basic authentication is a less secure alternative, but is a good option if you want a simpler setup.
With Basic authentication, you provide an Authorization: Basic <token> header where the token is a base64 encoded string of your apiKey:apiSecret tokens.
This auth token is a JSON web token generated based on your API key and API secret. Pass { key: <your API key> } as the payload of the JWT call and the API secret as the secret, and set a kid header equal to the API key. Pass the resulting token as a Authorization: Bearer <generated token> header in all API requests.
An example of how to construct the JWT token can be found in the source code for the happo.io client.
Here's a full list of API paths you can call. All endpoints speak JSON. Body params are sent as a JSON blob in the body of the request. Responses are sent as JSON in the body of the HTTP response.
POST /
Uploads a list of snapshots for a certain identifier (usually a commit sha). If there is an existing report for the same sha, it will be overwritten as a result of calling this endpoint, unless you're posting partial reports.
:sha StringThe id of the report.
snaps Array<Snapshot>A list of snapshot objects associated with the report
project optional StringThe identifying name of the project this report should belong to. If none is specified, the default project will be used.
link optional StringURL to the source of the report (e.g. PR URL).
message optional StringA short string describing the source of the report (e.g. PR title).
partial optional BooleanSet this to true to amend the report instead of overwriting it. This is useful if you are running multiple processes for the same sha. Remember to call the Complete Report endpoint once you are done uploading all the partials, otherwise the report will never be fully constructed and useful.
json ReportStatusAn object containing a url where the uploaded report can be accessed
400The snapshot data is invalid (e.g. missing required fields), or the report has been archived and can no longer be modified.
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
GET /
Gets a list of snapshots for a certain identifier (usually a commit sha).
:sha StringThe id of the report.
project optional StringThe identifying name of the project this report belongs to. If none is specified, the default project will be assumed.
json Array<Snapshot>A list of snapshots associated with this sha.
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
404No report found for the given sha and project.
GET /
Gets some metadata about a report.
To fetch status for multiple projects in one request, pass a comma-separated
list of project names in the projects query parameter:
GET /api/reports/abc123/status?projects=web,mobile,ios
The response is an array with one entry per project, in the same order as the
input. If no report exists for a given project the entry will contain an
error field instead of the usual status fields:
[
{
"project": "web",
"url": "https://happo.io/a/1/p/2/report/abc123",
"snapshotCount": 42,
"completedAt": "2024-01-15T10:30:00.000Z",
"createdAt": "2024-01-15T10:00:00.000Z"
},
{
"project": "mobile",
"error": "report not found"
},
{
"project": "ios",
"url": "https://happo.io/a/1/p/4/report/abc123",
"snapshotCount": 18,
"completedAt": "2024-01-15T10:45:00.000Z",
"createdAt": "2024-01-15T10:05:00.000Z"
}
]
:sha StringThe id of the report.
project optional StringThe identifying name of the project this report belongs to. If none is specified, the default project will be assumed. Cannot be combined with "projects".
projects optional StringComma-separated list of project names to fetch status for (e.g. "web,mobile,ios"). When provided, the response will be an array of ReportStatus objects, each including a "project" field. If no report exists for a project, that item will include an "error" field instead. Cannot be combined with "project".
json ReportStatus | Array<ReportStatus>A ReportStatus object, or an array of ReportStatus objects when "projects" is used. Each array item includes a "project" field identifying the project, and an "error" field if no report was found for that project.
400Both project and projects were specified (they are mutually exclusive), or projects is not a valid comma-separated string.
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
404No report found for the given sha and project. Only returned when using the project parameter — when using projects, missing reports appear as { project, error } items in the 200 response array instead.
POST /
When you're uploading partial reports (via the Create Report endpoint), you need to use this endpoint to signal that all the partials have been added and that the report is complete.
:sha StringThe id of the report.
project optional StringThe identifying name of the project the reports belong to. If none is specified, the default project will be assumed. Cannot be combined with "projects".
projects optional Array<String>An array of project names to complete in a single request. When provided, the response will be an array of ReportStatus objects, each including a "project" field. Cannot be combined with "project".
json ReportStatus | Array<ReportStatus>A ReportStatus object, or an array of ReportStatus objects when "projects" is used. Each array item includes a "project" field identifying the project, and an "error" field if completion failed for that project.
400Both project and projects were specified (they are mutually exclusive), or projects is not an array.
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
404No partial report found to complete. Only returned when using the project parameter — when using projects, failures appear as { project, error } items in the 200 response array instead.
POST /
Clones a report from one identifier/sha to another. This is useful if you know a commit doesn't introduce any visual changes but you still want it to be associated with a report. An example use-case of this would be if you have some logic to skip a Happo run if a PR has already run Happo on a commit, and a subsequent commit does not touch any UI code. You can then clone the existing report (from the previous commit) to the new commit. After that you can run a comparison with the cloned report set as the "after" report to trigger a Happo build status on the PR.
Cloning a report does not affect your snapshot usage.
:fromSha StringThe id of the report to clone from
:toSha StringThe id of the report to clone to
project optional StringThe identifying name of the project for which the clone should be created. If none is specified, the default project will be used.
link optional StringURL to the source of the report (e.g. PR URL). If omitted, the link from the source/from report will be used
message optional StringA short string describing the source of the report (e.g. PR title). If omitted, the link from the source/from report will be used.
json ReportStatusAn object containing a url where the uploaded report can be accessed
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
404The source report (fromSha) does not exist for the given project.
POST /
Tells Happo to skip running for a certain commit SHA. This is useful if you have Happo configured as a required check for your PRs but want to avoid running Happo tests (e.g. because no UI code changed). The given SHA must be present in your origin repo (e.g. on GitHub) before calling this endpoint. Calling this endpoint will post a successful build status to the PR/commit.
If the skip is successful, this endpoint will return a 204 status code, or with
ifNotStarted, a 200 with { "posted": true }, or { "posted": false, "reason": "…" } when a run had already started. If the SHA is not present in
the origin repo, the call will fail with a 404 error.
Without ifNotStarted, a project that already has a Happo run on the commit
is taken out of that run.
Example, in the CI step that decides not to run Happo:
curl --fail-with-body --silent --show-error \
-u "$HAPPO_API_KEY:$HAPPO_API_SECRET" \
--json '{"project": "components", "group": true, "ifNotStarted": true}' \
"https://happo.io/api/skip/$HEAD_SHA"
:sha StringThe SHA of the commit to skip. This must be the full SHA, not a partial SHA.
project optional StringThe identifying name of the project associated with the call (default is the default project for the account).
label optional StringAn optional message to use with the build status (default is "Skipped")
group optional Boolean | StringThe status check group to post the status for, when no job has the project: true for the default group's Happo status check, or a group's name for Happo (<group>). Leave empty to post the project's own status.
ifNotStarted optional BooleanPost nothing when a Happo run for the project (or, with a group, for any project in the group) has already started on the commit, instead of taking the project out of it. The response is then a JSON object saying whether a status was posted. Pass true wherever CI calls this in place of running Happo.
json SkipResultWhat the skip did, when called with ifNotStarted.
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
404The given SHA is not present in the origin repository.
POST /
Compare reports and get useful information on the possible differences.
:sha1 StringThe id of the "before" report.
:sha2 StringThe id of the "after" report.
project optional StringThe identifying name of the project the reports belong to. If none is specified, the default project will be assumed. Cannot be combined with "projects".
projects optional Array<String>An array of project names to compare in a single request. When provided, the response will be an array of Comparison objects, each including a "project" field. If a comparison fails for an individual project (e.g. no report exists for that sha), that item will include an "error" field instead of comparison data — the other projects in the array are unaffected. Cannot be combined with "project".
link optional StringURL to the source of the report (e.g. PR URL).
message optional StringA short string describing the source of the report (e.g. PR title).
notify optional StringAn email address, or a list of comma-separated email addresses that you want to notify with the results of the comparison.
isAsync optional BooleanSet this option to true to make calls return immediately, without waiting for comparison results. You'll have to rely on the build status for the results. Using this option will also allow you to schedule future comparisons on reports that are currently being processed.
fallbackShas optional Array<String>Provide a list of shas/report identifiers that the comparison is allowed to fall back to, if the sha1 param isn't matching any reports. The order of this list matters -- put the most desirable fallback first in the list.
deepCompare optional DeepCompareSettingsOverride project deep compare settings for this comparison. When provided, these settings override any settings on the project.
blockApproval optional BlockApprovalWhat keeps this comparison from being approved. The happo library sends its blockApproval config option here. It applies to this comparison only, and replaces what an earlier request for the same two reports set.
json Comparison | AsyncComparison | Array<Comparison> | Array<AsyncComparison>When isAsync is false (default): a Comparison object, or an array of Comparison objects when "projects" is used. When isAsync is true: an AsyncComparison object, or an array of AsyncComparison objects when "projects" is used. Each array item includes a "project" field identifying the project, and an "error" field if the comparison failed for that project.
400Both project and projects were specified (they are mutually exclusive), projects is not an array, or another validation error occurred. When using projects, per-project failures are returned as { project, error } items in the 200 response array rather than as a 400 status.
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
GET /
Get the comparison status between two reports. This endpoint can be used after the "Compare two reports" endpoint has been used, to check for the current resolution status.
An async comparison (isAsync: true) can compare with another "before"
report than sha1: the report the "after" report extends, or a fallback or
earlier commit when sha1 has no report. Asked for with sha1, this
endpoint answers with that comparison, whose sha1 is the report it
compared with. Until an async comparison is done, it answers 404.
:sha1 StringThe id of the "before" report.
:sha2 StringThe id of the "after" report.
project optional StringThe identifying name of the project the reports belong to. If none is specified, the default project will be assumed.
json ComparisonStatusAn object with the current comparison status
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
404No comparison found for the given sha pair and project, or an async comparison of them that is not done yet.
GET /
Get all comparison statuses for a sha. The response will contain a list of comparison statuses where the report is either the "before" report or the "after" report.
:sha StringThe id of a report.
project optional StringThe identifying name of the project the reports belong to. If none is specified, the default project will be assumed.
json Array<ComparisonStatus>A list of comparison statuses for the :sha
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
GET /
Get the full comparison results between two reports, including all snapshots grouped by their status: diffs, added, deleted, unchanged, and ignored diffs.
This endpoint is useful for programmatically reviewing visual changes — for example, to enable AI agents to inspect diffs for pull requests they are opening.
To look up results using a Happo comparison URL
(/a/{accountId}/p/{projectId}/compare/{sha1}/{sha2}), extract the sha1
and sha2 path segments and use them as the path parameters here.
:sha1 StringThe id of the "before" report.
:sha2 StringThe id of the "after" report.
project optional StringThe identifying name of the project the reports belong to. If none is specified, the default project will be assumed.
json ComparisonA Comparison object with full snapshot data for all diffs, added, deleted, unchanged, and ignored diffs.
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
404No comparison found for the given sha pair and project.
GET /
Get comparisons from your account.
from optional Date(An ISO 8601 string) Get comparisons created after this timestamp.
to optional Date(An ISO 8601 string) Get comparisons created before this timestamp.
limit optional NumberDefault 10. Controls how many items are returned.
project optional StringThe name of the project to return comparisons for. If left out, comparisons for all projects will be returned.
json Array<ComparisonStatus>A list of comparison statuses
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
POST /
Tell Happo that you are about to run a comparison between two shas. A job will either be created (when no orchestration job exists for the same shas) or reused (when an orchestration job exists for the shas).
When you pass a group, every project for the same shas joins one job
instead, without an orchestration call, and the job posts one status check per
group: Happo for the default group (true), and Happo (<group>)
for a named one.
:sha1 StringThe id of the "before" report.
:sha2 StringThe id of the "after" report.
project optional StringThe project (identifying name) which this job is running for. Leave empty to use the default project.
projects optional Array<String>Pass an array of project names to create multiple jobs in one go. If orchestration is used, only one job will be created. If multiple jobs are created, the response will be an array of jobs.
group optional Boolean | StringThe status check group the project reports to: true for the default group, which posts the Happo status check, or a name for a group of its own, Happo (<group>). Leave empty (or pass false) to get a job of its own for the project, as before groups existed.
link optional StringURL to the source of the job (e.g. PR URL).
message optional StringA short string describing the source of the job (e.g. PR title).
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
POST /
Tell Happo that you are about to run multiple comparisons between two shas. A special report will be created and a single, combined build status will be posted to GitHub.
:sha1 StringThe id of the "before" report.
:sha2 StringThe id of the "after" report.
projects Array<String>A list of projects (identifying names) that you want to be part of the job.
link optional StringURL to the source of the orchestration job (e.g. PR URL).
message optional StringA short string describing the source of the job (e.g. PR title).
json JobAn object with details about the job that was created/found.
400projects must be an array.
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
POST /
Tell Happo that a job comparing two shas had to be cancelled for some reason. It might have been cancelled in CI or failed in some other way. When you're using orchestrated jobs, this can help prevent orchestrated jobs getting in an infinite "pending" state.
If the job is successfully cancelled, this endpoint will return a 204 No Content response.
If no job is found for the given SHA pair, this endpoint will return a 404 Not Found response.
If the job has already been completed, this endpoint will return a 409 Conflict response. This is expected behavior when the job has already finished processing.
:sha1 StringThe id of the "before" report.
:sha2 StringThe id of the "after" report.
project optional StringThe project (identifying name) which this job is running for. Leave empty to use the default project.
status optional StringEither "failure" or "success". This will control what status will be posted to GitHub. The default is "failure".
link optional StringURL to the source of the report (e.g. PR URL).
message optional StringA description of why the job was cancelled, e.g. "Cancelled in CI"
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
404No job found for the given sha pair and project.
409The job has already been completed and cannot be cancelled. This is expected when the job has already finished processing.
GET /
Get jobs from your account. A job encompasses creating a report and comparing that report with a previous report. Jobs can be automatically created (if you e.g. use any of the happo-ci* scripts) or manually via the API.
from optional Date(An ISO 8601 string) Get jobs created after this timestamp.
to optional Date(An ISO 8601 string) Get jobs created before this timestamp.
limit optional NumberDefault 10. Controls how many items are returned. Max is 100 -- if you specify a larger number you will still get at most 100 back.
json Array<JobDetails>A list of jobs
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
GET /
Get a job by its ID
:id NumberThe ID of the job
json JobDetailsDetails about the job
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
404No job found with the given ID.
POST /
Approve or reject the comparison between two reports, the same way a reviewer does from the Happo comparison page. The resolution isn't attributed to a Happo user. If the comparison is linked to a pull request, its Happo status check is updated too.
Pull request tokens can't be used with this endpoint. On an account that only lets selected users review, the request has to come from one of those reviewers: an API key one of them created, or their own Google IAP identity.
:sha1 StringThe id of the "before" report.
:sha2 StringThe id of the "after" report.
resolution StringEither "success" (approve the comparison) or "failure" (reject it).
project optional StringThe identifying name of the project the reports belong to. If none is specified, the default project will be assumed.
json ComparisonStatusAn object with the updated comparison status
400resolution is missing or not one of the allowed values, or project is not a string.
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
403The request was authenticated with a pull request token, or the account only lets selected users review and the API key was not created by one of them.
404No project with the given name, or no comparison found for the given sha pair and project.
409The comparison cannot be approved because of what its blockApproval holds against it: examples in the after report failed to render, or the after report introduces new accessibility violations. Rejecting is still allowed.
GET /
Get a list of reported flakes for the current account, optionally filtered by project, component, variant, target, or sha.
project optional StringThe identifying name of the project to filter flakes for. If omitted, flakes for all projects are returned.
limit optional NumberDefault 100. Controls how many items are returned. Max is 1000.
page optional NumberPage number for pagination. First page is 1.
component optional StringFilter flakes by component name.
variant optional StringFilter flakes by variant name.
target optional StringFilter flakes by target name.
sha optional StringFilter flakes by comparisons that include this sha as before or after.
json Array<Flake>A list of reported flakes
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
POST /
Use this endpoint to mark a diff between two snapshots as ignored. The
snapshotId1/snapshotId2 params need to correspond to ids from Snapshot
objects.
An ignored diff counts as accepted in every comparison that contains it. On an account that only lets selected users review, the request has to come from one of those reviewers: an API key one of them created, or their own Google IAP identity.
snapshot1Id StringA snapshot id
snapshot2Id StringA snapshot id
project optional StringThe name of the project to ignore the diff for. If omitted, the project will be looked up in the database. Providing a project name is more efficient.
json ObjectAn empty object.
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
403The account only lets selected users review, and the request did not come from one of them (or from an API key one of them created).
404One or both snapshot IDs do not match any known snapshot.
DELETE /
Use this endpoint to remove an ignored diff between two snapshots. The
snapshot1Id/snapshot2Id params need to correspond to ids from Snapshot
objects.
On an account that only lets selected users review, the request has to come from one of those reviewers: an API key one of them created, or their own Google IAP identity.
snapshot1Id StringA snapshot id
snapshot2Id StringA snapshot id
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
403The account only lets selected users review, and the request did not come from one of them (or from an API key one of them created).
404One or both snapshot IDs were not provided or do not match any known ignored diff.
POST /
Add subscribers (email addresses) to a specific UI component. When a diff is found in a component, subscribers are notified with a link to the Happo comparison. Users can themselves unsubscribe manually. If you try adding an email address that has been unsubscribed by the user, it will be ignored and the user will continue to be unsubscribed.
:component StringThe name of a component. Should match component names that are in the reports.
emailAddresses Array<String>A list of email addresses to add as subscribers.
400emailAddresses is missing or contains invalid email addresses.
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
DELETE /
Remove subscribers for a specific UI component.
:component StringThe name of a component. Should match component names that are in the reports.
emailAddresses Array<String>A list of email addresses to remove subscriptions for.
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
GET /
Get the latest snapshot for a component variant.
:component StringThe name of a component. Should match component names that are in the reports.
:variant StringThe name of the variant. Should match variant names that are in the reports.
:target StringThe target of the snapshot. Should match target names that are in the reports.
project optional StringThe identifying name of the project this report belongs to. If none is specified, the default project will be assumed.
json SnapshotAn object with details about the snapshot.
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
404No snapshot found for the given component, variant, and target.
GET /
Get a sorted list of components and the number of diffs they have in the project's comparisons. This endpoint can be used to figure out what components contribute the most to flaky/spurious diffs. Diffs are kept for a limited time (10 days by default), so a longer date range has no more to count.
project optional StringThe identifying name of the project to fetch diff counts for. If none is specified, the default project will be used.
from optional Date(An ISO 8601 string) Show diff counts after this point in time. Default is 30 days ago.
to optional Date(An ISO 8601 string) Show diff counts up until this point in time. If you don't pass in this parameter, you'll get diff counts up until the current timestamp.
json ArrayAn ordered list of components and their respective diff counts.
400The from or to date parameter is not a valid ISO 8601 date string.
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
GET /
Get the snapshots usage in the current billing cycle. If there is no active subscription for the account, you'll receive a 404 response.
json UsageUsage information for the current billing cycle
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
404The account has no active subscription.
GET /
Get all active projects (not archived) for the current account.
json Array<ProjectInfo>A list of projects
401Missing or invalid authentication credentials. All endpoints require authentication via Basic auth or Bearer token.
These are the domain objects you can come across while communicating with the API.
An object describing a screenshot of a certain component variant
url StringURL of the screenshot image. It's important that the URL is deterministically generated based on the contents of the image. A hash function (like md5) is of good help here, so that two images that have the same bitmap content end up having the same URL.
variant StringThe name of the variant (e.g. "disabled")
target StringThe snapshot's target (e.g. "firefox", "iphone 7")
component StringThe name of the component shown in the screenshot (e.g. "Button")
width NumberThe pixel width of the screenshot image
height NumberThe pixel height of the screenshot image
id StringA unique identifier for the snapshot
An object with information about a screenshot image.
url StringURL leading to the screenshot image
width NumberThe pixel width of the screenshot image
height NumberThe pixel height of the screenshot image
An object with useful properties for a report.
url StringA URL leading to the report page
completedAt Date(An ISO 8601 string) Present if all the partials for a report have been added. Null otherwise. If you're not using partial reports, this value is always present.
createdAt Date(An ISO 8601 string) The timestamp for when the report was initially created.
snapshotCount NumberThe total number of snapshots included in the report
An object with details about why a diff was ignored.
byName StringThe display name of the user who ignored the diff, or null when there is none to name: an automatic ignore, a flake reported with an API key, or one whose reporter has since deleted their profile (see ignoredBy).
byEmail StringThe email of the user who ignored the diff, or null when there is none to name: an automatic ignore, a flake reported with an API key, or one whose reporter has since deleted their profile (see ignoredBy).
createdAt DateISO 8601 timestamp for when the ignore was recorded.
ignoredBy StringWho ignored the diff: "user" for a flake a person reported on
the comparison page (even if they have since deleted their profile,
and for any flake reported before Happo recorded where from),
"api" for one reported through the API (with an API key, or
signed in), "mcp" for one reported through the Happo MCP server,
or "automated" for a diff Happo ignored itself, most often
because the project's deep-compare thresholds (compareThreshold
and ignoreThreshold) let it through.
dataHappoHide optional BooleanPresent and true when the diff was automatically ignored because the element uses the data-happo-hide attribute.
reason optional StringPresent when Happo ignored the diff by itself for a reason other than its deep-compare thresholds (compareThreshold and ignoreThreshold). antialiasing: every pixel that differs is anti-aliasing, the smoothing along the edges of text and shapes. identical: the two images have the same pixels, and only their files differ.
sourceComparison optional ObjectPresent when the diff was ignored as a result of a reported flake. Contains beforeSha, afterSha, and projectId identifying the comparison that triggered the ignore.
An object with useful properties describing the differences between two reports.
diffs Array<Array<Snapshot>>A list of snapshots that are different. Each item in the array is a tuple/array with the before snapshot and the after snapshot.
ignoredDiffs Array<[Snapshot, Snapshot, IgnoredDiffDetails]>A list of diffs that were ignored. Each item in the array is a tuple/array with the before snapshot, the after snapshot, and details about why the diff was ignored.
added Array<Snapshot>Snapshots that have been added
deleted Array<Snapshot>Snapshots that have been removed
unchanged Array<Snapshot>A list of identical snapshots
summary StringA summary of the results, with the most important information listed
equal BooleanTrue if the two reports are identical, false otherwise. Also false when an example in the after report failed to render and the comparison was created with blockApproval.renderErrors
renderErrors NumberThe number of examples in the after report that failed to render, and were
reported as their error instead of a screenshot. A comparison with render
errors cannot be approved when it was created with blockApproval.renderErrors.
Only accounts with render errors reported as text turned on get these; for
everyone else it is 0.
status StringEither "failure" or "success". If the two reports are equal, or a user has manually accepted the comparison, the value is "success". If the two reports are not equal, or a user has manually rejected the comparison, the value is "failure".
compareUrl StringA link to a happo report page
statusImageUrl StringA link to an image showing the status for the comparison
An object with information about the status of a comparison.
sha1 StringThe id of the "before" report.
sha2 StringThe id of the "after" report.
status StringOne of three values: "success" when the comparison is approved, "failure" when the comparison has been rejected or "needs review" when the comparison needs a review
url StringA URL leading to the comparison page
createdAt Date(An ISO 8601 string) The timestamp for when the comparison was initially created.
diffs NumberThe number of diffs in this comparison
unchanged NumberThe number of unchanged snapshots
added NumberThe number of added snapshots
deleted NumberThe number of deleted snapshots
link StringA URL leading to the PR/commit that triggered the comparison
message StringA description of the PR/commit that triggered the comparison
project StringThe name of the project that this comparison belongs to
axeViolationsDelta NumberHow many more accessibility violations the after report has than the before report (negative when it has fewer)
An object describing a reported flake.
project StringThe name of the project that this flake belongs to. Null for a flake carried over from an ignored diff that had no project.
component StringThe component name
variant StringThe variant name
target StringThe target name
snapshots Array<SnapshotInfo>An array with the before and after snapshots, in that order
comparison ComparisonStatusComparison status for the flake, if available
user ObjectThe user who reported the flake. Null for a flake reported with an API key, or one whose reporter has since deleted their profile.
reportedVia StringWhere the flake was reported: "ui" (the comparison page), "api" (the API, with an API key or signed in) or "mcp" (the Happo MCP server). null for a flake reported before Happo recorded this.
createdAt Date(An ISO 8601 string) The creation timestamp
occurrenceCount NumberThe total number of times this flake has been detected across all comparisons
What a skip did, when it was called with `ifNotStarted`.
posted BooleanWhether Happo posted a passing status. False when a Happo run had already started on the commit, which posts the status instead.
reason optional StringWhy nothing was posted, when nothing was.
A small object with basic properties for a job.
url StringA URL leading to the job page
id NumberA unique identifier for the job
Snapshots usage information
total NumberThe number of snapshots used in a billing cycle
quota NumberThe number of snapshots included in the subscription (null for a plan without a limit)
A small object with basic properties for a project.
id NumberA unique identifier for the project
name StringThe name of the project
An object with useful properties for a job.
id NumberA unique identifier for the job
createdAt Date(An ISO 8601 string) The creation timestamp for the job
finishedAt Date(An ISO 8601 string) The timestamp when the job finished
sha1 StringThe ID of the "before" report
sha2 StringThe ID of the "after" report
description StringA description of the status that the job has
status StringCan be "failure", "success", or "pending"
link StringURL to the source of the job (e.g. PR URL).
message StringA short string describing the source of the job (e.g. PR title).
url StringA URL leading to the job page
projects Array<ProjectInfo>A list of projects associated with the job
An object with settings for deep compare.
diffAlgorithm StringAlgorithm to use for diff comparison. Must be "color-delta" or "ssim".
compareThreshold NumberWith color-delta, the color delta threshold: how different two pixels may be before they count as changed. With ssim, the SSIM threshold: the images count as equal when their structural difference (1 minus the SSIM of the whole images) is below it. A float between 0 and 1.
ignoreThreshold NumberThe pixel threshold, for the color-delta algorithm: the share of pixels in the image that may be above compareThreshold before the images count as different. E.g. a value of 0.01 means 1% of the pixels can be above compareThreshold (float between 0 and 1).
ignoreWhitespace BooleanWhether to ignore whitespace in the diff. If true, whitespace differences will be ignored when comparing images.
applyBlur BooleanWhether to apply blur to the diff. This can be used to smooth out subtle differences that would otherwise be above compareThreshold.
What keeps a comparison from being approved. Every attribute is optional, and leaving one out means it is not specified. Approving a blocked comparison is refused with a 409, and an approval carried over from an earlier comparison does not apply to it.
renderErrors BooleanWhen true, the comparison cannot be approved while an example in the after report failed to render, whether the error is new or was already in the before report, and the comparison is never equal. Only has an effect for accounts with render errors reported as text turned on. When not specified, render errors do not block approval.
accessibilityViolations BooleanWhen true, the comparison cannot be approved while the after report has accessibility violations that the before report did not have. When not specified, new accessibility violations do not block approval.
horizontalOverflow BooleanWhen true, the comparison cannot be approved while a page in the after report scrolls sideways where it fit in the before report, or a snapshot only the after report has scrolls sideways. Only targets that set detectHorizontalOverflow measure it, and a before snapshot taken without it doesn't count as having fit. When not specified, pages that start to scroll sideways do not block approval.
An object returned when a comparison is created with `isAsync: true`. The comparison will be completed asynchronously in the background.
id NumberThe id of the async comparison.
statusImageUrl StringA URL to an SVG image showing the current status of the comparison.
compareUrl StringA URL to the comparison page.