Skip to main content

Webhooks

Webhooks allow your Brainbase agents to send real-time notifications to your systems when events occur. When a call ends or other events happen, Brainbase sends an HTTP POST request to your configured webhook endpoint with detailed information about the interaction.

Webhook Payload Schema

When a webhook is triggered, your endpoint receives a POST request with the following JSON payload:

Extraction Results

The extractions object contains AI-extracted data based on your deployment’s extraction configuration.
The fields in extractions are entirely defined by your extraction configuration. You can extract any structured data from the conversation.

Call Data

These fields contain information about the call itself, spread at the top level of the payload.

Transcript Fields

Transcript Object Structure:

Metadata Fields


Raw Data

The raw_data object contains the original data from batch/outbound calls. This is your outbound_data that was passed when initiating the call.
For inbound calls, raw_data may be empty or contain minimal data. For outbound batch calls, this contains the full row data you provided.

Full Log Object

The log object contains the complete VoiceDeploymentLog from the database with all session details.

Log Status Values


Example Payload

Here’s a complete example of a webhook payload:

Handling Webhooks

When processing webhook payloads, we recommend:
  1. Validate the payload - Check that required fields like webhook_id and deployment_id are present
  2. Respond quickly - Return a 200 status code promptly; process data asynchronously if needed
  3. Handle duplicates - Use log_id or call_id to deduplicate if your endpoint receives the same event twice
  4. Store raw payloads - Consider logging the full payload for debugging purposes