Skip to content
Narro
Narro AI
Pricing
Log inContact sales
Contact sales
Documentation
How it worksSupport

Get started

OverviewWorkspaceHow Narro works

Moxie

Moxie

The record

Company record

Prepare

Prepare

Fundraise

Fundraise
Add-ons

Network

Narro Network

Bring data in

IntegrationsGoogle DriveGmail

Share Narro out

Connect
MCP
PlatformsPermissionsCustom apps

Account

AccountBillingTeamMemory

Reference

SecurityFAQ

Developers

Which API do I need?
Data API
Getting started for partnersAuthentication and keysRate limitsEnvelope and errorsSandbox dataEndpointsWebhooksEvents APIOutcome write-backIntakeMCP for Claude and CursorJSON SchemasPricing and tiers
Programs API
Getting startedCompany profile and readinessAsk NarroAuthenticationKeysKey scopingRate limitsErrors and retriesSandboxEndpointsWebhooksEventsOutcomesIntake and documentsMCPJSON SchemasObjects and error codesWidgetsVersioningGo livePricing and billingData protection

Narro docs

Loading…

Docs/Developers/Programs API/Widgets

Widgets

Put the program on your own pages with one script tag and one endpoint on your server. The widget runs in a Narro frame, so your page never handles a founder's data.

Not available yetWidgets are not available to partners yet. POST /widget-tokens answers 403 product_unavailable, with a test key and with a live key, and so does every call made with a widget token. This page describes how they will work. Nothing in your setup or go-live needs them, and a live key does not need the widget scope.

How it works

  1. Your page has a div that names a widget, and a script tag for the Narro loader. The loader is small and holds no logic.
  2. The loader asks the widget host whether widgets are available, then asks your server for a token.
  3. Your server mints a widget token with its partner key and returns it. The key never reaches the browser.
  4. The loader opens a sandboxed iframe on the widget host with the token. The widget runs there and calls the Narro API itself.

The widget host is its own address, separate from the API host https://api.thenarro.com. Your server calls the API host to mint tokens. The Widgets shows the widget host in the install snippet for each widget, with your own settings filled in. The samples here write it as https://<your-widget-host>.

Install

There are two ways to load the loader. The Hub shows both and fills in the host and, for a pinned install, the hash.

Pinned, with Subresource Integrity

A pinned loader is one exact version at /v<version>/loader.js. It never changes, so the browser can check it against an integrity hash. You choose when to move to a newer version. Copy the hash from the Hub. Do not compute or type one by hand.

<div data-narro-program-widget="my_cohort"
     data-token-url="/narro/widget-token/my_cohort"
     data-fallback="Your cohort is not available right now."></div>
<script src="https://<your-widget-host>/v<version>/loader.js"
        integrity="sha384-<hash-from-the-hub>"
        crossorigin="anonymous" async></script>

Channel

A channel URL follows a release channel inside one major version: stable or latest. Updates arrive without a reinstall and never cross a major version. The plain https://<your-widget-host>/v1/loader.js is the same as stable. A channel moves, so it cannot carry an integrity hash. The loader is tiny and holds no logic, and the widget itself runs inside the Narro frame, so the file that moves is not the code that handles data.

<div data-narro-program-widget="my_cohort"
     data-token-url="/narro/widget-token/my_cohort"></div>
<script src="https://<your-widget-host>/v1/stable/loader.js" async></script>

Older versions stay hosted while they are deprecated, for at least the six month overlap on Versioning. A channel change or a rollback reaches the loader within about a minute.

Markup attributes

AttributeMeaning
data-narro-program-widgetThe widget id. Required. See the list below.
data-token-urlA path on your site, or an https URL, that returns JSON with a token field. The loader calls it with same-origin credentials, so your own session identifies the founder.
data-tokenA token your server wrote into the page, instead of data-token-url. Use data-token-url unless you must render the token at page load.
data-localeen-CA, fr or es. Default is en-CA.
data-target-refFor intro_request only: the match or target reference the button is for.
data-fallbackText shown in place of the widget when it is unavailable. Optional.
data-titleThe title of the iframe, for screen readers. Optional. Default names the widget.
data-portal-urlAn https link the widget may open in a new tab when it asks to open your portal. Optional.

Mint tokens from your backend

Your endpoint is the URL in data-token-url. It checks that the visitor is signed in on your site, finds their fdr_ founder reference, calls POST /widget-tokens with the partner key, and returns the token. Mint a new token for each page view. A token is bound to one widget, one origin, and one founder or no founder, and lasts at most 10 minutes. ttl_seconds can ask for less, from 30 to 600.

// Your backend: the URL you put in data-token-url. Express shown; any framework works.
import express from 'express';
import { narro } from './narro-client.mjs';

const WIDGETS = ['enter_portal', 'my_cohort', 'module_materials', 'submit_deliverable', 'tier_a_this_week', 'ask', 'intro_request'];
const app = express();

app.get('/narro/widget-token/:widget', async (req, res) => {
  const widget = req.params.widget;
  if (!WIDGETS.includes(widget)) return res.status(404).end();
  const founderRef = await founderRefFor(req); // your own session lookup: the fdr_ reference from your roster, or null when signed out
  const body = { schema_version: 'standard.v1', widget, origin: 'https://<your-site-origin>' };
  if (founderRef) body.founder_id = founderRef; // omit for an anonymous token (enter_portal only)
  try {
    const minted = await narro('POST', '/widget-tokens', body);
    res.set('Cache-Control', 'no-store').json({ token: minted.token }); // valid for at most 10 minutes
  } catch (error) {
    res.status(502).json({ error: 'widget_unavailable' });
  }
});

async function founderRefFor(req) {
  return req.session && req.session.narroFounderRef ? req.session.narroFounderRef : null;
}

app.listen(3000);
  • origin must be exactly the origin of the page that embeds the widget, with no wildcard, and it must be one of the origins registered for your key. A key with no allowed origins cannot mint widget tokens.
  • Leave out founder_id only for an anonymous token. Only enter_portal accepts one.
  • A founder who has not signed in to Narro yet has no account, and the mint fails with account_unresolved. Show the Enter portal widget first.
  • The mint is a signed write and needs an Idempotency-Key. See Authentication. The response is not cached, so a retry gets a fresh token.
  • The token request accepts an optional config object. It does not change how a widget looks today. Set the theme in the Hub.

Theming

You set these in the Hub, under the design settings of a widget, per key or per widget. Nothing else about the widget can be changed from your side.

SettingRule
Display nameShort plain text. It is escaped, never treated as markup.
LogoAn https image URL on a host Narro allows: your registered origins, or a host Narro has approved for logos.
Primary and secondary colorHex, like #1A2B3C. Each must reach a 4.5 to 1 contrast ratio against the widget background, or Narro uses its default for that color and the Hub warns you.
Color schemeLight, dark or auto. Auto follows the visitor's setting. Each scheme is checked on its own background.
The footer is fixedEvery widget shows the footer Powered by Narro Ventures. It cannot be hidden, restyled or replaced. No theme setting reaches it.

CSP and allowed origins

If your pages send a Content Security Policy, allow the widget host to load the loader, to be framed, and to answer the loader's availability check:

Content-Security-Policy: default-src 'self';
  script-src 'self' https://<your-widget-host>;
  frame-src https://<your-widget-host>;
  connect-src 'self' https://<your-widget-host>

Your own token URL must also be allowed by connect-src. The widget needs no cookies of yours, no third-party script and no inline script on your page.

Allowed origins

  • Narro sends a frame-ancestors policy with the origins registered for your key. A widget does not render on a page whose origin is not registered. It shows the neutral unavailable state.
  • An origin is a scheme, host and optional port, with no path. Production origins use https. One wildcard label is allowed, as in https://*.example.com. Plain http is allowed only for localhost, in staging.
  • Your page keeps its own referrer policy. The loader sets referrerpolicy="origin" on the iframe so Narro can check the embedding origin.
  • Narro sets the iframe's sandbox attribute. Do not add attributes that change it.
  • To add or change an origin, ask Narro. See Key scoping.

Messages to your page

The widget talks to your page with postMessage, always to your page's exact origin and never to a wildcard. Each message is an object with narro: 1 and a type. There are three types, and none carries data.

TypeFieldsMeaning
readyNoneThe widget finished loading. The loader replies with an ack.
resizeheightThe widget content height in pixels. The loader sizes the iframe between 60 and 4000.
navigatetargetreload asks the loader to fetch a new token and remount. portal asks it to open your data-portal-url in a new tab, when you set one.

No token, no founder detail and no content ever travels over postMessage. The Narro loader handles all three types. If you handle them yourself, check three things before you act:

// Only needed if you handle the widget messages yourself. The Narro loader already does this.
const WIDGET_ORIGIN = 'https://<your-widget-host>';
const frame = document.querySelector('iframe[title^="Narro"]');

window.addEventListener('message', (event) => {
  if (event.origin !== WIDGET_ORIGIN) return; // wrong sender
  if (!frame || event.source !== frame.contentWindow) return; // not your widget frame
  const message = event.data;
  if (!message || message.narro !== 1) return; // not a Narro message
  if (message.type === 'resize' && typeof message.height === 'number') {
    frame.setAttribute('height', String(Math.min(4000, Math.max(60, Math.ceil(message.height)))));
  } else if (message.type === 'ready') {
    // optional: the loader answers with { narro: 1, type: 'ack' }
  } else if (message.type === 'navigate') {
    // message.target is 'reload' (mint a new token and remount) or 'portal' (open your portal link)
  }
});
  • event.origin equals the widget host origin.
  • event.source is the window of your own widget iframe.
  • data.narro === 1. Ignore everything else.

The widgets

Widget idShowsCredential
enter_portalEnter portal. A status card and a button into the Narro-hosted portal. An anonymous token is for the signed-out state.Anonymous or founder
my_cohortMy cohort. Cohort name, dates, the module schedule and the member count.Founder
module_materialsModule materials. The materials of a module, with links that expire.Founder
submit_deliverableSubmit deliverable. Upload and status for the open module.Founder
tier_a_this_weekTop matches this week. A few masked investor matches with the reason each was matched and an intro button.Founder
askAsk. A free-text question with results and an explanation.Founder
intro_requestRequest warm intro. A request button and a status chip for one target. Needs data-target-ref.Founder

Some widgets are released in phases for a program. A widget that is not available yet shows a neutral gated state, not an error. Each widget calls only the routes below.

Widget idRoutes it may call
enter_portal
GET /me/account
GET /cohorts/{id}
my_cohort
GET /cohorts/{id}
GET /modules
module_materials
GET /modules
GET /modules/{id}/materials
submit_deliverable
GET /deliverables/{id}
GET /modules/{id}/deliverables
POST /modules/{id}/deliverables
GET /modules
tier_a_this_week
GET /me/customers
GET /me/customers/{ref}
GET /me/investors
GET /me/investors/{ref}
GET /me/intros
POST /me/intros
GET /me/intros/{id}
POST /me/intros/{id}:withdraw
GET /me/matches/investors
GET /me/targets/customers
GET /me/statuses
ask
GET /founders/{ref}/queries
POST /founders/{ref}/queries
GET /founders/{ref}/queries/{query_ref}
POST /founders/{ref}/queries/{query_ref}:cancel
POST /founders/{ref}/queries/{query_ref}:regenerate
POST /founders/{ref}/queries/{query_ref}:retry
POST /founders/{ref}/voice-sessions
POST /founders/{ref}/query
POST /founders/{ref}/query/{id}/feedback
intro_request
GET /me/intros
POST /me/intros
GET /me/intros/{id}
POST /me/intros/{id}:withdraw
GET /me/statuses

The warm intro request widget is a button and a status chip for one target. The founder writes a note and chooses what they are asking for. Narro decides whether a warm introduction is available or the request becomes a path request, and Narro runs the introduction. You can follow it with the intro.requested and intro.status_changed webhooks. See Webhooks.

Kill switch

Narro can switch off one widget, all of your widgets, or all widgets everywhere. The loader checks availability before it mounts anything, and a mounted widget rechecks about every 30 seconds. A change shows within about a minute.

  • Switched off, the widget shows a neutral message that it is temporarily unavailable, and your data-fallback text if you set one.
  • The message never says why. A switch, a suspended connection, a revoked key and an expired session all look the same.
  • While a widget is off, minting a token for it fails with service_unavailable. Wait for Retry-After.
  • Design your page so a missing widget leaves a usable page. Do not retry in a tight loop.

Accessibility and language

  • The iframe has a title. Set data-title to something that fits your page.
  • Loading, empty, error and unavailable states are announced: loading as a polite status, errors as alerts.
  • Theme colors that do not reach a 4.5 to 1 contrast ratio are replaced, so your brand colors cannot make text unreadable.
  • Languages are English (Canada), French and Spanish, set with data-locale. English is the fallback.

What a widget never does

  • It never shows an investor's or a customer's email address or phone number.
  • It never contacts anyone by itself. Introductions are requested by the founder and run by Narro. The investor decides whether to accept.
  • It never sends a token, a founder detail or content to your page.
  • It never reads cookies or storage of your site. It runs on its own host.
PreviousObjects and error codesNextVersioning

Home · Sign in

On this page

How it worksInstallMarkup attributesMint tokens from your backendThemingCSP and allowed originsMessages to your pageThe widgetsKill switchAccessibility and languageWhat a widget never does