Overview
Configure webhooks to receive real-time notifications when events occur in CodeWolf, enabling custom integrations and automated workflows.Prerequisites
- HTTPS endpoint to receive webhooks
- CodeWolf account
Setup
1
Create webhook endpoint
Set up an HTTPS endpoint that can receive POST requests from CodeWolf.Your endpoint should:
- Accept POST requests
- Return a 2xx status code
- Process requests within 10 seconds
2
Configure webhook in CodeWolf
Go to CodeWolf dashboard > Integrations > Webhooks.Click Add Webhook and enter:
- URL: Your HTTPS endpoint
- Secret: A secret key for signature verification
- Events: Select which events to receive
3
Verify webhook
CodeWolf will send a test payload to verify your endpoint.
Respond with a 200 status code to confirm the webhook is working.
Event types
Subscribe to these CodeWolf events:Code analysis
code.scan.completed: Code analysis finishedcode.quality.changed: Quality score changedcode.complexity.increased: Complexity threshold exceeded
Security
security.vulnerability.detected: New vulnerability foundsecurity.scan.completed: Security scan finishedsecurity.issue.resolved: Security issue fixed
Deployments
deployment.started: Deployment initiateddeployment.completed: Deployment finisheddeployment.failed: Deployment failed
Pull requests
pr.opened: Pull request createdpr.updated: Pull request updatedpr.merged: Pull request mergedpr.review.completed: Code review finished
Alerts
alert.triggered: Alert condition metalert.resolved: Alert condition resolved
Payload structure
All webhook payloads follow this structure:Signature verification
Verify webhook authenticity using the signature:- Node.js
- Python
- Go
Retry policy
CodeWolf retries failed webhook deliveries:- Retry attempts: Up to 5 retries
- Backoff: Exponential backoff (1s, 2s, 4s, 8s, 16s)
- Timeout: 10 seconds per attempt
- Success codes: 200-299
If all retry attempts fail, the event is marked as failed and logged in your webhook dashboard.
Filtering events
Filter events by criteria to reduce noise:Testing webhooks
Test your webhook endpoint with sample payloads:- Go to Integrations > Webhooks
- Select your webhook
- Click Send Test Event
- Choose an event type
- View the delivery response
Monitoring
Track webhook delivery status:- Delivery logs: View all webhook attempts
- Success rate: Percentage of successful deliveries
- Response times: Endpoint latency
- Failed deliveries: Events that need attention
Best practices
Do:
- Verify webhook signatures
- Process webhooks asynchronously
- Return 2xx status codes quickly
- Log all webhook events
- Implement idempotency
- Use HTTPS endpoints
Troubleshooting
Webhooks not being received
Webhooks not being received
- Verify your endpoint is accessible from the internet
- Check firewall rules allow incoming HTTPS traffic
- Ensure your endpoint returns 2xx status codes
- Review webhook logs in CodeWolf dashboard
Signature verification failing
Signature verification failing
- Confirm you’re using the correct secret
- Verify payload is not modified before verification
- Check that you’re using the raw request body
- Ensure consistent JSON serialization
Duplicate events
Duplicate events
- Implement idempotency using the event ID
- Store processed event IDs to prevent duplicates
- Use database constraints or caching

