Subscribe to these events to receive real-time notifications from Replyify.
Available Events
| Event | Description |
|---|
reply.received | A new reply was received from a lead |
reply.categorized | A reply was categorized by AI |
reply.sent | A response was sent to a lead |
reply.forwarded | A reply was forwarded |
reply.archived | A reply was archived |
contact.created | A new contact was created |
Event Payloads
reply.received
Triggered when a new reply arrives from your email sequencer.
{
"event": "reply.received",
"timestamp": "2024-01-15T14:30:00Z",
"workspace_id": "ws-abc123",
"data": {
"reply_id": "reply-xyz789",
"from_email": "[email protected]",
"from_name": "John Smith",
"to_email": "[email protected]",
"subject": "Re: Quick question about your service",
"body_text": "Hi, I'd love to learn more...",
"client_id": "client-456",
"connection_id": "conn-789",
"contact_id": "contact-012",
"received_at": "2024-01-15T14:30:00Z"
}
}
reply.categorized
Triggered after AI categorizes a reply (usually within seconds of receiving).
{
"event": "reply.categorized",
"timestamp": "2024-01-15T14:30:05Z",
"workspace_id": "ws-abc123",
"data": {
"reply_id": "reply-xyz789",
"category_id": "cat-interested-123",
"category_name": "Interested",
"is_positive": true,
"has_ai_response": true,
"ai_response_preview": "Hi John, Thanks for your interest..."
}
}
reply.sent
Triggered when a response is sent to a lead.
{
"event": "reply.sent",
"timestamp": "2024-01-15T15:00:00Z",
"workspace_id": "ws-abc123",
"data": {
"reply_id": "reply-xyz789",
"from_email": "[email protected]",
"to_email": "[email protected]",
"subject": "Re: Quick question about your service",
"sent_response": "Hi John,\n\nThanks for your interest...",
"sent_by": "user-abc",
"sent_at": "2024-01-15T15:00:00Z",
"was_auto_sent": false
}
}
reply.forwarded
Triggered when a reply is forwarded to another email address.
{
"event": "reply.forwarded",
"timestamp": "2024-01-15T15:30:00Z",
"workspace_id": "ws-abc123",
"data": {
"reply_id": "reply-xyz789",
"forwarded_to": ["[email protected]"],
"forwarded_by": "user-abc",
"message": "Hot lead - please follow up",
"forwarded_at": "2024-01-15T15:30:00Z"
}
}
reply.archived
Triggered when a reply is archived.
{
"event": "reply.archived",
"timestamp": "2024-01-15T16:00:00Z",
"workspace_id": "ws-abc123",
"data": {
"reply_id": "reply-xyz789",
"archived_by": "user-abc",
"archived_at": "2024-01-15T16:00:00Z",
"previous_status": "sent"
}
}
Triggered when a new contact is created (first reply from a new email address).
{
"event": "contact.created",
"timestamp": "2024-01-15T14:30:00Z",
"workspace_id": "ws-abc123",
"data": {
"contact_id": "contact-012",
"email": "[email protected]",
"first_name": "John",
"last_name": "Smith",
"company": "Example Inc",
"title": "VP of Sales",
"source_reply_id": "reply-xyz789",
"created_at": "2024-01-15T14:30:00Z"
}
}
Subscribing to Events
When creating or editing a webhook, select which events to receive:
- Go to Settings → Webhooks
- Create or edit a webhook
- Check the events you want to receive
- Save the webhook
Subscribe only to events you need. This reduces unnecessary traffic and processing on your server.
Event Ordering
Events are delivered in the order they occur, but delivery is not guaranteed to be in order. Use the timestamp field to establish event sequence.
Events may be delivered out of order due to network conditions or retries. Design your system to handle this.
Idempotency
Each webhook delivery includes a unique X-Replyify-Delivery-ID header. Use this to detect and handle duplicate deliveries:
const deliveryId = req.headers['x-replyify-delivery-id'];
// Check if already processed
if (await isProcessed(deliveryId)) {
return res.status(200).send('Already processed');
}
// Process and mark as handled
await processEvent(req.body);
await markProcessed(deliveryId);
res.status(200).send('OK');