Skip to content

API Overview

WebHooker exposes an HTTP API via Hono on Cloudflare Workers.

Base URL

https://your-worker.workers.dev

Endpoints

MethodPathAuthDescription
GET/healthNoneHealth check
POST/webhookHMAC signatureGitHub webhook ingestion
GET/auth/githubNoneStart GitHub OAuth flow
GET/auth/github/callbackNoneOAuth callback
DELETE/auth/token/:userIdNoneRevoke user token
POST/api/commentBearer tokenCreate issue comment
POST/api/mergeBearer tokenMerge pull request
POST/api/reactBearer tokenAdd reaction to issue

Health Check

GET /health

Response:

json
{
  "status": "ok"
}

Webhook Ingestion

POST /webhook

Accepts GitHub webhook payloads. Requires valid X-Hub-Signature-256 header.

Headers:

HeaderRequiredDescription
X-Hub-Signature-256YesHMAC-SHA256 signature
X-GitHub-EventYesEvent type name
X-GitHub-DeliveryYesUnique delivery ID

Request Body: GitHub webhook JSON payload (max 1MB).

Response:

json
{
  "ok": true
}

Error Responses:

StatusBodyCause
401{"error": "Invalid signature"}Signature verification failed
400{"error": "Invalid event"}Missing event header or malformed body
413{"error": "Request too large"}Body exceeds 1MB limit

Error Format

All error responses follow the format:

json
{
  "error": "Description of the error"
}

Released under the MIT License.