Integrations

Custom Webhooks

Send real-time events from Agent Rush to any endpoint.

Overview

Webhooks let you receive real-time HTTP callbacks when events happen in Agent Rush. Use them to integrate with any system that accepts HTTP requests.

Available Events

conversation.started

New conversation initiated

conversation.ended

Conversation closed or resolved

message.received

Customer sent a message

message.sent

Agent sent a response

handoff.requested

Customer requested human help

sentiment.negative

Negative sentiment detected

Payload Format

{
  "event": "message.received",
  "timestamp": "2026-01-12T10:30:00Z",
  "data": {
    "conversation_id": "conv_abc123",
    "message_id": "msg_xyz789",
    "customer": {
      "id": "cust_456",
      "name": "Priya Sharma",
      "email": "priya@example.com"
    },
    "content": "When will my order arrive?",
    "channel": "whatsapp",
    "agent_id": "agent_001"
  }
}

Security

Signature Verification

Every webhook includes an HMAC signature for verification

Automatic Retries

Failed deliveries are retried up to 5 times

Verifying Signatures

// Node.js example
const crypto = require('crypto');

function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');

  return signature === `sha256=${expected}`;
}

// Express middleware
app.post('/webhook', (req, res) => {
  const signature = req.headers['x-agentrush-signature'];
  const isValid = verifyWebhook(
    JSON.stringify(req.body),
    signature,
    process.env.WEBHOOK_SECRET
  );

  if (!isValid) {
    return res.status(401).send('Invalid signature');
  }

  // Process webhook...
  res.status(200).send('OK');
});

Related Guides