Read Refiner NPS and CSAT survey responses and reports, manage surveys, contacts and segments, and push user traits and events from a workflow.
Refiner ships in the w6w first-party pack. It declares 19 actions, 3 health checks, and the host runs its code in a sandbox that never sees the credential.
io.w6w.refinerRefiner is an in-product survey tool for NPS, CSAT and product-feedback surveys shown inside a web or mobile app, or sent as a link. This app lets a workflow close the loop around those surveys.
On the way out, it reads survey responses (filtered by survey, date range, segment, tag, answer or user trait, with cursor pagination for large sets) and pulls aggregated NPS, CSAT, rating, distribution and view/response-count reports. On the way in, it identifies users and attaches traits, tracks events that trigger surveys, stores responses collected somewhere else, tags responses, and adds or removes users from manual segments.
It also manages the surveys themselves: list, publish or unpublish, duplicate, archive and read a survey’s change history. Contacts can be listed, fetched and deleted for compliance. Health checks read the account’s monthly tracked-user, page-view and survey-response usage against the plan limits.
Three routes to the same 19 actions. The Workflow tab is generated from Refiner's own manifest and carries its real ids, so it is copy-pasteable; the Code and CLI examples are the same call for any action on any app, so every app-specific value in them is a blank you fill in.
account-get Fetch the subscription plan, monthly usage (tracked users, events, page views, survey responses) against plan limits, and the account's environments.
contact-delete Delete a contact AND all of its survey responses. To erase personal data but keep the responses, overwrite the traits with empty values using Identify User instead.
contact-get Fetch everything Refiner holds for one contact: attributes (traits merged with survey answers), segments and account. Give one of user id, email or Refiner uuid.
contact-identify Create or update a contact and its traits (the backend twin of the JavaScript client's identify). Calls with the same user id update the existing contact. Optionally group the user under an account.
contact-list List contacts with their attributes, segments and account. For more than ~10,000 rows, page with the cursor from `pagination.next_page_cursor` instead of page numbers.
event-track Record a named event for a user, which Refiner can use to trigger surveys. A user that does not exist yet is created.
form-history List the previous versions of a survey. Each entry carries a full snapshot of its configuration and questions.
form-publish Publish an existing survey, or unpublish it by turning Published off.
project-get Return the Refiner environment (project) this API key belongs to — a quick way to confirm which of Production, Testing, … a connection points at.
report-get Aggregated survey results like the Reporting dashboards: NPS, CSAT, rating average, value distribution, or view/response counts. Defaults to the last seven days.
response-list List survey responses newest first, with the answers (`data`), the survey and the contact who answered. Filter by survey, segment, tag, date range, answers or traits. For more than ~10,000 rows, page with the cursor from `pagination.next_page_cursor`.
response-store Record a survey response for a user — historical data, or answers collected in your own UI. The survey must already exist (it can be an empty, unpublished container). Use the survey's question identifiers as the keys of Answers so reports pick them up.
segment-add-contact Add a user to a manual segment. A user that does not exist yet is created.
segment-list List user segments ordered by name. `is_manual` marks the ones you can add users to.
A workflow step names the app and the action, and the editor fills in the
connection when you pick one. This is the Step shape from the
workflow spec, carrying Refiner's real ids.
{
"manifestVersion": "2",
"name": "refiner-example",
"steps": [
{
"id": "event-track",
"uses": {
"app": "io.w6w.refiner",
"action": "event-track",
"connection": "conn_YOUR_CONNECTION_ID"
},
"with": {
"event": "<event>"
}
}
]
}event-track account-get contact-get contact-identify contact-list +14 more actions available
Every app-specific value here is a blank you have to fill in. An
app action is reached through the connection that authenticates it, so the
address is a connection id, not the app id — and connections belong to your account,
so a public page cannot know yours. Create one for Refiner, then fill in
the three blanks: conn_YOUR_CONNECTION_ID, the action key, and the
parameters that action declares. The call itself is real — the shape is transcribed
from the studio's own snippet builder, which prints the same kind of blanks — but
nothing in it is specific to Refiner. The Workflow tab is where this app's
real ids are.
npm install @w6w/sdkyarn add @w6w/sdkpnpm add @w6w/sdkdeno add npm:@w6w/sdkimport { W6wClient, isActionRun } from "@w6w/sdk";
// Reads W6W_BASE_URL and W6W_TOKEN from the environment when omitted.
const client = new W6wClient();
const envelope = await client.run({
urn: "conn_YOUR_CONNECTION_ID",
action: "event-track",
payload: {
// id: "<value>",
// email: "<value>",
event: "<value>",
},
});
if (isActionRun(envelope)) console.log(envelope.value); npm install -g @w6w/cli w6w run conn_YOUR_CONNECTION_ID --action event-track --payload '{"event":"<value>"}' Give an AI agent Refiner — without giving it Refiner's credentials. One MCP endpoint exposes every app, function and workflow the caller is entitled to, as tools it can discover and run. Access is granted per team while we onboard.
One tool call{
"name": "w6w_invoke",
"arguments": {
"ref": "app:io.w6w.refiner#event-track",
"input": {
"event": "<event>"
}
}
}
Every tool names its target with a single ref. The
app: form above doesn't name a connection at all — the
host resolves which of the caller's Refiner connections to sign
with, and refuses rather than guesses when the answer is ambiguous.
The token is attached host-side, at the moment of the call. It is never a tool argument, never in the model's context, and never in a transcript — so a prompt injection has nothing to exfiltrate.
Tools are derived per end user from what that person has actually connected and is entitled to — not one shared bot identity carrying the union of everyone's access.
Multi-step work runs on the workflow engine and returns a run handle the agent can poll — retries, branching and state survive the conversation that started them.
Refiner's declared health checks are on the surface too, so an agent can tell "the vendor is down" from "your credential expired" before it burns a retry on either.
The MCP surface is part of the hosted platform. Refiner itself is MIT, and the runtime that executes it is source-available (FSL).
Refiner declares its own checks, so its health is a property of the app rather than something the host guesses at.
Calls GET /v1/ and reads Refiner's own auth answer. Any schema-correct answer, including its three key-refusal messages, proves the API is serving.
No machine-readable status surface: status.refiner.io is a real Hyperping page with no JSON or feed route.
Monthly tracked users, page views and survey responses against the plan ceilings, read from GET /v1/account.