• Compare
  • Documentation
  • Pricing
  • Agents
Sign InStart free

The outbound integration layer for SaaS products: emit once, then let Meshes handle routing, retries, fan-out, and delivery history.

  • Terms of Service
  • Privacy Policy
  • Acceptable Use Policy
  • Cookie Policy

© Copyright 2026 Meshes, Inc. All Rights Reserved.

  • Getting Started
    • What is Meshes?
    • Core Concepts
    • Quickstart
    • API Overview
  • AI Tools
    • Cursor Rules
    • MCP Server
    • LLMs Docs
  • API Documentation
    • API Reference
    • Authentication
    • Results
    • Rate Limiting
    • SDKs
    • Integrations & Rules
  • Events
    • Publishable Keys
    • Send Events
    • Bulk Event Ingestion
  • Embed & Sessions
    • Quickstart
    • Session API Overview
    • Launch URL and Iframe Bootstrap
    • Iframe Message Contract
    • Session Roles and Scopes
    • Workspace Pages Available in Embed
    • Session Refresh Lifecycle
    • Iframe Sizing and Resize Handling
    • OAuth and Connection Setup Behavior
    • Security Model
    • Troubleshooting
  • Integrations
    • HubSpot
    • Intercom
    • Slack
    • Salesforce
    • Zoom

Iframe Message Contract

Reference the postMessage contract used between the host app and the Meshes embed iframe.

Meshes embed uses window.postMessage to exchange runtime state between the host app and the iframe.

Parent -> iframe

meshes:auth

Send the current session token into the iframe.

{
  "type": "meshes:auth",
  "token": "eyJhbGciOiJIUzI1NiIs..."
}

Use this:

  • after meshes:ready
  • after session refresh
  • after receiving meshes:token-refresh

Iframe -> parent

meshes:ready

Sent when the iframe is ready to receive the session token.

meshes:token-refresh

Sent when the iframe needs a new session token.

Your host should respond by refreshing the session on your backend and sending a new meshes:auth message.

meshes:token-expired

Sent when the iframe no longer has a usable session token.

meshes:navigate

Sent when the iframe navigates between supported embed pages.

meshes:resize

Sent when the iframe content height changes.

{
  "type": "meshes:resize",
  "height": 842
}

Recommended host behavior

  • respond to meshes:ready by sending meshes:auth
  • respond to meshes:token-refresh by refreshing the session and sending a new token
  • respond to meshes:resize by applying the height to the iframe
  • log meshes:token-expired so your app can show a fallback state if needed

Always:

  • derive the embed origin from launch_url
  • ignore messages from any other origin
  • send meshes:auth back to that same origin rather than using *

Related docs

  • Quickstart
  • Iframe Sizing and Resize Handling
  1. Parent -> iframe
    1. meshes:auth
    2. Iframe -> parent
    3. Recommended host behavior
    4. Related docs