Audit an email
Lint raw email content for production readiness. emailHtml is capped at 5,000,000 UTF-8 bytes and the complete JSON body at 6 MiB; subject and previewText each have a 1,000-character transport cap. Omitted preview text is extracted from the authored preheader, while an explicit empty string stays empty. Omitted sendingPurpose defaults to marketing and is reported as defaulted. Independent checks run in parallel across unsubscribe compliance, links and images, total loaded size, accessibility, markup, subject line, and preview text. The stable versioned response reports every check, up to 100 normalized findings, exact totals, metrics, and a nested completion discriminator. A complete result has a 0–100 score and costs 5 credits (X-Credit-Cost: 5). If a required lane is unavailable, the endpoint returns a partial result with score: null, never establishes readiness, costs 0 credits (X-Credit-Cost: 0), and releases the idempotency key so the same key can retry. Admission is limited to 6 requests per minute per credential or session and 20 per minute across the organization, shared by public API, MCP, and agent calls. Brew runs at most 4 audits concurrently per organization and 16 globally; capacity rejections return 429 RATE_LIMITED with Retry-After and do not run or charge the audit.
Authorizations
Send your Brew API key as Authorization: Bearer brew_xxx.
Headers
Optional idempotency key for safe retries. Reusing the same key with the same request body returns the original response for 24 hours.
1 - 100The brand this request acts on. REQUIRED for organization-scoped credentials (otherwise 400 BRAND_ID_REQUIRED — there is no default brand); list ids with GET /v1/brands. Brand-scoped credentials may omit it, and sending a different brand returns 403 BRAND_SCOPE_MISMATCH. A brand outside your organization returns 404 BRAND_NOT_FOUND.
1 - 64Body
Response
A complete or partial audit. Branch on completion.status; only complete carries a numeric score. A partial response is not cached under its idempotency key and may be retried with the same key.
1 1 - 100^sha256:[0-9a-f]{64}$32- Option 1
- Option 2
- Option 3
- Option 4
100x >= 0- Option 1
- Option 2