How Webhooks Work
Configure webhook endpoint in ABV
Click Create Webhook:
Choose integration type:- Slack Message: OAuth-based Slack integration (zero infrastructure required)
- Webhook Call: Custom HTTPS endpoint for any system integration
ABV sends POST requests on prompt events
- Created: New prompt version is created
- Updated: Prompt labels or tags change (two events: one for version gaining label, one for version losing it)
- Deleted: Prompt version is removed
Receive and validate payload
x-abv-signature header to ensure the request actually came from ABV.Process events and trigger actions
- Send Slack notifications to relevant channels
- Trigger CI/CD pipelines (GitHub Actions, Jenkins, etc.)
- Update external documentation systems
- Sync prompt catalogs to databases or search indices
- Alert monitoring systems (PagerDuty, Datadog, etc.)
- Log changes to audit systems
Teams see prompt changes in real-time without leaving their communication tools.Integration Patterns
Slack Integration (Zero Infrastructure)
Slack Integration (Zero Infrastructure)
- ABV connects to your Slack workspace via OAuth
- You select target channels for notifications
- ABV sends formatted messages when prompts change
- Team sees updates in real-time
- No infrastructure to host or maintain
- No code to write
- OAuth-secured connection
- Rich message formatting with prompt details
Custom Webhook Endpoints (Maximum Flexibility)
Custom Webhook Endpoints (Maximum Flexibility)
- Deploy a webhook receiver (FastAPI, Express, Cloudflare Workers, etc.)
- Configure ABV to POST to your endpoint
- Process payloads and trigger custom logic
- Return 2xx status to acknowledge receipt
- Sync prompts to external databases or search indices
- Trigger CI/CD pipelines (GitHub Actions, Jenkins, GitLab CI)
- Send notifications to Microsoft Teams, Discord, or custom chat platforms
- Update documentation systems (Notion, Confluence, internal wikis)
- Log changes to audit systems for compliance
- Alert monitoring tools (PagerDuty, Datadog, New Relic)
Signature Verification (Security Best Practice)
Signature Verification (Security Best Practice)
- Prevent unauthorized requests from malicious actors
- Ensure payload integrity (data not modified in transit)
- Production security requirement for sensitive systems
- ABV generates a signing secret when you create the webhook
- ABV signs each request with HMAC SHA-256 using the secret
- Signature included in
x-abv-signatureheader (format:t=timestamp,s=signature) - Your endpoint recreates the signature and compares
hmac.compare_digest in Python, crypto.timingSafeEqual in Node.js) to prevent timing attacks.Implementation: See Signature Verification Code below.Event and Prompt Filtering
Event and Prompt Filtering
- Created: Only fire when new prompt versions are created
- Updated: Only fire when labels or tags change
- Deleted: Only fire when prompt versions are deleted
- Prompt name patterns (e.g., only
production/*prompts) - Tags (e.g., only prompts tagged
critical) - Labels (e.g., only prompts with
productionlabel)
- Production monitoring: Filter to only
production-labeled prompts for critical alerts - Team-specific notifications: Filter by tags to route notifications to relevant Slack channels
- Reduce noise: Only notify on
createdevents, ignore label changes
Idempotent Handling (Reliability)
Idempotent Handling (Reliability)
- ABV retries webhooks that return non-2xx status codes
- Exponential backoff strategy (retries with increasing delays)
- Continues until successful delivery or maximum retry limit
- Use event
idfor deduplication - Store processed event IDs in Redis, database, or cache
- Always return 2xx on success to stop retries
- Design operations to be safely repeatable (e.g., upsert instead of insert)
Slack Integration Setup
Step 1: Authenticate Slack with ABV
Step 1: Authenticate Slack with ABV
- In ABV dashboard, navigate to Prompts → Webhooks
- Click Create Webhook
- Select Slack Message tab
-
Click Authenticate with Slack
- Slack OAuth flow opens in new window
- Select your Slack workspace
- Authorize ABV to post messages
chat:write: Post messages to channelschannels:read: List public channels
Step 2: Select Target Channels
Step 2: Select Target Channels
Steps:- After OAuth completes, you’ll see a dropdown of available channels
- Select one or more channels (you can create multiple webhooks for different channels)
- (Optional) Run a dry run to test the integration
- Sends a test notification to the selected channel
- Verifies OAuth permissions and channel access
- Helps you preview message formatting before going live
- ABV must be invited to private channels before they appear in the dropdown
- Public channels appear automatically after OAuth
Step 3: Configure Event Filters
Step 3: Configure Event Filters
Event types:- Created: New prompt version is created
- Updated: Labels or tags change on existing version
- Deleted: Prompt version is removed
- (Optional) Filter to specific prompts by name pattern
- (Optional) Filter to specific tags
- (Optional) Filter to specific labels (e.g., only
production)
- Production monitoring: Only
createdevents onproduction-labeled prompts - All changes: All events, all prompts (high-volume notifications)
- Team-specific: Only prompts tagged with
customer-supportteam tag
Step 4: View Messages in Slack
Step 4: View Messages in Slack
Message includes:- Prompt name and version
- Action performed (created, updated, deleted)
- Labels and tags
- Commit message (if provided)
- Timestamp
- Link back to ABV for full details
Custom Webhook Setup
Step 1: Configure Webhook Endpoint
Step 1: Configure Webhook Endpoint
- In ABV dashboard, navigate to Prompts → Webhooks
- Click Create Webhook
- Select Webhook Call tab
-
Configure request details:
Content-Type: application/jsonUser-Agent: ABV/1.0x-abv-signature: <signature>(HMAC SHA-256)
Step 2: Implement Webhook Handler
Step 2: Implement Webhook Handler
Step 3: Inspect Webhook Payload
Step 3: Inspect Webhook Payload
id: Unique event identifier (use for deduplication)timestamp: ISO 8601 timestamp of when event occurredaction: Event type (created,updated,deleted)prompt.name: Prompt name (may include folder path likecustomer-support/billing)prompt.version: Version numberprompt.labels: Array of labels (e.g.,["production", "staging"])prompt.tags: Array of tags for categorizationprompt.commitMessage: Optional message describing the changeprompt.prompt: Actual prompt content (text or chat messages array)prompt.config: Model configuration (model name, temperature, etc.)
action == "created" && "production" in labels: Alert team of production deploymenttags: Route notifications to team-specific channelscommitMessage: Include in Slack notification for contextversion: Track version history in external systems
Step 4: Deploy Webhook Handler
Step 4: Deploy Webhook Handler
- Zero infrastructure management
- Automatic scaling
- Pay-per-request pricing
- Example: Deploy Express handler to Vercel
- Event-driven execution
- Integrates with cloud services
- Example: Lambda function triggered by API Gateway
- Full control over runtime environment
- Persistent state (if needed)
- Example: FastAPI app on Render.com
- HTTPS endpoint (TLS/SSL required)
- Accepts HTTP POST requests
- Returns 2xx status on success
- Responds within reasonable timeout (< 30 seconds recommended)
- Note your public HTTPS URL
- Update ABV webhook configuration with the URL
- Test by triggering a prompt event in ABV
- Check webhook handler logs for incoming requests
Signature Verification
Why Verify Signatures
Why Verify Signatures
- Authentication: Confirm request originated from ABV, not a malicious actor
- Integrity: Verify payload wasn’t modified in transit
- Non-repudiation: Prove ABV sent the specific payload
- Production deployments triggered by webhooks
- Webhooks that modify databases or external systems
- Compliance requirements (audit trails, data integrity)
- Public endpoints accessible from the internet
- ABV generates a signing secret when you create the webhook (copy and store securely)
- For each request, ABV computes HMAC SHA-256 of
timestamp.payloadusing the secret - Signature included in
x-abv-signatureheader:t=<timestamp>,s=<signature> - Your handler recreates the signature and compares
t: Unix timestamp when signature was generateds: HMAC SHA-256 hex digest
Python Implementation
Python Implementation
hmac module.Implementation:- Use
hmac.compare_digest()for constant-time comparison (prevents timing attacks) - Verify signature before parsing or processing payload
- Store signing secret in environment variables, not code
JavaScript/TypeScript Implementation
JavaScript/TypeScript Implementation
crypto module.Implementation:- Use
crypto.timingSafeEqual()for constant-time comparison - Parse
rawBodyto string before passing to verification function - Verify before parsing JSON to prevent processing malicious payloads
Troubleshooting Signature Verification
Troubleshooting Signature Verification
-
Wrong secret: Verify you copied the signing secret correctly from ABV
- Regenerate secret in ABV and update your code
- Check for extra whitespace or newlines
-
Body modified before verification: Raw body must be exactly as received
-
Encoding issues: Ensure consistent UTF-8 encoding
-
Header parsing error: Verify header format is
t=...,s=...
bytes.fromhex() or Buffer.from(sig, 'hex')Common Use Cases
Production Monitoring
Production Monitoring
- Create Slack webhook filtered to
productionlabel - Subscribe
#production-alertschannel - Configure to trigger on
createdandupdatedevents
- Engineer updates prompt and assigns
productionlabel - Slack notification sent to
#production-alerts - Team aware of change, can monitor for issues
- If problems arise, easy to correlate with prompt update
Team Coordination
Team Coordination
- Create multiple webhooks for different teams
- Filter by tags (e.g.,
team:customer-support,team:marketing) - Route notifications to team-specific Slack channels
- Customer support team: Notified of prompts tagged
customer-support - Marketing team: Notified of prompts tagged
marketing - Engineering team: Notified of all
productionprompts
Automated CI/CD Pipelines
Automated CI/CD Pipelines
- Configure custom webhook to trigger GitHub Actions, Jenkins, or GitLab CI
- Run automated tests on prompt changes
- Deploy to staging/production environments
- Engineer updates prompt in ABV
- Webhook triggers GitHub Actions workflow
- Workflow runs integration tests with new prompt
- If tests pass, deploy prompt to staging
- Manual approval → deploy to production
External System Sync
External System Sync
- Elasticsearch index: Keep searchable prompt catalog up-to-date
- Documentation: Auto-update internal wiki when prompts change
- Audit database: Log all prompt changes for compliance
- Prompt versioning system: Sync to external version control
Compliance Audit Trails
Compliance Audit Trails
- Configure webhook to log all events to audit database
- Capture who made the change, what changed, when, and why (commit message)
- Store immutable records for compliance audits