Skip to content

Web Embed quick start

Add Canopi to any website with a single script tag. Visitors get a trigger (corner tab or icon) that opens the full Canopi sidebar connected to your community.

Prerequisites

  • A Canopi account at app.canopi.live
  • A created embed instance with domain whitelist configured
  • Ability to edit your site's <head> or tag manager

Step 1 — Create an embed instance

  1. Sign in at app.canopi.live.
  2. Open My CanopisCreate embed.
  3. Set:
    • Name — e.g. "Help Center"
    • Community — which auth community connects
    • Domain whitelistexample.com, www.example.com
    • Page rules — URL patterns (e.g. /help/*, /docs/*)
    • Trigger — corner tab position, message, colors
  4. Copy the generated embed code.

Step 2 — Add the script tag

Paste into your site <head> (or before </body>):

html
<script
  src="https://app.canopi.live/embed/v1.js"
  data-canopi-id="YOUR_INSTANCE_ID"
  async
></script>

Replace YOUR_INSTANCE_ID with the ID from the dashboard.

Step 3 — Verify

  1. Open a page matching your page rules on a whitelisted domain.
  2. Confirm the trigger appears (bottom-right by default).
  3. Click it — the sidebar should load and connect.
  4. Check browser devtools → Network for GET /api/embeds/config/YOUR_INSTANCE_ID (200).

Optional: data attributes

AttributeDescription
data-canopi-idRequired. Embed instance ID
data-pagesComma-separated URL patterns (overrides server config if supported)
data-trigger-positionbottom-right, bottom-left, etc.
data-trigger-messageHover text on the trigger tab

Page targeting

Embed instances support pattern-based rules stored server-side:

json
{
  "type": "patterns",
  "patterns": ["/help/*", "/docs/*", "/blog/*"]
}

The SDK evaluates the current path against these patterns before injecting the trigger.

Security

  • Domain whitelist — config is only honored on listed domains.
  • Public config endpoint — returns non-secret display settings only.
  • Authenticated admin APIs — create/update/delete require JWT.

Troubleshooting

IssueCheck
No triggerDomain not whitelisted or URL does not match page rules
403 on configInstance inactive or domain mismatch
Sidebar blankUser must sign in inside sidebar; check API CORS in console
Cached old configConfig responses are short-lived; hard-refresh

Next

Canopi — Metaweb coordination layer for community-aware presence and messaging.