Webhooks
Configure HTTP callbacks to receive real-time event notifications. Supports CRUD, test pings, delivery logs, and HMAC-SHA256 signature verification.
List Webhooks
const webhooks = await client.getWebhooks('proj_123');
webhooks.forEach(wh => console.log(wh.name, wh.url, wh.enabled, wh.events));Create Webhook
const webhook = await client.createWebhook('proj_123', {
name: 'Order Alerts',
url: 'https://your-server.com/webhook',
events: ['quote.submitted', 'form.submitted', 'price.calculated'],
secret: 'whsec_my_signing_secret',
enabled: true
});
console.log(webhook.id, webhook.createdAt);Update Webhook
const updated = await client.updateWebhook('proj_123', 'wh_abc', {
events: ['quote.submitted', 'quote.updated', 'form.submitted'],
enabled: true
});
console.log('Events:', updated.events);Delete Webhook
await client.deleteWebhook('proj_123', 'wh_abc');Test Webhook
const result = await client.testWebhook('proj_123', 'wh_abc');
console.log(result.statusCode, result.delivered);
// { statusCode: 200, statusText: "OK", delivered: true }Get Delivery Logs
const deliveries = await client.getWebhookDeliveries('proj_123', 'wh_abc');
deliveries.forEach(d => {
console.log(d.event, d.delivered, d.statusCode, d.timestamp);
});Trigger Webhooks
const result = await client.triggerWebhooks('proj_123', {
event: 'quote.submitted',
data: { quoteId: 'q_456', total: 1299.99 }
});
console.log(`Triggered ${result.triggered} webhooks`);Verify Signature (Node.js)
// Verify incoming webhook signatures
const crypto = require('crypto');
function verifyWebhook(body, signature, secret) {
const expected = 'sha256=' + crypto
.createHmac('sha256', secret)
.update(JSON.stringify(body))
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature), Buffer.from(expected)
);
}
// In your Express handler:
app.post('/webhook', (req, res) => {
const sig = req.headers['x-simplio3d-signature'];
if (!verifyWebhook(req.body, sig, 'whsec_...')) {
return res.status(401).send('Invalid signature');
}
console.log('Event:', req.headers['x-simplio3d-event']);
res.sendStatus(200);
});Continue reading
Augmented RealityEnable and configure surface and wearable AR experiences.TypeScriptBuilt-in TypeScript types and error classes (AuthenticationError, ValidationError, NotFoundError).ExamplesEnd-to-end recipes — headless embeds, binding external UI to SDK events, and more.ChangelogVersion history and notable changes to the Simplio3D SDK.
