Skip to content
agent-cms

Components / cms-webhooks

Webhooks

Webhooks with their events and state; a test delivery, the signing secret, the delivery history with send again, edit and delete.

With the shadcn CLI

npx shadcn add https://agent-cms-docs.vercel.app/r/cms-webhooks.json

With the agent-cms CLI

npx @mainsoft/agent-cms add cms-webhooks

No live demo: a webhook makes this server call an address of your choice, and the demo is shared by every visitor. To try it, add the screen to your app and register the receiver from the example app (examples/next/app/api/hook). Open the editor demo

Usage#

tsx
// app/admin/webhooks/page.tsx
"use client";
import { CmsWebhooks } from "@/components/cms/cms-webhooks";

export default function WebhooksPage() {
  return <CmsWebhooks />;
}

The sidebar shows "Webhooks" to admins once secretsKey is set in createCms; without it the screen says what is missing. A row shows the state: Working, the count of failed deliveries in a row, or Off. Press a name to open its panel. A webhook the CMS switched off after 20 failures shows the reason and "Turn on".

Deliveries go out with the cron call, so "Send again" queues the event for the next one. "Send a test" sends a ping right away.

See Webhooks, jobs and plugins for the events, the payload and the receiver's verifyWebhook.

note

From 0.12.0.