Events Webhook
Webhook Documentation
Events are sent as HTTP POST requests to your configured endpoint with a structured JSON payload. Each event contains comprehensive information about the action that occurred in your workspace.
Event Types & Categories
Below are all possible event types you can subscribe to:
Event Type | Category | Description |
---|---|---|
agent_created | Agent Events | Agent was created |
agent_updated | Agent Events | Agent was updated |
agent_deleted | Agent Events | Agent was deleted |
message_received | Message Events | Message received on any channel |
organisation_created | Organisation Events | Organisation was created |
organisation_updated | Organisation Events | Organisation was updated |
organisation_deleted | Organisation Events | Organisation was deleted |
client_created | Client Events | Client was created |
client_updated | Client Events | Client was updated |
client_deleted | Client Events | Client was deleted |
lead_captured | Lead Events | Lead was captured by an agent |
webhook_test | Test Event | Used for testing your webhook endpoint |
Request Format
Property | Value |
---|---|
HTTP Method | POST |
Content Type | application/json |
Event Categories & Payloads
Agent Events
Types: agent_created
, agent_updated
, agent_deleted
Payload fields:
agentId
(string): The ID of the agentagentName
(string, optional): The name of the agentagentPlatform
(“vg” | “vf”, optional): The platform of the agentoperation
(“created” | “updated” | “deleted”): The operation performedcreatedAt
(number): Timestamp (ms)workspaceSecret
(string): Workspace secret for verification
Sample:
Message Events
Types: message_received
Payload fields:
agentId
(string): The ID of the agentagentName
(string, optional): The name of the agentconvoId
(string): The ID of the conversationmessageContent
(string): The content of the messagechannel
(“whatsapp” | “instagram” | “facebook” | “telegram” | “webchat”): The channelmessageType
(string, optional): The type of the messagefrom
(string, optional): The sendercreatedAt
(number): Timestamp (ms)workspaceSecret
(string): Workspace secret for verification
Sample:
Organisation Events
Types: organisation_created
, organisation_updated
, organisation_deleted
Payload fields:
organisationId
(string): The ID of the organisationorganisationName
(string, optional): The name of the organisationoperation
(“created” | “updated” | “deleted”): The operation performedcreatedAt
(number): Timestamp (ms)workspaceSecret
(string): Workspace secret for verification
Sample:
Client Events
Types: client_created
, client_updated
, client_deleted
Payload fields:
organisationId
(string): The ID of the organisationorganisationName
(string, optional): The name of the organisationclientId
(string): The ID of the clientclientName
(string, optional): The name of the clientclientEmail
(string, optional): The email of the clientoperation
(“created” | “updated” | “deleted”): The operation performedcreatedAt
(number): Timestamp (ms)workspaceSecret
(string): Workspace secret for verification
Sample:
Lead Events
Types: lead_captured
Payload fields:
agentId
(string): The ID of the agentagentName
(string, optional): The name of the agentleadName
(string, optional): The name of the leadleadEmail
(string, optional): The email of the leadleadPhone
(string, optional): The phone of the leadchannel
(see below): The channel where the lead was capturedoperation
(“captured”): The operation performedcreatedAt
(number): Timestamp (ms)workspaceSecret
(string): Workspace secret for verification
Possible channel values:
voice
,vapi
,web-chat
,whatsapp
,instagram
,telegram
,discord
,gb-chat
,messenger
,telephony
,webchat
Sample:
Webhook Test Event
Type: webhook_test
Payload fields:
message
(string): Test messagecreatedAt
(number): Timestamp (ms)workspaceSecret
(string): Workspace secret for verification
Sample:
Implementation Guidelines
- Response Requirements:
- Return HTTP 200 status for successful receipt
- Response within 30 seconds timeout
- Empty response body is acceptable
- Delivery Behavior:
- Events delivered in real-time
- No automatic retry mechanism
- Order of delivery not guaranteed
- Data Format:
- Timestamps in milliseconds (Unix epoch)
- UTF-8 encoded JSON payload
- All fields are consistent across events
- Security & Performance:
- Use workspace secret for verification
- Ensure endpoint can handle event volume
- Implement proper error handling
Best Practices
- Validate the workspace secret on every incoming webhook to ensure authenticity
- Implement idempotency handling using the event timestamp and payload data
- Use asynchronous processing for webhook handling to avoid timeout issues
- Log all incoming webhooks for debugging and monitoring purposes
Testing Your Webhook
You can test your webhook endpoint using the webhook_test
event. This event is sent with a simple payload and can be used to verify your endpoint is reachable and correctly configured.
Sample:
Subscribing to Events
You can subscribe to one or more event types. Only events you are subscribed to will be sent to your endpoint. The workspace secret is included in every payload for verification and security.
To update your subscriptions, use the dashboard or API as appropriate.