Webhooks
Webhooks are a planned capability — this page describes the intended design, but there is no webhook configuration surface or delivery pipeline on the platform today (verified 2026-07-12). For reacting to platform activity now, use the audit log in the console or the Comms API's messaging primitives.
Webhooks let your systems react to events on Kapable in real time. Instead of polling the API, Kapable sends an HTTP POST to your endpoint whenever something happens.
Event Types
| Event | Fires when |
|---|---|
app.deployed | A deployment completes successfully |
app.failed | A deployment fails |
app.paused | An app is paused |
app.resumed | An app is resumed |
app.deleted | An app is deleted |
member.invited | A new member is invited to the org |
member.joined | An invited member accepts and joins |
member.deactivated | A member is deactivated |
billing.subscription_changed | Subscription plan changes (upgrade, downgrade, cancel) |
billing.payment_failed | A payment attempt fails |
auth.login_anomaly | An unusual login is detected (new device, new location) |
Payload Format
Every webhook POST sends a JSON body:
{
"id": "evt_01J5K...",
"type": "app.deployed",
"created_at": "2026-05-21T10:30:00Z",
"org_id": "d3f1a2b4-...",
"data": {
"app_id": "a1b2c3d4-...",
"app_name": "my-app",
"version": "v1.4.2",
"deployed_by": "alice@example.com"
}
}
The data object varies by event type. See the API
Reference for the full schema of each event.
Setting Up an Endpoint
Your webhook endpoint must:
- Accept POST requests with a JSON body
- Return a 2xx status within 10 seconds to acknowledge receipt
- Be publicly reachable via HTTPS (plain HTTP is rejected)
Example endpoint in Node.js:
app.post('/webhooks/kapable', (req, res) => {
const event = req.body;
console.log(`Received ${event.type}`, event.data);
// Process the event asynchronously
processEvent(event).catch(console.error);
// Acknowledge immediately
res.status(200).json({ received: true });
});Verifying Signatures
Every webhook includes an X-Kapable-Signature header
containing an HMAC-SHA256 signature of the request body, signed with
your webhook secret.
Always verify the signature before processing:
import hmac
import hashlib
def verify_signature(payload_body, signature_header, secret):
expected = hmac.new(
secret.encode('utf-8'),
payload_body,
hashlib.sha256
).hexdigest()
return hmac.compare_digest(f"sha256={expected}", signature_header)const crypto = require('crypto');
function verifySignature(body, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(body, 'utf8')
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(`sha256=${expected}`),
Buffer.from(signature)
);
}Retry Policy
If your endpoint doesn't return a 2xx response, Kapable retries with exponential backoff:
| Attempt | Delay |
|---|---|
| 1st retry | 1 minute |
| 2nd retry | 10 minutes |
| 3rd retry | 1 hour |
After 3 failed retries, the event is marked as failed. You can view failed deliveries in the Send Audit page.
Testing
During development, use a tunnel or request-inspection tool:
- ngrok — expose your local server:
ngrok http 3000 - webhook.site — inspect payloads without any code
- Kapable test events — use the "Send Test" button in webhook configuration to fire a sample event
Best Practices
- Process asynchronously. Acknowledge the webhook immediately (return 200), then process the event in a background job. This prevents timeouts.
- Be idempotent. You may receive the same event more than once (during retries). Use the
idfield to deduplicate. - Log everything. Store raw payloads for debugging. The Send Audit page also keeps a record.
- Handle unknown events. New event types may be added. Your handler should ignore types it doesn't recognise rather than failing.
- Rotate secrets regularly. You can regenerate your webhook secret in the console without downtime — both old and new secrets are valid for 24 hours during rotation.
Console Configuration
Webhook configuration is coming soon to the console. In the meantime, contact support@kapable.ai for early access to the webhook API.
Next Steps
Deployments
The events most webhooks react to.
Comms API
Agents, mailboxes, messages, and SSE streams.
Security & Compliance
Token prefixes, audit logging, key rotation.