Skip to content

Suppress an accessibility finding

POST
/v1/sites/{id}/a11y-suppressions
curl --request POST \
--url https://api.overwatch.weareheavy.dev/v1/sites/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/a11y-suppressions \
--header 'Content-Type: application/json' \
--header 'x-api-key: <x-api-key>' \
--data '{ "rule": "color-contrast", "selector": ".hero .tagline", "reason": "Brand colors; approved by design." }'

Create an “Ignore” suppression for an accessibility finding. Scope is set by which fields are provided:

  • rule only — suppress the rule site-wide.
  • rule + selector — suppress that element wherever it appears.
  • rule + selector + pageUrl — suppress that one occurrence.

Suppressions apply retroactively (the report recomputes) and are reversible via the delete endpoint.

id
required
string format: uuid

The site’s UUID.

Media typeapplication/json
object
rule
required

The axe-core rule id to suppress.

string
selector

Limit the suppression to elements matching this selector.

string | null
pageUrl

Limit the suppression to this page (requires selector to pinpoint one occurrence).

string | null
reason

Why the finding is being ignored, for the audit trail.

string | null
Example
{
"rule": "color-contrast",
"selector": ".hero .tagline",
"reason": "Brand colors; approved by design."
}

Suppression created.

Media typeapplication/json
object
suppression
required

A stored “Ignore” suppression.

object
id
required
string format: uuid
tenant_id
required
string
site_id
required
string format: uuid
rule
required
string
selector
required

CSS selector to match; null = any element.

string | null
page_url
required

Page to match; null = any page.

string | null
reason
required
string | null
created_by
required

The user who created the suppression, if known.

string | null
created_at
required

Epoch ms.

integer
Examplegenerated
{
"suppression": {
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"tenant_id": "example",
"site_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"rule": "example",
"selector": "example",
"page_url": "example",
"reason": "example",
"created_by": "example",
"created_at": 1
}
}

rule is missing.

Media typeapplication/json
object
error
required

A human-readable error message.

string
Example
{
"error": "rule is required"
}

Missing or invalid credentials.

Media typeapplication/json
object
error
required

A human-readable error message.

string
Example
{
"error": "invalid api key"
}

No site with that id is visible to the caller.

Media typeapplication/json
object
error
required

A human-readable error message.

string
Example
{
"error": "site not found"
}