comms_embed_create
Embed a LIVE mosadd chat channel into an app/site you're building (great for builder-agents on Lovable/Bolt/Cursor/v0). Mints a publishable embed key scoped to a channel + the app's domain(s) and returns a ready-to-paste HTML snippet (a + ). Visitors of the host page chat in real time (anonymous nick or mosadd login). REQUIRES allowed_origins — the domain(s) the app is served from (the key only works there). The publishable key is browser-safe (mints only channel-scoped JWTs); your hub key never leaves the server. Returns { embed_key, channel, allowed_origins, snippet }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| anon | No | Allow visitors to join with just a nick (no mosadd account). Default true. | |
| mode | No | Key mode — 'test' for local/dev origins, 'live' for production. Default 'live'. | |
| name | No | Label for the key in the owner's dashboard. Default 'embed: <channel>'. | |
| skin | No | Visual skin. Default 'default' (mosadd-branded retro mIRC). | |
| title | No | Header title shown in the widget. Default 'mIRC'. | |
| locale | No | Widget UI language. Default 'en'. | |
| channel | Yes | The mIRC channel id everyone on the embed shares (e.g. 'acme-support'). Auto-created on first message if new. | |
| position | No | Where the widget renders. Default 'inline'. | |
| allowed_origins | Yes | REQUIRED. Domain(s) where the widget will be served — the key only works from these origins. Use the host(s) of the app you're building, e.g. ['app.acme.com','*.acme.com']. For local testing use mode:'test' and e.g. 'localhost:3000'. |