Documentation

All Docs

Webhooks

Receiving and sending event notifications.

Overview

Neuron supports both inbound and outbound webhooks. Inbound webhooks receive data from external services and pass it to your bot. Outbound webhooks notify external services when events happen in Neuron.

Inbound Webhooks

Create inbound webhooks from a bot's Webhooks tab. Each webhook gets a unique URL that external services can POST data to. You can optionally set a secret for HMAC-SHA256 signature verification.

Outbound Webhooks

Outbound webhooks subscribe to Neuron events and POST data to your specified URL whenever those events occur. Useful for syncing data to CRMs, triggering workflows, or logging to external systems.

Event Types

Available events include: message.created (new incoming message), message.assistant (bot response sent), conversation.created (new conversation started), conversation.escalated (bot flagged for human), conversation.closed (conversation ended), bot.paused, and bot.resumed.

Webhook Logs

Both inbound and outbound webhooks maintain delivery logs. View logs from the webhook detail page to debug issues, check response status codes, and see payload details.

Webhook Security

For inbound webhooks, set a secret to enable HMAC-SHA256 signature verification. The external service must include an X-Webhook-Signature header with the HMAC of the request body. Neuron will reject requests with invalid signatures.

Verifying webhook signatures

const crypto = require('crypto');
const signature = crypto
  .createHmac('sha256', webhookSecret)
  .update(requestBody)
  .digest('hex');
// Send as X-Webhook-Signature header