API Reference
All Cloudflare Pages Function endpoints for the Owner Bugs application.
Bug Report
/api/reportSubmit a bug report — creates a GitHub Issue with screenshots and sends confirmation email
Request (FormData)
| Field | Type | Required | Description |
|---|---|---|---|
project | string | Required | GitHub repo name from allowed list |
priority | string | Optional | "low", "medium", "high", or "critical" (default: "medium") |
title | string | Required | Bug title (max 200 chars) |
description | string | Required | Bug description (max 5,000 chars) |
reportedBy | string | Required | Reporter name (max 100 chars) |
email | string | Required | Reporter email for notifications |
screenshots | File[] | Optional | Max 5 images, PNG/JPEG/GIF/WebP, 5MB each |
Success Response (200)
{ "url": "https://github.com/ownerinspections/...", "number": 42 }Webhook
/api/webhookGitHub webhook handler for issue close and comment events
Verified via HMAC-SHA256 signature (WEBHOOK_SECRET). On issue close with "bug" label: sends resolved email. On new comment: sends comment notification email.
Issue Management
/api/issuesList bug issues with filtering and pagination
/api/searchSearch open bug issues by query string
/api/reopenReopen a closed issue via a token link (from resolved email)
Security
CORS Same-origin requests only.
XSS All text inputs sanitised — <> characters rejected.
Files Only PNG, JPEG, GIF, WebP. Max 5MB per file, 5 files total.
Webhook HMAC-SHA256 signature verification on all GitHub webhook events.