FeedByte

Capture links

Create a unique survey URL with partner metadata and read it back on the response.

A Capture link is a unique, time-bound survey URL stamped with metadata you already know — a call id, a ticket, an agent. Create one from your backend when the interaction starts. When the respondent submits, that metadata is copied onto the Response and comes back on the webhook and on responses.get.

Use this when a generic /s/{surveyId} is not enough: a call-center wrap-up, a CRM ticket, a support chat that must round-trip an external id.

Create

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

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

const link = await feedbyte.links.create({
  surveyId: "survey_1N…",
  stationId: "station_2K…",
  locationId: "loc_4B…",
  expiresIn: 86400,
  metadata: {
    callId: "c-8841",
    agentId: "agt_12",
    queue: "retention",
  },
});

link.id; // "link_8f…"
link.url; // "https://feedbyte.io/l/link_8f…"
link.metadata; // { callId, agentId, queue }
link.expiresAt; // ISO timestamp

stationId and locationId are optional. When set, they are written onto the response the same way query params are on a direct link. expiresIn is seconds from now; the default is 24 hours.

The public URL is always /l/{linkId}. Do not put metadata in the query string — the respondent (and anyone who copies the URL) would see it, and it would not be trusted on submit.

Fetch a link later with feedbyte.links.get(link.id).

Share

Send link.url to the customer: SMS, email, an IVR prompt, a chat bubble.

In a web view that already has the Capture SDK:

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

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

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

openSurvey({ linkId }) opens https://feedbyte.io/l/{linkId}. Pass linkId instead of surveyId so the metadata stays bound to this call.

The URL is reusable until expiresAt, so a customer can refresh mid-call. After expiry the page is dead (NOT_FOUND).

Metadata

metadata is a JSON object with string keys and JSON-serializable values. FeedByte copies it onto the response at submit. The browser cannot change partner keys.

RuleDetail
SizeAt most 4 KB. Over that, links.create throws BAD_REQUEST.
SecretsDo not store API keys, tokens, or passwords. Metadata is returned on the response and in webhooks.
Shape at submitPartner keys stay at the top level. Browser telemetry (user agent, locale, screen) is nested under client.
{
  "callId": "c-8841",
  "agentId": "agt_12",
  "queue": "retention",
  "client": {
    "userAgent": "Mozilla/5.0 …",
    "locale": "en",
    "screen": { "width": 390, "height": 844 }
  }
}

Read it back

Webhook

response.submitted includes linkId and metadata when the respondent used a Capture link.

if (event.type === "response.submitted") {
  const { responseId, linkId, metadata } = event.data;
  await crm.attachFeedback(metadata.callId, responseId);
}

The payload shape is in Events.

API

const response = await feedbyte.responses.get("res_91…");

response.linkId; // "link_8f…"
response.metadata.callId; // "c-8841"

const { items } = await feedbyte.responses.list({
  surveyId: "survey_1N…",
  limit: 50,
});
// each item has metadata and linkId

responses.export includes a metadata column (JSON). Call-center and CRM Apps typically listen to the webhook and use callId as the join key; responses.get is the fallback when you need the full record.

Call-center flow

  1. The agent starts a call in your telephony or CRM. You already have callId and agentId.
  2. Your backend calls feedbyte.links.create with that metadata and a station for the queue.
  3. You send link.url to the customer, or open it in an agent assist web view with openSurvey({ linkId }).
  4. The customer submits. FeedByte POSTs response.submitted with the same metadata.
  5. Your webhook writes the feedback onto the call record using metadata.callId.

On this page