Widget SDK reference

The Sey client is exposed as window.sey. It is loaded from https://cdn.sey.so/client.js and auto-initializes when the script has a data-workspace-id attribute.

See Install the widget for setup. This reference covers the methods available once the client is loaded.

Methods

`init({ workspaceId, apiBaseUrl? })`

Initializes a session for the workspace and fetches branding. Required only when the script is loaded without a data-workspace-id attribute.

await window.sey.init({ workspaceId: 'your_workspace_id' });

`mountWidget({ position? })`

Mounts the launcher button widget. position is one of top-left, top-right, bottom-left, or bottom-right (default bottom-right). Returns a controller for managing the launcher, or undefined if the widget could not mount.

const widget = await window.sey.mountWidget({ position: 'bottom-right' });

widget?.open();
widget?.close();
widget?.toggle();
await widget?.destroy();

`showWidget({ anchor?, page?, position? })`

Opens the widget as a popover anchored to an element, without a launcher. If anchor is omitted, Sey chooses the side with the most available space. page sets the first view.

await window.sey.showWidget({
	anchor: document.querySelector('#feedback-button'),
	page: 'feedback'
});

`identify(options | null)`

Associates widget activity with a participant. Pass null to reset the identity when the user signs out.

Profile mode:

await window.sey.identify({
	id: currentUser.id,
	email: currentUser.email,
	name: currentUser.name,
	image: currentUser.avatarUrl
});

Signed-token mode:

await window.sey.identify({ token: signedJwt });

See Identity tokens for the token format. Profile id must be your stable database ID, not an email address.

`createPortalSession(redirectTo?)`

Returns a single sign-on URL that opens the public portal for the same workspace and identity. redirectTo is a portal path such as /feedback/request-id.

const url = await window.sey.createPortalSession('/feedback/abc123');

Opens the public portal in a new tab via SSO. Convenience wrapper around createPortalSession().

await window.sey.navigateToPortal();
await window.sey.navigateToPortal('/feedback/request-id');

Widget pages

The page option accepts: home, feedback, compose, roadmap, and changelog.

Auto-trigger elements

Any element with a data-sey-feedback attribute opens the widget at that anchor, without requiring JavaScript.

<button data-sey-feedback>Open feedback</button>

Additional attributes:

  • data-sey-page sets the first view (home, feedback, compose, roadmap, changelog).
  • data-sey-position overrides the side (top-left, top-right, bottom-left, bottom-right).
<button data-sey-feedback data-sey-page="compose">Give feedback</button>

Anonymous fallback

If identify() is never called, Sey generates a persistent anonymous participant ID in localStorage and uses it for voting and commenting. Verifying the identity later (via the portal or a signed token) claims that anonymous activity into the verified participant.

Next

Ready when you are

Build with your users, not around them.

Collect feedback, share what is next, and close the loop from one calm, connected place.

*No credit card required.