
What are webhooks?
Webhooks are automated HTTP requests sent when a call, WebRTC media session, or assistant conversation reaches a configured event. They enable you to:- Receive real-time updates about call, media, and conversation status
- Collect conversation data for analysis or storage
- Trigger actions in external systems based on call, WebRTC, or conversation events
Events
Call events
| Event | When it is sent |
|---|---|
call.received | An inbound call reaches the assistant. |
call.ringing | An outbound call is ringing. |
call.provider_answered | The telephony provider answers the call. |
call.outbound_requested | An outbound call is requested. |
call.outbound_dispatched | The outbound call request is sent to the provider. |
call.outbound_dispatch_failed | The outbound call request cannot be sent to the provider. |
call.started | The call media session starts. |
call.hangup | A hangup signal is received. |
call.ended | The call session finishes. |
call.failed | The call fails. |
call.cancelled | An outbound call is cancelled before connection. |
WebRTC events
| Event | When it is sent | Payload notes |
|---|---|---|
webrtc.connected | The WebRTC media connection is established. | Includes session_id, media_session_id, ice_latency_ms, and peer_connection_state. |
webrtc.audio_track_received | The remote WebRTC audio track is received. | Includes session_id, media_session_id, and negotiated codec. |
webrtc.reconnecting | The WebRTC media connection starts recovery. | Includes type, session_id, media_session_id, reason, restart_attempt, and restart_limit. |
webrtc.failed | The WebRTC media connection fails or falls back to text mode. | Includes failure type, session_id, reason, and optional media_session_id, error, fallback, or peer_connection_state. |
webrtc.disconnected | The WebRTC media connection disconnects or closes. | Includes session_id, media_session_id, reason, and optional type or peer_connection_state. |
Conversation events
| Event | When it is sent | Payload notes |
|---|---|---|
conversation.begin | A new conversation is initialized. | Includes assistant ID, conversation ID, source, identifier, and is_new. |
conversation.resume | An existing conversation is resumed. | Includes assistant ID, conversation ID, source, identifier, and message count. |
conversation.completed | The conversation finalization flow completes successfully. | Post-call analysis runs before this webhook is recorded, so analysis output is included in data.metadata as analysis.<analysis_name>. |
conversation.error | The conversation hits an unrecoverable error. | Includes assistant and conversation IDs when available, plus the error reason and message. |
Payload shape
All webhook requests are sent as JSON. The top-level envelope is consistent across event types:conversation object is included when the event is tied to a conversation. Event-specific fields are always inside data; context_id is not sent as a separate top-level field.
Call payloads
Call event payloads include the available call lifecycle fields. Common keys areprovider, direction, caller, to, from, context_id, channel_uuid, status_event, provider_response, stage, reason, status, duration_ms, call_status, failure_class, failure_reason, disconnect_reason, provider_status_code, retryable, and error.
WebRTC payloads
WebRTC events use the same envelope and include media-session fields indata.
webrtc.reconnecting, data.type is usually ice_restarting or media_session_restarting. For webrtc.failed, data.type can include values such as peer_failed, media_session_start_failed, media_session_restart_failed, or media_restart_limit_reached.
Conversation payloads
conversation.begin includes source and identifier context for a new conversation:
conversation.resume includes the same source and identifier context plus the current message_count.
The default conversation.completed payload has this structure:
Analysis values are only available on
conversation.completed. Call and WebRTC events do not include post-call analysis output. If an analysis endpoint fails, the completed webhook is still sent, but the failed analysis key is omitted from data.metadata.conversation.error includes the terminal error reason and message:
Configuration options
- HTTP method: Select the HTTP method used for delivery.
POSTis the default for most integrations. - Server URL: Set the endpoint that receives webhook requests.
- Headers: Add authentication headers or any required integration headers.
- Retry status entries: Configure response status entries used by the delivery retry policy.
- Retry count: Set how many times Rapida should retry delivery for retryable failures.
- Timeout: Set how long Rapida should wait for your endpoint to respond.
Use Cases
Real-time Monitoring
Set up webhooks to receive instant notifications about call, media, and conversation starts, completions, or failures. This allows you to monitor assistant performance and user engagement in real time.
Data Analysis
Collect conversation data and analysis results through webhooks to feed into your analytics pipeline. This can help you gain insights into user behavior, common queries, and assistant effectiveness.
CRM Integration
Use webhooks to automatically update customer records in your CRM system based
on conversation outcomes. This ensures your customer data stays current
without manual intervention.
Automated Workflows
Trigger automated actions in your systems based on specific conversation
events or outcomes. For example, create support tickets, send follow-up
emails, or update inventory based on user interactions.
Conversation Logging
Maintain a comprehensive log of all assistant conversations by capturing
webhook data. This can be crucial for compliance, training, and quality
assurance purposes.
Multi-channel Support
Integrate webhook data with your omnichannel support system to provide seamless customer experiences across various platforms and touchpoints.
