Documentation/API Reference/Webhooks

Webhooks

Receive real-time notifications when leads are captured.

What are Webhooks?

Webhooks allow you to receive automatic notifications when events happen in Sensei AI. When a lead is captured, we'll send a POST request to your configured URL with the lead data.

Common Use Cases:

  • • Send leads to a CRM (HubSpot, Salesforce, Pipedrive)
  • • Add contacts to email marketing (Mailchimp, ConvertKit)
  • • Create tasks in project management tools
  • • Send notifications to Slack or Discord
  • • Trigger custom workflows in Zapier or Make

Configuration

Setting Up a Webhook
  1. 1

    Go to Client Settings

    Admin → Clients → [Client] → Settings

  2. 2

    Enter Webhook URL

    Paste your webhook endpoint URL in the "Lead Webhook URL" field

  3. 3

    Save Settings

    Click Save to activate the webhook

Webhook Payload

Lead Capture Event
Sent when a visitor submits the lead form

Request:

POST https://your-webhook-url.com/leads
Content-Type: application/json

Payload:

{
  "event": "lead.created",
  "timestamp": "2024-11-24T10:30:00.000Z",
  "data": {
    "id": "lead-uuid-here",
    "name": "John Doe",
    "email": "john@example.com",
    "phone": "+1234567890",
    "message": "I need a quote for enterprise plan",
    "clientId": "d454991a-eddb-4e81-959d-87c868e050ca",
    "clientName": "Acme Corp",
    "sessionId": "session-uuid-here"
  }
}
FieldTypeDescription
event
string
Event type (always "lead.created")
timestamp
string
ISO 8601 timestamp
data.id
string
Unique lead identifier
data.name
string
Lead's full name
data.email
string
Lead's email address
data.phone
string | null
Lead's phone (if provided)
data.message
string | null
Additional message (if provided)
data.clientId
string
Client UUID

Expected Response

Your webhook endpoint should return a 2xx status code to acknowledge receipt:

Success

Status: 200, 201, or 204

Failure

Any non-2xx status (logged but not retried)

Integration Examples

Zapier
  1. 1. Create a new Zap
  2. 2. Choose "Webhooks by Zapier" as trigger
  3. 3. Select "Catch Hook"
  4. 4. Copy the webhook URL
  5. 5. Paste in Sensei client settings
Make (Integromat)
  1. 1. Create a new scenario
  2. 2. Add "Webhooks" module
  3. 3. Select "Custom webhook"
  4. 4. Copy the webhook URL
  5. 5. Paste in Sensei client settings