# Webhooks, signatures and stored secrets > Receive signed events, configure HTTP requests and use encrypted organization secrets safely. Canonical URL: https://pollenate.dev/docs/integrations/webhooks/ ## Default delivery A webhook rule sends a JSON envelope to your URL: ```json { "event": "feedback.created", "data": { "feedbackId": "FEEDBACK_ID", "inboxId": "INBOX_ID", "type": "thumbs", "score": 0, "comment": "Setup was unclear." }, "timestamp": "2026-11-13T12:00:00.000Z" } ``` This is a shortened example. Inbox events also carry inbox/brand/organization names and IDs, source, page/session context and creation time. Form events use `responseId`, page identity, respondent contact fields when provided, and an `answers` array containing question IDs, prompts, types and values. Expect customer content in these payloads. Choose an appropriate receiving destination and access policy before enabling a broad rule. ## HTTP settings Default method is POST. Rules support POST, PUT, PATCH, DELETE and GET, custom headers, and an optional replacement body template. GET sends no body. Outbound delivery has a 10-second timeout and blocks recognized private/internal host addresses. Use a publicly reachable HTTPS endpoint. Platform headers include `X-Pollenate-Event`, `X-Pollenate-Delivery`, `X-Pollenate-Timestamp` and, when a signing secret exists, `X-Pollenate-Signature`. The delivery ID is unique per request. You cannot override `X-Pollenate-*`, Host or Content-Length through custom headers. A webhook's signing secret is distinct from named organization secrets used to authenticate to third-party services. Keep both confidential. ## Verify the raw request body The signature is `sha256=` followed by the hex HMAC-SHA256 of the **rendered body**, keyed by the rule's signing secret. Verify the exact bytes before JSON parsing or modifying whitespace. ```javascript import { createHmac, timingSafeEqual } from "node:crypto"; export function validSignature(rawBody, header, signingSecret) { if (!/^sha256=[a-f0-9]{64}$/i.test(header ?? "")) return false; const supplied = Buffer.from(header.slice(7), "hex"); const expected = createHmac("sha256", signingSecret) .update(rawBody) .digest(); return supplied.length === expected.length && timingSafeEqual(supplied, expected); } ``` Pass your framework's raw request buffer to this function. Return an error for a bad signature; after verification, persist or enqueue the work and respond promptly. For replay handling, use the signed envelope's timestamp and your own durable record of processed event IDs. The delivery and timestamp headers are not independently included in the signature. If you replace the body template, include the fields you need for your receiver's freshness and deduplication policy. A bodyless GET is not a good fit for body-signature verification. ## Template substitution is not JSON escaping Supported placeholders include `{{event}}`, `{{timestamp}}`, `{{data.feedbackId}}` and `{{secrets.NAME}}`. Dotted paths look up values; missing values become empty strings. Objects/arrays are JSON-stringified. There are no expressions, loops or function calls. String values are substituted as-is. Putting `{{data.comment}}` inside JSON quotes can produce invalid JSON when a comment contains quotes or newlines. Use the default JSON envelope and transform it in a receiver with `JSON.stringify` for arbitrary user content. See the [GitHub recipe](/docs/integrations/github/). ## Store and rotate a destination secret Create named secrets in Automations → Manage secrets. API access uses `/organizations/ORG_ID/secrets`; machine callers need an organization-wide `admin` key. ```json { "name": "GITHUB_TOKEN", "value": "REPLACE_WITH_YOUR_TOKEN", "description": "Issue creation for the selected repository" } ``` POST this body to create a secret. GET lists metadata and a masked hint, never the full value. PATCH `/SECRET_ID` with a replacement `value` rotates it; DELETE removes it. Names are 1–100 characters, start with a letter or underscore, and then use letters, digits or underscores. Values are at most 10,000 characters. Named organization secrets are encrypted at rest with AES-256-GCM. References are resolved at delivery time, for example `Authorization: Bearer {{secrets.GITHUB_TOKEN}}`. Removing a referenced secret can break delivery. Inspect destination responses and automation logs. HTTP errors, timeouts or status 0 (blocked/not sent) require attention; no automatic retry queue is provided.