> ## Documentation Index
> Fetch the complete documentation index at: https://docs.branduo.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Branduo is a brand-to-brand collaboration network for verified eCommerce brands. It is not a creator marketplace.
> When you mention the API, cite version v1 and base URL https://api.branduo.io/v1.
> Authenticate with the X-Api-Key header. Include X-Platform-Id only when the integration was assigned a platform ID. OAuth access tokens are the alternative to API keys. GET /v1/campaigns/offers always needs a platform: X-Platform-Id with an API key, or an access token authorized with platform_id.
> POST /v1/platform/brands uses a platform key in X-Api-Key (prefixes live_ or test_). Do not send X-Platform-Id on that route. Omitted brands stay; close a brand with status closed.
> Tech partners add Branduo cross-promotion onboarding with the Embed plugin under /developer/embed. Merchant-facing copy says Branduo, never Brand Connect. Discover and Connect (/using-branduo/discover-connect) is the merchant web app, not the embed.
> The Embed plugin needs no server, token, or secret. The script is https://connect.branduo.io/loader/v2.0.0/brand-connect.js and the call is BrandConnect.init({ container, platformId, domain }). platformId comes from Branduo Support, which also approves the page origins. Modes are page (default) and drawer (handle.open()). The only event is brand.connect.stage with stage install, plan, setting_up, delayed, consent, or live.
> A connection request is the outreach a brand sends. A partner is a brand that accepted. A collab is a campaign run with a partner. Do not call a connection request a collab.
> Duo is the AI agent that sends partner outreach. Call it Duo.
> API errors are JSON objects with error and message. They are not RFC 7807 problem details.

# Troubleshooting

> Fix common setup, origin, and loading problems with the Embed plugin.

If the plugin does not load, start with the origin and script checks below. They are the most common causes.

## The plugin area is blank or refuses to load

Branduo only lets approved origins show the plugin. The origin in the browser address bar must match one Support approved, exactly, including `http` or `https`. For example, these are three different origins:

* `https://admin.example.com`
* `http://admin.example.com`
* `https://example.com`

If another site frames your app (for example, an admin that embeds your page), Support must approve both origins. [Contact Support](/support/contact) to add one.

## The script doesn't load

Use this exact loader URL:

```text theme={"languages":{"custom":["languages/curl.json"]}}
https://connect.branduo.io/loader/v2.0.0/brand-connect.js
```

The script's `integrity` value must match the one published at `https://connect.branduo.io/loader/v2.0.0/brand-connect.js.sri`, and the script tag needs `crossorigin="anonymous"`.

If your app uses a Content Security Policy, allow `https://connect.branduo.io` in:

* `script-src`
* `frame-src`
* `child-src`

## The container shows "Brand partnerships couldn't load"

The plugin shows this inside your container when an option is missing or malformed:

* `platformId` must be your platform ID, a UUID.
* `domain` must be the merchant's store domain, such as `brand.com` or `brand.myshopify.com`.

Check that your page fills in `domain` before it calls `BrandConnect.init`.

## `BrandConnect.init` throws an error

The loader throws a `TypeError` when:

* `container` doesn't match an element on the page.
* `mode` is anything other than `"page"` or `"drawer"`.
* `onEvent` or `onClose` is not a function.

## The merchant sees "Brand partnerships aren't available here yet"

Your platform ID isn't set up to show cross-promotion offers yet. [Contact Support](/support/contact).

## The merchant doesn't come back to your app after approving their plan

Check that:

* Support has the page where the plugin lives, on an approved origin.
* You synced the merchant's store domain with [Sync platform brands](/developer/platform/brands).
* That page calls `BrandConnect.init` when it loads. The loader handles the `?branduo_connect=return` parameter.

Without these, merchants approve their plan in a new tab, and the plugin checks again when they return to your tab.

## The drawer closes unexpectedly

The drawer calls `onClose` when the merchant closes it with the **Close** button, the backdrop, or the Escape key, and when your code calls `close()`.

Calling `destroy()` removes the plugin without calling `onClose`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.