Skip to main content
The report service exposes 5 endpoints on port 8001. The base URL in production is https://report.webyes.com.

Authentication

Two endpoints require a Bearer token in the Authorization header:
The API_KEY must match the API_KEY environment variable on the server. Requests missing the header receive 401 Unauthorized; wrong keys receive 403 Forbidden. Public endpoints (no auth): POST /api/v1/report, GET /api/v1/scan/report/download/:id, POST /api/v1/slack/test.

Endpoints

POST /api/v1/report

POST
Queue a PDF report generation job. Returns immediately — the PDF is generated and emailed asynchronously via BullMQ. Authentication: None required
object
required
Full audit data payload. See PDF Reports for the complete PDFData shape.
string
required
Report variant to generate.
  • "full" — Multi-page report with all metrics (accessibility, performance, SEO, quality)
  • "report" — Standard accessibility report
  • "accessibility" — Accessibility-only summary
  • "singlePage" — Single-page snapshot
string
required
Email address to send the completed report to.
string
required
Audit ID. Used as the S3 object key and in the download URL.
string
required
Website URL that was scanned. Displayed in the email.
string
Optional. If provided, a separate agency lead email is sent to this address and a Slack notification is posted.
string
Alternative to id. If both are provided, audit_id takes precedence.

GET /api/v1/scan/report/download/:id

GET
Redirect to a presigned S3 download URL for a generated PDF report. Authentication: None required
string
required
Audit ID — the S3 object key assigned when the PDF was uploaded.
Response: 301 Redirect to a presigned S3 URL. The presigned URL expires after 1 hour (3600 seconds).

POST /api/v1/email

POST
Send a transactional email using any of the 30+ available templates. Authentication: Required (Authorization: Bearer <API_KEY>)
string
required
Recipient email address.
string
required
Email subject line.
string
required
Template identifier. See the full list in Email Templates.
object
required
Template variables. Shape varies per template — see Email Templates for each template’s required fields.
string
Override the sender address. Defaults to MAIL_FROM_ADDRESS env variable.

POST /api/v1/apps/accessibility/emails

POST
Same as POST /api/v1/email but automatically sets data.app = "accessibility" in the template context. Use this when sending emails from the accessibility standalone app so templates can customize branding accordingly. Authentication: Required (Authorization: Bearer <API_KEY>) Request and response body are identical to POST /api/v1/email.

POST /api/v1/embed

POST
Generate a one-time Stripe promotion code and email it to an agency partner. Authentication: Required (Authorization: Bearer <API_KEY>) Flow:
  1. Calls Stripe to create a single-use promotion code from a pre-configured coupon
  2. Sends the agency-coupon email template with the generated code
string
required
Agency partner’s email address.
string
required
Agency partner’s name. Used in the email greeting.
string
required
Partner’s role or company. Included in the email template.

POST /api/v1/slack/test

POST
Send a test lead notification to the configured Slack channel. Also used internally when a report with an agencyEmail is generated. Authentication: None required
string
required
Website URL to display in the Slack message.
string
required
Lead’s email address.
string
Optional URL to the generated report. Adds a “View Report” button to the Slack message.
string
Optional custom message body.

Error Responses

All endpoints return a consistent error shape: