API Endpoints¶
Forge exposes a FastAPI server that receives webhooks and serves metrics.
Base URL¶
Endpoints¶
Health Check¶
Returns HTTP 200 when the API server is running. Does not check worker or Redis connectivity.
Response:
Jira Webhook¶
Receives Jira webhook events. Validates the signature and enqueues the event for async processing by the worker.
Required headers:
| Header | Description |
|---|---|
X-Hub-Signature |
HMAC-SHA256 of the request body, using JIRA_WEBHOOK_SECRET |
Supported events:
jira:issue_created— triggers new workflow ifforge:managedlabel is presentjira:issue_updated— handles label changes (approvals, retry)jira:issue_commented— handles Q&A and revision requests
Returns HTTP 200 immediately. Processing is asynchronous.
GitHub Webhook¶
Receives GitHub webhook events. Validates the signature and enqueues for async processing.
Required headers:
| Header | Description |
|---|---|
X-Hub-Signature-256 |
HMAC-SHA256 of the request body, using GITHUB_WEBHOOK_SECRET |
Supported events:
pull_request— PR opened, closed, synchronizedpull_request_review— human review submittedcheck_run— CI check completedissue_comment— PR comment (for/forge skip-gatecommands)
Returns HTTP 200 immediately. Processing is asynchronous.
Prometheus Metrics¶
Exposes Prometheus-format metrics for the API server.
Key metrics:
| Metric | Type | Description |
|---|---|---|
forge_workflows_started_total |
Counter | Workflows started, labeled by type |
forge_workflows_completed_total |
Counter | Workflows completed |
forge_ci_fix_attempts_total |
Counter | CI fix attempts |
forge_agent_duration_seconds |
Histogram | Agent execution time |
Worker metrics are available separately at http://localhost:8001/metrics.
Webhook Configuration¶
Jira¶
Configure under Project Settings → Webhooks:
- URL:
https://your-server.com/api/v1/webhooks/jira - Events: Issue created, Issue updated, Comment created
- Secret: Set
JIRA_WEBHOOK_SECRETin.env
GitHub¶
Configure under Repository Settings → Webhooks:
- URL:
https://your-server.com/api/v1/webhooks/github - Content type:
application/json - Events: Pull requests, Pull request reviews, Check runs, Issue comments
- Secret: Set
GITHUB_WEBHOOK_SECRETin.env