FeedByte

SDKs

Capture in the browser with @feedbyte/js. Call the API and verify webhooks with @feedbyte/node.

Two packages, one product. TypeScript is the first-class language. Other runtimes call https://api.feedbyte.io over HTTPS with a bearer token.

Capture SDK — @feedbyte/js

For browsers and mobile web views. This is how a mobile banking app or a website opens a FeedByte survey without building the questionnaire.

import { FeedByte } from "@feedbyte/js";

FeedByte.init({ publicKey: "fb_pk_live_9a1b…" });

FeedByte.openSurvey({
  surveyId: "survey_1N…",
  stationId: "station_2K…",
  lang: "am",
});

FeedByte.openSurvey({ linkId: "link_8f…" });

FeedByte.embed("#feedback", {
  surveyId: "survey_1N…",
  stationId: "station_2K…",
  embed: true,
});

openSurvey presents the survey in a modal or full screen. embed mounts it into a DOM node. Both resolve to a public capture URL:

https://feedbyte.io/s/{surveyId}?station={stationId}&embed=1&lang=am
https://feedbyte.io/l/{linkId}

Pass linkId when you created a Capture link so partner metadata stays bound to this interaction. Native apps that cannot load JavaScript should open that URL directly. Query parameters for generic /s/{id} URLs are documented under Capture.

Server SDK — @feedbyte/node

For backends. Typed client plus webhook verification.

import { FeedByte } from "@feedbyte/node";

const feedbyte = new FeedByte("fb_live_4e8c…");

const survey = await feedbyte.surveys.get("survey_1N…");
const { items } = await feedbyte.responses.list({
  surveyId: survey.id,
  status: "completed",
});

const link = await feedbyte.links.create({
  surveyId: survey.id,
  metadata: { callId: "c-8841" },
});

const event = feedbyte.webhooks.constructEvent(
  rawBody,
  signatureHeader,
  "whsec_8f2d…",
);

constructEvent throws if the HMAC does not match or the timestamp is skewed by more than five minutes. See Webhooks.

HTTP

Without the SDK, send JSON to https://api.feedbyte.io with a secret key:

const res = await fetch("https://api.feedbyte.io/v1/surveys", {
  method: "POST",
  headers: {
    Authorization: "Bearer fb_live_4e8c…",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ status: "active" }),
});

Resource names match the API reference.

On this page