Skip to main content
Webhooks send conversation events from SiteGPT to a URL that you own. SiteGPT sends a POST request with a JSON body each time an event happens.

Availability

Webhooks are available on the Scale plan and above, or with the webhook add-on. See Plans and limits. Without webhook access, the Webhooks tab does not show in Settings.

Settings

Each chatbot has three webhook URLs, in Settings > Webhooks. Each URL has its own token. Fill in only the ones you need, then select Save Changes. These are the only four events. SiteGPT sends no other webhook events.

Request format

Security

  • The X-WEBHOOK-TOKEN header is the only way to check that a request comes from SiteGPT. Set a long random token and reject requests where the header does not match.
  • SiteGPT does not sign webhook requests. There is no signature header.
  • Treat each token as a secret. Anyone who knows your URL and token can send you fake events.

Delivery

  • SiteGPT sends each event once. It does not retry a failed delivery.
  • SiteGPT does not read your response. A 4xx or 5xx status is not reported anywhere.
  • Answer quickly with a 2xx status and do slow work after you respond.
  • To find events that you missed, read conversations and leads with API v2.

Events

ADD_MESSAGE

Sent for every message saved in a conversation: AI answers, visitor messages in a human-handled conversation, replies from your team, and system messages.
Do not treat question or answer as required. Each one can be null, depending on the message type.

NEW_LEAD_CAPTURE

Sent when the chatbot collects a new lead.
  • dashboardUrl opens the lead in your dashboard.
  • customData holds the answers to your custom lead form fields, keyed by field name. See Collect leads.
  • capturedAt is an ISO 8601 date and time.

CONVERSATION_ESCALATED

Sent when a conversation is escalated to your team. Each escalation sends this event one time. In rare cases, when SiteGPT must process an escalation again after an internal error, the same event can arrive twice. Use threadId to detect duplicates.
  • dashboardUrl opens the conversation in your dashboard.
  • user is null when SiteGPT does not know the visitor yet. When it knows the visitor, user has id, name, email, phone, verified, createdAt, and updatedAt.

CONVERSATION_ESCALATED_UPDATED

Sent to the escalation URL when the visitor gives contact details after an escalation. It has the same fields as CONVERSATION_ESCALATED, with user filled in. Create your ticket on CONVERSATION_ESCALATED. Update it on CONVERSATION_ESCALATED_UPDATED, matched by threadId. Do not treat the update as a new escalation.

HIPAA mode

For chatbots in HIPAA mode, SiteGPT removes conversation content and personal data from webhook bodies:
  • ADD_MESSAGE: question and answer are null, and sources is empty.
  • Escalation events: user is null.
  • NEW_LEAD_CAPTURE: the name, email, phone, and custom fields are empty.
See HIPAA.

Example handler

Test your webhook

SiteGPT has no test button. To see real payloads, point a URL at a request inspector that you trust. Then send a message in the chat preview, submit the lead form, or escalate a conversation.

Legacy API v0

The legacy API v0 can also set a messages webhook URL and token for one conversation. That value replaces the chatbot’s messages webhook for that conversation. See the v0 reference.