> ## Documentation Index
> Fetch the complete documentation index at: https://cofounder.appeeky.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Webhook Triggers API

> Configure the inbound webhooks that turn external events into real-time signals — RevenueCat, App Store, and the generic signed webhook.

See [Real-time Triggers](../concepts/realtime-triggers) for the conceptual
overview. These endpoints configure the inbound side (external event → signal).
For the *outbound* report webhook, see [Webhook Sink](../integrations/webhook).

## RevenueCat webhook

Get the URL + Authorization value to paste into the RevenueCat dashboard:

```
GET  /v1/connect/revenuecat/webhook          # { url, authorizationHeader, configured }
POST /v1/connect/revenuecat/webhook/rotate   # rotate the token
```

RevenueCat then POSTs to `/v1/cofounder/webhooks/revenuecat` with that value in
the `Authorization` header. Churn/billing events become `churn_spike` signals.

## Custom signed webhook

Get your URL + signing secret:

```
GET  /v1/cofounder/webhooks/custom           # { url, secret, signatureHeader }
POST /v1/cofounder/webhooks/custom           # rotate token + secret
```

Send a signed event — HMAC-SHA256 the raw JSON body with your secret:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
BODY='{"summary":"Support backlog spiked","severity":"high"}'
SIG=$(printf '%s' "$BODY" | openssl dgst -sha256 -hmac "$SECRET" | awk '{print $2}')

curl -X POST "https://api.appeeky.com/v1/cofounder/webhooks/custom/$TOKEN" \
  -H "Content-Type: application/json" \
  -H "X-Appeeky-Signature: sha256=$SIG" \
  -d "$BODY"
```

| Body field                               | Notes                                                          |
| ---------------------------------------- | -------------------------------------------------------------- |
| `summary`                                | required — the signal summary                                  |
| `severity`                               | `info`\|`low`\|`medium`\|`high`\|`critical` (default `medium`) |
| `appId`                                  | defaults to your live app                                      |
| `metricPath`, `fingerprint`, `magnitude` | optional                                                       |

High-severity events (`high`/`critical`) dispatch a run immediately; others are
picked up by the event orchestrator within \~15 minutes.

## App Store Server Notifications

No config endpoint — if you've pointed Apple's App Store Server Notifications V2
at `/v1/webhooks/apple`, subscriber churn and refunds automatically emit
signals.
