Instagram Webhook Payload

Instagram webhooks are sent for direct messages, reactions, and read receipts.

Example payload

1{
2 "event": {
3 "id": "evt_ig_abc123",
4 "channel": "instagram",
5 "timestamp": 1706640000.0,
6 "data": {
7 "timestamp": 1706640000.0,
8 "direction": "inbound",
9 "platform": "instagram",
10 "message_id": "igmid_xyz789",
11 "chat_id": "chat_456",
12 "content": "Hey! I saw your post about coaching services",
13 "is_from_account": false,
14 "account_id": "acc_123",
15 "sender_attendee": {
16 "attendee_id": "att_789",
17 "attendee_name": "johndoe",
18 "attendee_provider_id": "17841234567890",
19 "attendee_profile_url": "https://instagram.com/johndoe"
20 },
21 "social_event_type": "message_received",
22 "attendees": [
23 {
24 "attendee_id": "att_789",
25 "attendee_name": "johndoe",
26 "attendee_provider_id": "17841234567890"
27 }
28 ],
29 "attachments": [],
30 "usage_data": {
31 "prompt_tokens": 180,
32 "completion_tokens": 55,
33 "model": "gpt-4"
34 },
35 "tools_called": [],
36 "analysis_result": {
37 "sentiment": "curious",
38 "intent": "inquiry"
39 }
40 }
41 },
42 "lead_id": "lead_123",
43 "lead_contact": {
44 "number": "",
45 "email": "",
46 "name": "johndoe"
47 },
48 "business_id": "biz_456",
49 "lead_created": true
50}

Field reference

Core fields

FieldTypeRequiredDescription
timestampfloatYesUnix epoch timestamp
directionstringYesinbound or outbound
platformstringYesAlways instagram
message_idstringYesInstagram message ID
chat_idstringYesConversation thread ID
contentstringYesMessage content
is_from_accountbooleanYesTrue if sent by connected account
account_idstringYesConnected Instagram account ID
social_event_typestringYesEvent type

social_event_type values

ValueDescription
message_receivedNew message received
message_reactionReaction added to message
message_readMessage marked as read
message_editedMessage was edited
message_deletedMessage was deleted

sender_attendee object

FieldTypeDescription
attendee_idstringInternal attendee ID
attendee_namestringInstagram username
attendee_provider_idstringInstagram user ID
attendee_profile_urlstringProfile URL (optional)

Optional fields

FieldTypeDescription
attendeesarrayConversation participants
attachmentsarrayMedia attachments
usage_dataobjectLLM token usage
tools_calledarrayTool names executed
tool_callsarrayRaw tool call data
tool_resultsobjectTool execution results
analysis_resultobjectAI analysis output
appointmentsarrayExtracted appointments
execution_contextobjectSource trigger context
reactionstringEmoji (for reactions)
reaction_senderobjectReaction sender info

attachments array

FieldTypeDescription
idstringAttachment ID
typestringimage, video, audio, story_mention, reel
urlstringDownload URL
mimetypestringMIME type
unavailablebooleanTrue if expired
sizeobjectDimensions

Instagram leads may not have phone or email initially. Use the conversation to collect contact information.