Webhook Integrations

    Push captured leads and events to any external system in real time. Connect PilotAgent to your CRM, notification tools, or custom endpoints. Available on Enterprise and Enterprise+.

    How Webhooks Work

    A webhook is a URL that receives data automatically when something happens in PilotAgent. When a lead is captured or a message is sent, PilotAgent sends the details to your webhook URL instantly.

    POST https://your-api.com/webhook Content-Type: application/json X-Webhook-Event: message.sent { "event": "message.sent", "timestamp": "2026-09-30T10:00:31.000Z", "conversation": { "id": "5b0e8f7a-2c1d-4e4b-9a57-3f1c2d8e6a10", "threadId": "1953209448598174", "url": "https://www.facebook.com/messages/t/1953209448598174", "buyerName": "Sarah", "listing": { "title": "4 bed house, Northwest Hills", "id": "1829285625158180", "url": "https://www.facebook.com/marketplace/item/1829285625158180/" }, "startedAt": "2026-09-30T09:58:12.000Z" }, "buyerMessage": { "text": "Can I view it on Saturday?", "readAt": "2026-09-30T10:00:05.000Z" }, "reply": { "text": "Yes, Saturday works. Is 10am good for you?", "writtenAt": "2026-09-30T10:00:05.000Z", "sentAt": "2026-09-30T10:00:31.000Z", "confirmed": true }, "transcript": [ { "from": "buyer", "name": "Sarah", "text": "Is this still available?" }, { "from": "pilotagent", "text": "Hi Sarah, yes it is. Would you like to view it?" }, { "from": "buyer", "name": "Sarah", "text": "Can I view it on Saturday?" }, { "from": "pilotagent", "text": "Yes, Saturday works. Is 10am good for you?" } ], "lead": null, "agent": { "id": "c2f4a9d1-7e3b-4a8c-b6d5-1e9f0a2b3c4d", "name": "Main account" }, "user": { "id": "9d8c7b6a-5f4e-4d3c-2b1a-0f9e8d7c6b5a", "email": "you@yourcompany.com" } }

    Setting Up Webhooks

    1. 1In your dashboard, open Leads, then Lead settings
    2. 2Paste your webhook URL (from Zapier, Make, n8n or your own server)
    3. 3Tick the events to send: new leads, new conversations, every reply sent
    4. 4Press Send test event to check your URL receives it, then save

    Supported Events

    lead.captured

    When a buyer shares their contact details: name, email, phone and address

    message.sent

    Each reply PilotAgent sends: the buyer's message, the reply, the whole chat and any contact details

    conversation.started

    The first time PilotAgent answers a buyer: their first message, the listing and the chat

    Each event has an event field and an X-Webhook-Event header. Conversation events carry the whole chat as PilotAgent read it, so your system can always rebuild the full conversation. Facebook shows no time for each message, so the chat lines have none; the event and the reply do. In message.sent, reply.confirmed is true when PilotAgent saw the reply appear in the chat (extension 2.0 and later). Older versions send it as soon as the reply is written, with confirmed false.

    Common Integrations

    HubSpot / Salesforce

    Automatically create contacts from captured leads

    Google Sheets

    Add a new row for every captured lead via Zapier

    Slack / Email Alerts

    Get real-time notifications when high-value leads come in

    Retry Logic

    If your server does not answer with a 2xx status, PilotAgent tries again up to 3 times: after 1, 5 and 15 seconds.