SDK
Feedback widget
Open the in-app feedback form or submit feedback programmatically.
The feedback widget collects unstructured user feedback — rating, comment, attachments, and optional identity. You can open it from a button, trigger it from your code, or submit feedback headlessly without a UI.
Open the widget
Chirp.feedback.open(config?: FeedbackInlineConfig): voidOpen the global default
If you've configured a default feedback form in Settings → Feedback widget, just call:
Chirp.feedback.open();Open a named inline form
For different feedback contexts (e.g. "Report a bug" vs "Suggest a feature"), pass a config:
Chirp.feedback.open({
name: "feature_request",
type: "feature",
title: "What would make ChirpBack better?",
rating: "stars",
comment: true,
identity: "email",
});Config options
| Field | Type | Notes |
|---|---|---|
name | string | Required when passing config. Identifier for this form. |
type | 'general' | 'feature' | 'other' | Categorizes the feedback in the inbox. |
title | string | Form heading. |
description | string | Subheading. |
rating | false | 'stars' | 'thumbs' | 'nps' | 'emoji' | 'number' | Default 'stars'. Set false to skip the rating step. |
comment | boolean | Show a free-text comment field. |
attachments | boolean | Allow file uploads. |
attachTypes | string[] | MIME-type filter, e.g. ['image/*', 'application/pdf']. |
identity | 'none' | 'email' | 'full' | 'both' | What to collect. 'both' = name + email. |
theme | Theme | Per-open theme override. |
Close the widget
Chirp.feedback.close(): voidChirp.feedback.close();Submit feedback programmatically
If you want to send feedback without showing the widget (e.g. you have your own UI, or you're forwarding from Slack/Typeform), use submit:
Chirp.feedback.submit(payload: FeedbackSubmitPayload): Promise<boolean>const ok = await Chirp.feedback.submit({
name: "post_signup",
type: "general",
rating: 5,
ratingStyle: "stars",
feedback: "Onboarding was a breeze!",
email: "jane@acme.io",
});
if (!ok) console.error("Submission failed");Payload fields
| Field | Type | Notes |
|---|---|---|
name | string | Identifier for the form. |
type | 'global' | 'general' | 'feature' | 'other' | Category. |
rating | number | Numeric value (1–5 for stars, 0–10 for NPS, etc.). |
ratingStyle | 'stars' | 'thumbs' | 'nps' | 'emoji' | 'number' | Must match the rating range. |
feedback | string | The comment text. |
comment | string | Alias for feedback — accepted by the API for backward compatibility. |
email | string | Overrides the email from Chirp.identify. |
fullName | string | Respondent name. |
category | string | Custom category tag. |
attachments | Array<{ key?: string; url?: string }> | Files to attach. Provide a hosted URL or a pre-uploaded storage key. |
metadata | Record<string, unknown> | Anything else you want to attach. |
additionalData | Record<string, unknown> | Extra traits about the respondent. Merged with their identify traits server-side. |
Email is required — either passed in the payload or set previously via
Chirp.identify. Submissions without an email throw.
Common patterns
A "Feedback" button in your navbar
<button onClick={() => Chirp.feedback.open()}>Feedback</button>Forward feedback from a third-party form
// You collected feedback in your own form
async function handleSubmit(form: FormData) {
const ok = await Chirp.feedback.submit({
name: "marketing_form",
rating: Number(form.get("rating")),
ratingStyle: "stars",
feedback: String(form.get("comment")),
email: String(form.get("email")),
});
if (!ok) showErrorToast();
}Next steps
- Events —
feedback:shown,submitted,dismissed - Feedback boards (product guide)