session_started & session_closed
The session_started and session_closed events track the lifecycle of customer conversation sessions in the WhatsApp Inbox on the DEP platform. Each event is delivered as a flat JSON object.
Payload Examples
Section titled “Payload Examples”session_started
Section titled “session_started”{ "event": "session_started", "timestamp": "2026-11-16T08:00:00+00:00", "conversation_id": "7f6e5d4c-3b2a-1908-8765-4321fedcba98", "channel_type": "whatsapp", "contact": "6281234567890", "reason": "new", "agent_id": null, "team_id": "8a9b0c1d-2e3f-4a5b-8c9d-0e1f2a3b4c5d"}session_closed
Section titled “session_closed”{ "event": "session_closed", "timestamp": "2026-11-16T09:00:00+00:00", "conversation_id": "7f6e5d4c-3b2a-1908-8765-4321fedcba98", "channel_type": "whatsapp", "contact": "6281234567890", "reason": "resolved", "closed_by": "2c8d4a10-5e1b-4c3a-9f00-112233445566", "agent_id": "2c8d4a10-5e1b-4c3a-9f00-112233445566", "team_id": "8a9b0c1d-2e3f-4a5b-8c9d-0e1f2a3b4c5d"}Fields
Section titled “Fields”| Field | Type | Description |
|---|---|---|
event | string | "session_started" or "session_closed" |
timestamp | string | Event timestamp in RFC 3339 format (e.g. "2026-11-16T08:00:00+00:00") |
conversation_id | string | Inbox conversation UUID |
channel_type | string | Channel type ("whatsapp") |
contact | string | null | Customer phone number, or null if unavailable |
reason | string | "new" or "reopened" on session_started; "resolved", "auto_resolved", or "bulk_resolved" on session_closed |
closed_by | string | null | Present only on session_closed: UUID of the user who resolved the conversation for "resolved", or null for "auto_resolved" and "bulk_resolved" |
agent_id | string | null | UUID of the agent currently assigned to the conversation (null if unassigned) |
team_id | string | null | UUID of the inbox team assigned to the conversation (null if unassigned) |
When Is This Event Sent?
Section titled “When Is This Event Sent?”session_started: Sent when an inbound message from a WhatsApp customer creates a new conversation (reason: "new") or reopens aresolvedconversation within the 24-hour window (reason: "reopened").session_closed: Sent when a WhatsApp conversation transitions toresolvedvia single-conversation resolve (resolved), bulk resolve (bulk_resolved), or the Auto-Resolve timer (auto_resolved).
Scope Notes
Section titled “Scope Notes”- Emitted for 1-on-1 WhatsApp conversations associated with a WhatsApp sender number (
phone_number_id). - Not emitted for: conversations opened by outbound sends (before the customer replies), conversation merges, channel-disconnect closures, group inbox threads, webchat closures, or non-WhatsApp channels (such as RCS or Email).