Dashboard · Webhooks

Create an endpoint

Add a signed webhook URL, choose triggers with presets or the event picker, then send a test delivery.

Permissions
Owner or admin in the dashboard. Via Management API you need settings.webhook:write.

In the dashboard

  1. Open Webhooks → Add endpoint

    From the website sidebar, open Webhooks and click Add endpoint. You can switch between Visual and JSON input modes — JSON matches the POST /management/webhooks body shape.

  2. Name and URL

    Give the endpoint a clear name (for example “Vercel revalidate”) and an optional description. The URL must be a full https:// address your server can accept with POST, PUT, or PATCH (default POST).

  3. Select triggers

    Triggers are OR’d: Macro sends when any selected event fires. Use a quick preset (Static rebuild, All content, Domain monitoring, …) or pick groups/events manually. At least one available event is required.

  4. Signing secret

    Leave blank to auto-generate a whsec_… secret, or paste your own (16–256 characters). The raw secret is shown once at create time — store it with your receiver. See Signing & verifying.

  5. Payload mode (optional)

    Default is the full Macro envelope. You can send message-only JSON or a custom template — details in Payload & envelope.

  6. Save and test

    After create, use Send test event on the row. That delivers webhook.test and opens the delivery log so you can confirm headers, body, and HTTP status.

Create via Management API

POST/management/webhooksmt_

Create endpoint — returns webhook metadata plus raw secret once.

bash
curl -sS -X POST https://api.macrocontent.dev/management/webhooks \
  -H "X-Macro-Token: mt_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Production rebuild",
    "url": "https://hooks.example.com/macro",
    "events": ["content.published"],
    "httpMethod": "POST",
    "payloadMode": "envelope"
  }'
NameTypeRequiredDescription
namestringrequiredDisplay name (max 100).
urlstring (URL)requiredReceiver HTTPS URL (max 2048).
eventsstring[]requiredAt least one available trigger type.
descriptionstringoptionalOptional note (max 500).
secretstringoptionalOptional; auto-generates whsec_… when omitted (min 16).
enabledbooleanoptionalDefaults to true.
httpMethodPOST | PUT | PATCHoptionalHTTP method for deliveries (default POST).
payloadModeenvelope | message | customoptionalBody shape (default envelope).
payloadTemplatestringoptionalRequired for custom mode — Mustache-like {{…}} placeholders.
payloadContentTypestringoptionalContent-Type for the body (default application/json).
customHeadersstringoptionalNewline KEY=value pairs; cannot override Macro system headers.
Different payloads per event?
One endpoint shares the same URL and payload mode for every selected trigger. If you need a different body shape per event, create separate endpoints.

After create

  • Toggle enabled on the row to pause deliveries without deleting.
  • Edit name, URL, events, method, or payload mode anytime.
  • Rotate the secret from the edit UI or POST /management/webhooks/:id/rotate-secret.