Skip to main content
This guide explains how to set up and configure webhooks for your assistants to receive conversation data and analysis results. Rapida provides webhooks that allow you to receive data generated during the assistant lifecycle. These webhooks can be triggered during key conversation events:
  1. Start of conversation
  2. End of conversation
  3. Failure during conversation
Webhooks enable you to integrate assistant data with external systems, analyze conversations, and create custom workflows.
1

Access Webhooks Configuration

  1. Go to the Assistants section in the main navigation menu.
  2. Select the assistant you want to configure.
  3. Click “Configure assistant” in the top right corner.
  4. Select “Webhooks”.
  5. Click Create new webhook to begin configuration. Access Webhooks
2

Configure Webhook Settings

Configure WebhookSet up the webhook endpoint:
  • Method: Select the appropriate HTTP method (typically POST)
  • Server URL: Enter the URL where you want to receive webhook data
  • Description: Add an optional description to identify this webhook’s purpose
3

Add Headers

Add HeadersConfigure any HTTP headers needed for your webhook:
  • Click Add header to include authentication headers or other required metadata
  • Common examples include Authorization headers for securing webhook communication with external systems
4

Configure Basic Parameters

Configure ParametersBy default, two parameters are included:
  • Event: Contains information about the type of event that triggered the webhook
  • Data: Contains all conversation data up to the point the webhook was triggered
These parameters provide context about when and why the webhook was triggered.
5

Include Results

Include Analysis
Analysis results are only generated and sent at the end of a conversation.
To receive data in your webhook:
  1. Add a new parameter using the Add parameters button
  2. Select the data type from the dropdown menu
  3. Specify the key for the selected data type using the options below:
Select one of the following keys:
  • Name
  • Prompt
The only available key is:
  • Messages
Enter a custom key name for the argument data.
Enter a custom key name for the metadata.
Enter a custom key name for the option data.
Enter a custom key name for the analysis results.
If no selection is made, default event and data will be pushed.This allows you to receive specific data or custom analysis results configured for your assistant in the webhook payload.
6

Add Optional Parameters

Optional ParametersYou can include additional contextual information by adding optional parameters:
  • Assistant: Information about the assistant handling the conversation
  • Conversation: Details about the current conversation session
  • Argument: Any arguments passed to the assistant
  • Metadata: Additional metadata associated with the conversation
  • Option: Configuration options used for the assistant
7

Select Trigger Events

Select EventsChoose which events should trigger your webhook:
  • Conversation.Begin: Triggered when a new conversation starts
  • Conversation.Completed: Triggered when a conversation ends successfully
  • Conversation.Failed: Triggered when a conversation encounters an error
You can select multiple events depending on your use case.
8

Finalize Configuration

Finalize ConfigurationReview your webhook configuration and click Configure webhook to save and activate it.Your webhook is now configured and will be triggered during the selected conversation events.

Webhook Payload Structure

When triggered, your webhook will receive a JSON payload containing the configured parameters. Here’s an example structure:
{
  "conversation-analysis": {
    "result": "At the start of the conversation, the user greets with a neutral \"hello,\" suggesting a neutral or open emotional state. However, their brief and vague response \"any\" may indicate a sense of uncertainty, indifference, or perhaps even hesitation. This could imply that the user may be unsure about how to express themselves or what they want to discuss. There doesn't appear to be a strong emotional shift yet, but there may be a subtle undercurrent of introspection or ambiguity."
  },
  "data": {
    "analysis": {
      "conversation-analysis": {
        "result": "At the start of the conversation, the user greets with a neutral \"hello,\" suggesting a neutral or open emotional state. However, their brief and vague response \"any\" may indicate a sense of uncertainty, indifference, or perhaps even hesitation. This could imply that the user may be unsure about how to express themselves or what they want to discuss. There doesn't appear to be a strong emotional shift yet, but there may be a subtle undercurrent of introspection or ambiguity."
      }
    },
    "assistant": {
      "id": "2193965165215481856",
      "version": "vrsn_2216851806678417408"
    },
    "conversation": {
      "id": "2216964057603244032",
      "messages": [
        {
          "message": "hello",
          "role": "user"
        },
        {
          "message": "Hi there, it's good to hear from you. What's on your mind today?",
          "role": "assistant"
        },
        {
          "message": "any",
          "role": "user"
        },
        {
          "message": "It sounds like you're leaving things open-ended right now, maybe unsure where to begin. Is there something you've been thinking about or feeling lately that you'd like to explore?",
          "role": "assistant"
        }
      ]
    }
  },
  "event": "conversation.completed"
}