Webhooks let you automatically send chat data to your own servers or third-party services when events occur in Social Intents. Use them to sync leads with your CRM, archive transcripts, or trigger custom workflows.
Supported Events
| Event | Value | When It Fires |
|---|---|---|
| Chat completed | "" (empty/default) | When a chat is archived (answered or missed) |
| Offline message | "offline_message" | When a visitor submits an offline message |
| Lead captured | "lead" | When a new lead is captured |
Option 1: Turn On the Transcript Webhook in Settings
For the most common case - posting each chat transcript to your endpoint when a chat ends - no code is needed:
Open API & Webhooks
Go to Settings > API & Webhooks (Admins only). You can also click Set up on the Webhooks card on the Integrations page.
Enter Your URL
In the Webhooks card, switch on Enable webhooks and enter your Webhook URL.
Save
Click Save webhook settings. When a chat ends, we POST a JSON payload with the transcript and visitor details to your URL. The Integrations page shows the Webhooks card as Connected.
Option 2: Register Webhooks with the REST API
Use the API when you need offline-message or lead events, per-widget webhooks, or several endpoints. Find your API token under Settings > API & Webhooks (see REST API Overview).
Register a webhook using the REST API:
POST /v1/api/apps/{widgetId}/webhook
Content-Type: application/json
X-SocialIntentsToken: YOUR_API_TOKEN
{
"target_url": "https://your-server.com/webhook/chats",
"event": ""
}
The response returns the webhook ID:
{"id": "webhook-uuid-here"}
Webhook Payload
Social Intents sends an HTTP POST with Content-Type: application/json to your target URL. The payload is a JSON array:
Chat Event Payload
[{
"id": "chat-uuid",
"appId": "widget-uuid",
"startDate": "2025-01-15T10:30:00Z",
"chatType": "Answered",
"visitorFullName": "Jane Smith",
"visitorFirstName": "Jane",
"visitorLastName": "Smith",
"visitorEmail": "jane@example.com",
"visitorPhone": "555-0199",
"visitorGroup": "Sales",
"agentName": "John",
"agentId": "agent-id",
"textBody": "Visitor: Hi there
Agent: Hello!",
"page": "https://example.com/pricing",
"referrer": "https://google.com",
"ip": "...",
"location": "...",
"duration": 120,
"visits": 3,
"visitorCustom1": "...",
"visitorConsent": "yes"
}]
Lead Event Payload
[{
"id": "lead-uuid",
"appId": "widget-uuid",
"appName": "My Widget",
"firstName": "Jane",
"lastName": "Smith",
"email": "jane@example.com",
"phone": "555-0199",
"group": "Sales",
"page": "https://example.com/pricing",
"addDate": "2025-01-15T10:30:00Z"
}]
Deleting a Webhook
DELETE /v1/api/apps/{widgetId}/webhook/{webhookId}
X-SocialIntentsToken: YOUR_API_TOKEN
Or delete a webhook across all widgets:
DELETE /v1/api/webhook/{webhookId}
X-SocialIntentsToken: YOUR_API_TOKEN
Automatic Cleanup
Webhooks that return HTTP 410 (Gone) or 500+ error codes are automatically removed. Make sure your endpoint returns a 200 status code on success.
Connection Settings
- Connect timeout: 2.5 seconds
- Method: POST
- Content-Type: application/json; charset=UTF-8