Skip to main content
The Inbox component shows a list of conversations for the current User. It handles loading, pagination, and real-time updates automatically. Inbox component rendering a list of conversations with unread indicators and the most recent message snippet

Installation

The simplest version of the inbox component can be embedded with an iframe:
Both {SURGE_USER_ID} and {ACCOUNT_TOKEN} are required for this account-token form. {PHONE_NUMBER_ID} is optional; include it when you want the inbox to show only conversations associated with a specific phone number. If you use a signed User JWT from your server, pass that JWT as token and omit user_id; the JWT identifies the User. See Embeddable UI components for the two authentication options.

Events

The Inbox component emits postMessage events that you can listen to from the parent window. Listen for events from https://embed.surge.app:
See the Inbox component reference for the full event payload shapes.