Receive AppGram events on your server when feedback, support, or other subscribed activity changes. Configure endpoints and event subscriptions in the dashboard’s Developer tools → Webhooks area.

Configure an endpoint

  1. Select your project or organization in the dashboard.
  2. Open Webhooks and add the endpoint at the appropriate project or organization scope.
  3. Enter a reachable HTTPS receiver URL and select the event types you need.
  4. Save the signing secret securely when it is shown. Keep it on the receiving server.
  5. Use the endpoint’s delivery history or Developer tools → Logs → Webhook deliveries to inspect success and failure responses.

The published REST contract currently exposes a sample-payload operation. Endpoint registration and subscription management are dashboard workflows; they are not additional public API operations implied by that sample endpoint.

Inspect a sample payload

Copy an exact event type from the dashboard’s event catalog:

Code example
curl --request GET \
  --url 'https://api.appgram.dev/api/v1/webhooks/events/YOUR_EVENT_TYPE/sample' \
  --header 'x-api-key: YOUR_API_KEY'

The sample is synthetic and does not deliver a webhook. The sample-payload reference describes its response.

Verify delivery signatures

AppGram posts JSON with these headers:

HeaderMeaning
X-Webhook-IDIdentifier for this delivery attempt
X-Webhook-TimestampAttempt time as Unix seconds
X-Webhook-Signaturet=<unix-seconds>,v1=<hex-signature>

The signature is the lowercase hexadecimal HMAC-SHA256 of timestamp + "." + raw HTTP body, using your endpoint’s signing secret. Verify the original request bytes before parsing JSON. Re-serializing JSON changes the bytes and can invalidate a legitimate signature.

This Node.js verifier rejects malformed signatures and uses a five-minute clock tolerance:

Code example
import { createHmac, timingSafeEqual } from 'node:crypto';

export function verifyAppGramWebhook(rawBody, signatureHeader, secret, now = Date.now()) {
  if (!Buffer.isBuffer(rawBody) || typeof signatureHeader !== 'string' || !secret) return false;
  const match = /^t=(\d+),v1=([a-f0-9]{64})$/i.exec(signatureHeader);
  if (!match) return false;

  const timestamp = Number(match[1]);
  if (!Number.isSafeInteger(timestamp) || Math.abs(now - timestamp * 1000) > 300_000) return false;

  const expected = createHmac('sha256', secret)
    .update(`${match[1]}.`)
    .update(rawBody)
    .digest();
  return timingSafeEqual(expected, Buffer.from(match[2], 'hex'));
}

Pass the raw request buffer, the X-Webhook-Signature value, and your endpoint secret. Reject the request if verification fails. Configure a request-body size limit in your HTTP server. Keep its clock synchronized and choose a tolerance appropriate to your deployment.

Only parse the JSON after verification succeeds. In frameworks with JSON middleware, preserve the raw body for this route rather than signing JSON.stringify(parsedBody).

Process once and acknowledge promptly

The payload includes id, event, timestamp, and event-specific data; it can also contain metadata. Use the signed payload’s id for durable deduplication. X-Webhook-ID identifies an attempt and changes between retries.

Store accepted events or enqueue them durably, then return a 2xx response promptly. Return a success response for an already processed event without repeating its side effects. Do not assume delivery order.

Retries and failures

Failed deliveries can be attempted up to eight times in total. Retry delays increase approximately through 30 seconds, 2 minutes, 10 minutes, 30 minutes, 2 hours, 6 hours, and 24 hours; scheduling and endpoint state affect actual timing. Retries use a fresh attempt timestamp and signature while retaining the event ID.

Inspect delivery history when your receiver is unreachable or returns a non-2xx status. Changing a signing secret requires updating the receiving server too. The local signature example does not test your deployed endpoint; verify one actual delivery with your own configured endpoint before relying on the integration.