MainSDK
Search⌘K
Integrations

Zendesk

Use Zendesk for MainSDK feedback and support tickets - API credentials, main.yaml, opening reports and tickets, local testing and swapping.

1 interface1 driverWritten guide
Updated 2026-10-28

Zendesk is one of the drivers behind feedback. Your app calls feedback.open() for a "Report a problem" button and support.ticket() to open a ticket, and the report arrives as a Zendesk ticket with the trace, app version, device and steps attached. Pick Zendesk when your support team already works tickets there; the product requirements name it as one of the trackers reports should reach.

Interfaces it serves

Pick Zendesk in main.yaml for any of these. Your calls stay the same, and you can swap later.

Before you start

You need a Zendesk account with Zendesk Support.

  1. Note your subdomain. Your account lives at a Zendesk subdomain, and the API is reached through it.
  2. Create API credentials. In the admin area, under the API settings for apps and integrations, enable API access and create an API token (or an OAuth client if your policy requires one). Use a dedicated agent account for the integration so its actions are easy to tell apart in Zendesk's audit.
  3. Route the tickets. Decide which group, brand or form receives tickets from your app, and set up any triggers that should act on them.

Store the credentials in your secrets manager, never in code or a committed env file.

Configure

main.yaml
feedback:
  driver: zendesk
  # [to be decided] key names; the token goes in as secret:ZENDESK_API_TOKEN (suggested name)

Provider keys go in as secret:NAME references; a literal key fails mainsdk check with MAIN-CONFIG-0004. The key names for the subdomain and credentials are not decided yet.

Use it

app/checkout/pay.ts
"use client";
import { feedback } from "mainsdk";

export async function payOrReport(user: { id: string }, pay: () => Promise<void>) {
  try {
    await pay();
  } catch (err) {
    feedback.open({ for: user, context: { screen: "checkout", action: "pay" } });
    throw err;
  }
}

support.ticket() opens a Zendesk ticket with the same trace and version attached. Its arguments arrive with the spec.

Local development and testing

  • No Zendesk account: use the built-in driver in a development overlay.
  • Zendesk sandbox: if your plan includes a sandbox, point stage at it with its own credentials so test tickets stay out of your live queue.
  • Tests: createTestApp() from @mainsdk/testing runs feedback on an in-memory fake, so tests open no real tickets, and chaos.on("feedback", { outage: true }) simulates Zendesk being down.
main.env.dev.yaml
feedback:
  driver: builtin

What MainSDK adds on top

  • Screenshots redacted before they leave the device.
  • Support access to a user's data audited.
  • Every ticket carries the trace, version, device and steps, so you see what failed without asking the user.
  • Replies go back to the customer through notify.

See Feedback and support for the full contract.

Limits and notes

  • Planned driver, not in a spec yet: feedback is phase 2.
  • Tickets carry personal data. Check Zendesk's data hosting options against where your users' data must stay (MainSDK regions are US, EU and India).
  • Capturing reports is free. MainSDK Cloud Teams adds inbox history and triage of reports.

Swap to or from it

main.yaml
feedback:
  driver: zendesk   # was builtin

Your feedback.open() and support.ticket() calls stay the same. Past tickets stay in the old tool; MainSDK does not move them.

FAQ

Will reports create new Zendesk users? How the driver matches a reporter to a Zendesk requester is not specified yet.

Can I use Zendesk for tickets and something else for reports? Not yet: feedback takes one driver.

Next

Open questions

Was this page helpful?

↑↓ moveEnter openEsc close

Not decided yet