OwlMetry
SDKsNode.js SDK

User Feedback

Forward free-text user feedback from your own frontend to OwlMetry.

The Node SDK can forward user feedback to OwlMetry so it lands in the dashboard's feedback tracker alongside feedback captured by the Swift SDK. Use this when your users submit feedback through your own UI — a web form, a chat widget, a support page — and your Node server acts as the bridge.

See the Feedback concept page for the status lifecycle, comments, and how to work with feedback once it's captured.

Forwarding Feedback

import { Owl } from "@owlmetry/node";

const receipt = await Owl.sendFeedback("The dashboard was really helpful", {
    name: "Jane Doe",
    email: "[email protected]",
    userId: "user_123",
});

console.log(receipt.id);        // uuid of the new feedback row
console.log(receipt.createdAt); // ISO-8601 timestamp

Unlike the logging methods, sendFeedback is not fire-and-forget — it awaits the server response and throws on failure. Wrap calls in try/catch so you can report a useful error back to the user.

Express Example

import express from "express";
import { Owl } from "@owlmetry/node";

const app = express();
app.use(express.json());

app.post("/api/feedback", async (req, res) => {
    try {
        const receipt = await Owl.sendFeedback(req.body.message, {
            name: req.body.name,
            email: req.body.email,
            userId: req.auth?.userId,
            sessionId: req.headers["x-owl-session-id"] as string | undefined,
        });
        res.json({ id: receipt.id });
    } catch (err) {
        res.status(400).json({ error: (err as Error).message });
    }
});

Using a Scoped Logger

A scoped instance auto-fills user_id and session_id so a single request handler can log and send feedback without repeating IDs:

const owl = Owl.withUser(userId).withSession(req.headers["x-owl-session-id"]);
owl.info("feedback form submitted");
await owl.sendFeedback(message, { email });

Pass any option explicitly in the second argument to override what the scope provides.

Options

OptionDefaultNotes
nameSubmitter name. Trimmed, max 255 chars server-side.
emailSubmitter email. Validated server-side.
userIdscope's userIdAttach to an end-user in the project.
sessionIdscope's sessionIdUUID — links feedback to the event timeline for that session. Non-UUIDs are silently ignored.
bundleIdOnly needed when forwarding for a mobile frontend whose OwlMetry app has a bundle_id set.
environment"backend"Must be allowed for the API key's app platform.
appVersionconfig.appVersion
deviceModelPass-through when forwarding from a mobile frontend.
osVersionPass-through when forwarding from a mobile frontend.
isDevconfig.isDevRoutes feedback into the dashboard's dev bucket.

Limits

  • message is required, trimmed, and capped at 4000 characters (enforced server-side).
  • The server rejects invalid emails and environments that don't match the API key's app platform — those come back as thrown errors with the server's reason in the message.

Ready to get started?

Connect your agent via MCP or CLI and start tracking.