Tenant admin
What an app builder does with the management API, on the demo’s own tenant. The server reads it with a read-only org API key that never reaches your browser, so nothing here can be changed.
https://demo.synq.build/api/webhooks/synq: * (on)
Verified deliveries
user.createdat 2026-11-19T18:40:02.085Zbrand.deletedat 2026-11-19T00:31:56.770Zapi_key.revokedat 2026-11-19T00:31:22.305Zfile.uploadedat 2026-11-19T00:22:32.020Zfile.uploadedat 2026-11-19T00:22:28.507Zapp.createdat 2026-11-19T00:22:24.486Zfile.uploadedat 2026-11-19T00:22:22.136Zfile.uploadedat 2026-11-19T00:22:18.260Zapp.createdat 2026-11-19T00:22:14.431Zfile.uploadedat 2026-11-19T00:22:09.630Zapp.createdat 2026-11-19T00:22:04.571Zbrand.updatedat 2026-11-19T00:22:03.840Zbrand.updatedat 2026-11-19T00:22:02.910Zfile.uploadedat 2026-11-19T00:21:59.104Zfile.uploadedat 2026-11-19T00:21:57.643Zbrand.createdat 2026-11-19T00:21:55.232Zbrand.updatedat 2026-11-19T00:21:54.618Zbrand.updatedat 2026-11-19T00:21:54.196Zbrand.updatedat 2026-11-19T00:21:53.589Zfile.uploadedat 2026-11-19T00:21:52.347Zbrand.updatedat 2026-11-19T00:21:50.287Zapp.createdat 2026-11-19T00:21:49.809Zfile.uploadedat 2026-11-19T00:21:49.440Zfile.uploadedat 2026-11-19T00:21:47.998Zbrand.createdat 2026-11-19T00:21:45.301Zbrand.updatedat 2026-11-19T00:21:44.725Zbrand.updatedat 2026-11-19T00:21:44.105Zbrand.updatedat 2026-11-19T00:21:43.625Zfile.uploadedat 2026-11-19T00:21:41.276Zfile.uploadedat 2026-11-19T00:21:39.769Zbrand.updatedat 2026-11-19T00:21:36.066Ztoken_gate.updatedat 2026-11-19T00:21:35.720Zapp.createdat 2026-11-19T00:21:35.024Zapp.createdat 2026-11-18T17:24:29.403Zbrand.createdat 2026-11-18T17:24:28.380Zapp.createdat 2026-11-18T17:24:27.024Zbrand.updatedat 2026-11-18T17:24:25.877Zapi_key.rotatedat 2026-11-18T17:18:16.188Z
src/examples/admin/Webhooks.tsximport { recentDeliveries } from '../../lib/deliveries'
import { demoOrg } from '../../lib/management'
// The org's webhook subscriptions, and the deliveries the demo's own
// receiver (src/examples/webhooks/receiver.ts) verified and kept.
export async function Webhooks() {
const tenant = await demoOrg()
if (!tenant) return <p>The demo tenant isn’t set up.</p>
const { data } = await tenant.synq.get('/v1/orgs/{org}/webhooks', {
path: { org: tenant.org.id },
})
const deliveries = recentDeliveries()
return (
<>
<ul aria-label="Subscriptions">
{data.map((hook) => (
<li key={hook.id}>
<code>{hook.url}</code>: {hook.events.join(', ')} ({hook.enabled ? 'on' : 'off'})
</li>
))}
</ul>
<h2 className="mt-6 font-bold">Verified deliveries</h2>
<ol aria-label="Verified deliveries">
{deliveries.length === 0 && <li>None yet: sign in, and watch them arrive.</li>}
{deliveries.map((d) => (
<li key={d.id}>
<code>{d.type}</code> at {d.receivedAt}
</li>
))}
</ol>
</>
)
}
src/examples/webhooks/receiver.tsimport { isSynqError } from '@synqauth/js'
import { verifyWebhook } from '@synqauth/js/server'
import { remember } from '../../lib/deliveries'
// Receiving Synq's webhooks: check each delivery's signature before you
// trust a byte of it, then act on the event. verifyWebhook checks the
// Standard Webhooks signature against the subscription's whsec_ secret, and
// that Synq signed it in the last five minutes, so a captured delivery can't
// be replayed. Read the raw body: parsing the JSON first changes the bytes
// that were signed.
export async function POST(request: Request): Promise<Response> {
const secret = process.env.SYNQ_WEBHOOK_SECRET
if (!secret) return new Response('not set up', { status: 503 })
const body = await request.text()
try {
const { id, event } = await verifyWebhook(body, request.headers, secret)
// `id` is the same on every retry of one delivery: handle each once.
remember({ id, type: event.type, receivedAt: new Date().toISOString(), data: event.data })
return new Response(null, { status: 204 })
} catch (error) {
// A delivery that fails its check gets a 401; Synq tries it again later.
if (isSynqError(error)) return new Response(error.code, { status: 401 })
throw error
}
}