---
title: "Accessibility audit"
method: POST
path: "/v1/emails/{emailId}/accessibility-audit"
tags: ["Emails"]
---

# Accessibility audit

`POST /v1/emails/{emailId}/accessibility-audit`

Audit the email’s latest rendered HTML for accessibility issues against WCAG 2.1 (missing alt text, non-descriptive links, low text contrast, tiny fonts, missing `lang`, empty headings). Returns a `score` (0–100), a `summary`, and a list of `issues` with their WCAG criterion. FIXED cost: 5 credits (`X-Credit-Cost: 5`), charged ONLY on success — if the audit cannot complete in time, the call returns a retryable `503` and is NOT billed.

## Path parameters

- `emailId` string, required — Design id returned by `POST /v1/emails` and listed by `GET /v1/emails`.

## Response `200`

The audit result.

- EmailAccessibilityAuditResponse
  - `score` integer, required
  - `summary` object, required
    - `errors` integer, required
    - `warnings` integer, required
  - `issues` object[], required
    - `rule` string, required
    - `severity` 'error' | 'warning', required
    - `message` string, required
    - `wcag` string
    - `element` string

## Other responses

- `401` — The API key was missing, invalid, or revoked.
- `402` — The org's remaining credit balance is below what this operation requires. Credit cost is published PER-OPERATION (see `GET /v1/help`): content/media operations charge a flat cost, while AI generation (email generate/edit/import, image generation) is usage-metered — charged by actual model usage rather than a flat price. `details.cost` carries the amount the runtime required for THIS call. Check your balance up front via `GET /v1/usage`. No `Retry-After` — credits reset at the billing-period boundary.
- `403` — The caller does not have the required `emails` permission.
- `404` — No email exists with that id (cross-brand ids surface as 404).
- `422` — The email has no rendered HTML yet (still generating).
- `429` — The request hit the rolling rate limit window.
- `500` — Unexpected internal error.
- `503` — The credit balance could not be verified (a transient billing dependency outage). The gate fails closed rather than do paid work it cannot meter. Retryable — `Retry-After` indicates when.

---

[API](https://skmtc.net/brew/apis/brew-public-api-v1.md) · [All operations](https://skmtc.net/brew/apis/brew-public-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/brew/brew-public-api-v1/versions/db96cfedc6c5/schema)
