Skip to main content
    Development & APIs10 min read

    Webhooks & Events

    Learn how to set up and handle webhooks to receive real-time notifications from Xharvoc services.

    Webhook Overview

    Webhooks allow your application to receive real-time notifications when events occur in Xharvoc. Instead of polling for updates, webhooks push data to your endpoint as events happen.

    Setting Up Webhooks

    1. 1Create a publicly accessible HTTPS endpoint in your application
    2. 2Register the endpoint in the Xharvoc dashboard or via API
    3. 3Select the events you want to receive
    4. 4Implement endpoint logic to handle incoming events
    5. 5Respond with HTTP 200 to acknowledge receipt

    Event Types

    Available webhook events include:

    • conversation.created - New conversation started
    • conversation.message - New message in conversation
    • conversation.ended - Conversation concluded
    • workflow.started - Workflow execution began
    • workflow.completed - Workflow finished successfully
    • workflow.failed - Workflow encountered an error

    Webhook Security

    Verify webhook signatures to ensure requests are from Xharvoc:

    typescript
    import { verifyWebhookSignature } from '@xharvoc/sdk';
    
    const isValid = verifyWebhookSignature(
      request.body,
      request.headers['x-xharvoc-signature'],
      webhookSecret
    );

    Important

    Always verify webhook signatures. Never process unverified webhook payloads.

    Was this article helpful?

    Help us improve our documentation