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

# Webhook events

> Every event SimpleFunctions delivers — payload shapes, dedupe semantics, and retry behavior.

SimpleFunctions delivers signed webhook events to endpoints registered via [Webhooks](/build/webhooks). All bodies are JSON. All deliveries include the headers documented in [Webhook receiver](/integrations/webhook-receiver).

## Common envelope

```json theme={null}
{
  "id": "evt_...",
  "type": "alert.fired",
  "createdAt": "2026-05-01T00:00:00.000Z",
  "deliveryId": "del_...",
  "endpointId": "we_...",
  "data": { /* event-specific */ }
}
```

## `alert.fired`

```json theme={null}
{
  "type": "alert.fired",
  "data": {
    "ruleId": "ar_...",
    "watchedObjectId": "wo_...",
    "ticker": "KXRATECUT-26DEC31",
    "condition": "price_above",
    "threshold": 65,
    "snapshot": {
      "priceCents": 67,
      "volume24h": 125000,
      "regimeLabel": "observable_macro_long_skewed"
    },
    "firedAt": "..."
  }
}
```

## `alert.paused`

Emitted when a rule auto-pauses after repeated delivery failures.

```json theme={null}
{
  "type": "alert.paused",
  "data": {
    "ruleId": "ar_...",
    "reason": "endpoint_consecutive_failures",
    "failureCount": 5
  }
}
```

## `thesis.confidence_changed`

```json theme={null}
{
  "type": "thesis.confidence_changed",
  "data": {
    "thesisId": "th_...",
    "previousConfidence": 0.62,
    "currentConfidence": 0.74,
    "delta": 0.12,
    "trigger": "monitor_cycle | signal | evaluation"
  }
}
```

## `thesis.killed`

```json theme={null}
{
  "type": "thesis.killed",
  "data": {
    "thesisId": "th_...",
    "reason": "kill_flag_raised",
    "evaluation": { /* full evaluation that triggered the kill */ }
  }
}
```

## `portfolio.tick_completed`

```json theme={null}
{
  "type": "portfolio.tick_completed",
  "data": {
    "tickId": "pt_...",
    "tickAt": "...",
    "executionMode": "dry-run",
    "actionsCount": 3,
    "balanceCents": 100000,
    "exposureCents": 25000,
    "tickDurationMs": 145000
  }
}
```

## `portfolio.halt_triggered`

```json theme={null}
{
  "type": "portfolio.halt_triggered",
  "data": {
    "drawdownCents": 51000,
    "haltCapCents": 50000,
    "newExecutionMode": "halted"
  }
}
```

## Dedupe

Each event carries a stable `deliveryId`. Receivers should idempotency-key on this id. See [Webhook receiver](/integrations/webhook-receiver) for sample code.

## Retries

5 attempts, exponential backoff (1s, 4s, 16s, 64s, 256s). After 5 failures, endpoint enters `degraded` state; after sustained failures over 24h, endpoint auto-pauses.

## Test deliveries

```bash theme={null}
sf webhooks test <endpoint-id>
```

Sends a synthetic `alert.fired` event with `data.snapshot.priceCents = 50`.
