Webhooks
Receive real-time notifications when events happen in your Codmir projects.
GitHub Webhooks
Codmir can receive GitHub webhooks to automatically enqueue agent tasks when issues are created, PRs are opened, or commits are pushed.
Setup
- Go to your GitHub repository → Settings → Webhooks → Add webhook
- Set the Payload URL to
https://your-server.codmir.com/webhooks/github - Set Content type to
application/json - Set a secret and add it as
GITHUB_WEBHOOK_SECRETin your server environment - Select the events you want to trigger (Issues, Pull requests, Push)
Security
All GitHub webhooks verify the x-hub-signature-256 header via HMAC when GITHUB_WEBHOOK_SECRET is configured. Requests with invalid signatures are rejected.
Generic Webhooks
The generic webhook endpoint (POST /webhooks/generic) accepts arbitrary JSON payloads and can trigger agent tasks. This endpoint requires authentication in production.
POST /webhooks/generic
Content-Type: application/json
Authorization: Bearer <token>
{
"event": "custom.trigger",
"projectId": "project-123",
"data": { ... }
}Related
- Agent SDK — Agents that respond to webhook events
- Git Integration — Connect your repositories
- Security — Webhook signature verification