HTTP API
Reference for the Profer HTTP API endpoints
HTTP API
The Supabase edge functions expose these HTTP endpoints.
Auth'd endpoints (require API key)
All requests must include Authorization: Bearer <PROFER_API_KEY>.
POST /pages
Create a new page.
curl -X POST https://your-project.supabase.co/functions/v1/pages \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{
"html": "<h1>My Spec</h1><p>Details here...</p>",
"title": "Auth Migration Spec",
"questions": [
{ "id": "q1", "type": "approve", "text": "Ready?" }
]
}'Response (201):
{ "id": "PF-K8M3N", "url": "https://profer.dev/v/PF-K8M3N" }GET /pages/:id
Get page with all feedback.
curl https://your-project.supabase.co/functions/v1/pages/PF-K8M3N \
-H "Authorization: Bearer your-api-key"PATCH /pages/:id
Update a page. Increments version, resets status to awaiting_feedback.
curl -X PATCH https://your-project.supabase.co/functions/v1/pages/PF-K8M3N \
-H "Authorization: Bearer your-api-key" \
-H "Content-Type: application/json" \
-d '{ "html": "<h1>Updated Spec</h1>" }'Public endpoints (no auth required)
GET /v/:id
Renders the public page with feedback widget. Returns full HTML.
POST /v/:id/feedback
Submit feedback. No authentication required.
curl -X POST https://profer.dev/v/PF-K8M3N/feedback \
-H "Content-Type: application/json" \
-d '{
"answers": { "q1": "yes" },
"reviewer": "Alice"
}'Limits
| Resource | Limit |
|---|---|
| HTML content | 5 MB |
| Title length | 500 characters |
| Questions per page | 50 |
| Reviewer name | 200 characters |
Webhooks
If webhook_url is set on a page, a POST request is sent when feedback is received:
{
"event": "feedback_received",
"page_id": "PF-K8M3N",
"version": 1,
"answers": { "q1": "yes" },
"reviewer": "Alice"
}Webhook failures are non-blocking — feedback is stored regardless.