Skip to content

Webhooks Guide

Webhooks let your application receive real-time HTTP callbacks when events occur.

Create an HTTPS endpoint on your server that accepts POST requests:

// Express.js example
app.post('/webhooks/nouncify', (req, res) => {
const signature = req.headers['x-nouncify-signature'];
const body = JSON.stringify(req.body);
if (!verifySignature(body, signature, WEBHOOK_SECRET)) {
return res.status(401).send('Invalid signature');
}
const { event, data } = req.body;
switch (event) {
case 'recording.completed':
// Update your database with the play link
await db.users.update(data.user_id, {
pronunciation_url: data.play_link
});
break;
}
res.status(200).send('OK');
});
Terminal window
curl -X POST https://api.nouncify.com/v1/webhooks \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.com/webhooks/nouncify",
"events": ["recording.completed"]
}'

The response includes a secret field. Store it securely — you’ll use it to verify webhook signatures.

Every webhook includes an X-Nouncify-Signature header with an HMAC-SHA256 signature.

const crypto = require('crypto');
function verifySignature(payload, signature, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(payload)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
);
}
import hmac
import hashlib
def verify_signature(payload: str, signature: str, secret: str) -> bool:
expected = hmac.new(
secret.encode(),
payload.encode(),
hashlib.sha256
).hexdigest()
return hmac.compare_digest(signature, expected)

Sent when a user finishes recording their name.

{
"event": "recording.completed",
"timestamp": "2026-04-01T00:00:00Z",
"data": {
"collection_id": "collection-uuid",
"user_id": "user-uuid",
"email": "priya@company.com",
"first_name": "Priya",
"last_name": "Patel",
"play_link": "https://api.nouncify.com/p/HkJ3mN8x",
"recorded_at": "2026-04-01T00:00:00Z"
}
}
AttemptDelay
1Immediate
230 seconds
32 minutes

After 10 consecutive failures, the webhook is automatically disabled. Re-enable it from the Developer Dashboard.