Quickstart
Create an App, list surveys, and verify a webhook in about fifteen minutes.
You need a FeedByte organization and permission to open Developers → Apps in the dashboard.
1. Create an App
- Open feedbyte.io and switch to the organization you want to integrate.
- Go to Developers → Apps → New.
- Name the App (for example
branch-crm) and save.
Copy three values. They are shown once:
fb_live_4e8c… # secret API key
fb_pk_live_9a1b… # publishable key for @feedbyte/js
whsec_8f2d… # webhook signing secretUse fb_test_ / fb_pk_test_ keys against test mode. Never put a secret key in a browser or a mobile app.
2. List surveys
pnpm add @feedbyte/nodeimport { FeedByte } from "@feedbyte/node";
const feedbyte = new FeedByte("fb_live_4e8c…");
const surveys = await feedbyte.surveys.list({ status: "active" });
console.log(surveys.items.map((s) => `${s.id} ${s.name}`));The client talks to https://api.feedbyte.io. Other languages send the same JSON over HTTPS with a bearer token.
3. Receive response.submitted
Expose POST /webhooks/feedbyte on a public HTTPS URL. Register that URL on the App, then verify every request with the webhook secret.
import { FeedByte } from "@feedbyte/node";
import { createServer } from "node:http";
const feedbyte = new FeedByte("fb_live_4e8c…");
createServer(async (req, res) => {
if (req.url !== "/webhooks/feedbyte" || req.method !== "POST") {
res.writeHead(404);
res.end();
return;
}
const chunks: Buffer[] = [];
for await (const chunk of req) chunks.push(chunk as Buffer);
const rawBody = Buffer.concat(chunks).toString("utf8");
const signature = req.headers["feedbyte-signature"];
const event = feedbyte.webhooks.constructEvent(
rawBody,
Array.isArray(signature) ? signature[0] : signature,
"whsec_8f2d…",
);
if (event.type === "response.submitted") {
console.log(event.data.responseId, event.data.metadata);
}
res.writeHead(200);
res.end("ok");
}).listen(8787);Return 2xx quickly. Do the real work asynchronously. Replay protection and retries are in Webhooks. The event catalog is in Events.