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): void

Open 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

FieldTypeNotes
namestringRequired when passing config. Identifier for this form.
type'general' | 'feature' | 'other'Categorizes the feedback in the inbox.
titlestringForm heading.
descriptionstringSubheading.
ratingfalse | 'stars' | 'thumbs' | 'nps' | 'emoji' | 'number'Default 'stars'. Set false to skip the rating step.
commentbooleanShow a free-text comment field.
attachmentsbooleanAllow file uploads.
attachTypesstring[]MIME-type filter, e.g. ['image/*', 'application/pdf'].
identity'none' | 'email' | 'full' | 'both'What to collect. 'both' = name + email.
themeThemePer-open theme override.

Close the widget

Chirp.feedback.close(): void
Chirp.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

FieldTypeNotes
namestringIdentifier for the form.
type'global' | 'general' | 'feature' | 'other'Category.
ratingnumberNumeric value (1–5 for stars, 0–10 for NPS, etc.).
ratingStyle'stars' | 'thumbs' | 'nps' | 'emoji' | 'number'Must match the rating range.
feedbackstringThe comment text.
commentstringAlias for feedback — accepted by the API for backward compatibility.
emailstringOverrides the email from Chirp.identify.
fullNamestringRespondent name.
categorystringCustom category tag.
attachmentsArray<{ key?: string; url?: string }>Files to attach. Provide a hosted URL or a pre-uploaded storage key.
metadataRecord<string, unknown>Anything else you want to attach.
additionalDataRecord<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

On this page