← Back to Reviews

Example Review Endpoint

This page is a working reference implementation. It receives reviews via POST and displays them on GET, all in self-contained HTML.

How to use this

Option 1: Point your callback URL here to test

curl -X POST https://crawde.com/api/reviews \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://yoursite.com",
    "callbackUrl": "https://crawde.com/api/example"
  }'

After the review completes, visit this page to see the rendered result.

Option 2: Build your own version

The /api/example route is ~50 lines. It accepts the POST callback, builds a self-contained HTML page from the review data, stores it, and serves it on GET. Copy the pattern for your own site.

What the endpoint receives

POST /api/example
Content-Type: application/json
X-Crawde-Event: review.completed
X-Crawde-Signature: <hmac-sha256 if secret provided>

{
  "event": "review.completed",
  "reviewId": "uuid",
  "url": "https://yoursite.com",
  "status": "completed",
  "overallScore": 72,
  "grade": "C",
  "verdict": "Functional but unpolished...",
  "markdownReport": "# Full markdown...",
  "sections": [
    {
      "title": "Functionality",
      "status": "warning",
      "score": 20,
      "maxScore": 30,
      "details": "...",
      "findings": ["..."]
    }
  ],
  "progressAnalysis": {
    "claimedFeatures": [...],
    "testedFeatures": [...],
    "untestedFeatures": [...],
    "accuracyPercent": 65
  },
  "commonSenseCheck": { "passed": true, "notes": [...] },
  "patchProtocol": { ... }  // if Code Patch Protocol enabled
}

Available formats

Self-contained HTML

This example renders the review as a complete HTML page with inline CSS. No dependencies. Just save and serve.

GET /api/example

Raw Markdown

The callback body includes markdownReport with the full review in markdown format.

body.markdownReport

Structured JSON

The sections array has typed, structured data for custom rendering.

body.sections[]

Latest Received Review

No reviews received yet

Submit a review with callbackUrl: "https://crawde.com/api/example" to see it here.