Command Palette

Search for a command to run...

Webhook API

Receive real-time events from Botrelic.

Overview

Webhooks allow your application to receive real-time notifications when specific events occur in Botrelic. This is useful for triggering actions in your system, such as updating a CRM record or sending an email notification.

Events

Botrelic supports the following webhook events:

message.created

Triggered when a new message is sent by a user or an agent.

session.started

Triggered when a new chat session begins.

session.ended

Triggered when a chat session is closed or expires.

handoff.requested

Triggered when a user requests to speak with a human agent.

Payload Structure

Webhook payloads are sent as JSON objects containing information about the event.

Example: message.created

{
  "event": "message.created",
  "data": {
    "id": "msg_123",
    "session_id": "sess_456",
    "agent_id": "agent_789",
    "role": "user",
    "content": "I need help with my account.",
    "created_at": "2023-10-27T10:00:00Z"
  }
}

Security

To ensure the authenticity of webhook requests, Botrelic signs each payload with a secret key. You can verify the signature using the X-Botrelic-Signature header.