<!-- Stacklift documentation: "Webhooks". Source: https://stacklift.joynul.com/docs/webhooks · All pages for LLMs: https://stacklift.joynul.com/llms-full.txt -->

> About Stacklift: Stacklift is a hosted platform with source-available SDKs for shipping app releases and over-the-air updates. It works for mobile (React Native, Expo, Flutter, native iOS and Android, Kotlin Multiplatform, .NET MAUI, Unity), web, desktop (Electron, .NET, Java) and backend apps. Developers create releases with the `stacklift` CLI or the dashboard; the server verifies and signs every artifact (SHA-256 + Ed25519), deploys releases to channels with staged rollouts and rollback, and app SDKs check, download and verify updates. Native apps can change screens over the air with server-driven UI layouts and logic with sandboxed scripts, within App Store and Google Play rules. Apps never depend on Stacklift to keep working: everything has a built-in fallback and an exit path.
>
> This page: Events, signatures and retry behavior.

# Webhooks

Stacklift sends signed HTTP `POST` requests when things happen. Create endpoints under **Integrations → Webhooks**; the signing secret (`whsec_…`) is shown once.

## Events

`release.created`, `release.ready`, `release.failed`, `deployment.succeeded`, `deployment.failed`, `rollout.updated`, `rollback.created`, plus `ping` for tests.

```json
{
  "id": "5a1f…",
  "event": "deployment.succeeded",
  "orgId": "…",
  "projectId": "…",
  "createdAt": "2026-11-17T10:21:04.000Z",
  "data": { "deploymentId": "…", "releaseId": "…", "channelId": "…" }
}
```

## Verifying a delivery

Headers: `Stacklift-Event`, `Stacklift-Delivery`, `Stacklift-Signature: t=<unix>,v1=<hex>`. The signature is `HMAC-SHA256(secret, "<t>.<raw body>")`. Compare in constant time and reject timestamps older than five minutes.

```ts
import { createHmac, timingSafeEqual } from 'node:crypto';

export function verify(rawBody: string, header: string, secret: string) {
  const [t, v1] = header.split(',').map((p) => p.split('=')[1]!);
  if (Math.abs(Date.now() / 1000 - Number(t)) > 300) return false;
  const expected = createHmac('sha256', secret).update(`${t}.${rawBody}`).digest('hex');
  return timingSafeEqual(Buffer.from(v1), Buffer.from(expected));
}
```

## Delivery semantics

- Delivered at least once; use `Stacklift-Delivery` to de-duplicate.
- Non-2xx responses and timeouts (10 s) are retried with exponential backoff, up to 5 attempts. Every attempt appears in the delivery log.
- Redirects are not followed.
- In production, targets must be `https` and must not resolve to loopback, private or link-local addresses (SSRF guard, re-checked at delivery time).

Slack and Discord notifications are **planned**. Until then, point a webhook at a relay (for example a Slack incoming-webhook adapter you host).
