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

# Webhooks

> Real-time webhook notifications for review events (Platform only)

<Warning>
  Advanced webhook system is only available in [Humancheck Platform](/platform/overview), not in the open-source version.

  Open Source supports basic webhook notifications via connectors.
</Warning>

Webhooks allow you to receive real-time notifications when review events occur in Humancheck Platform.

## Setting Up Webhooks

### Via Dashboard UI

1. Go to [platform.humancheck.dev](https://platform.humancheck.dev)
2. Navigate to **Integrations** → **Webhooks**
3. Click **Create Webhook**
4. Configure:
   * Webhook URL
   * Events to subscribe to
   * Authentication (optional)
   * Retry settings

### Via API

```python theme={null}
import httpx

async with httpx.AsyncClient() as client:
    response = await client.post(
        "https://api.humancheck.dev/webhooks",
        headers={
            "Authorization": "Bearer your-api-key-here",
            "Content-Type": "application/json"
        },
        json={
            "url": "https://your-app.com/webhooks/humancheck",
            "events": [
                "review.created",
                "review.assigned",
                "review.decided",
                "review.status_changed"
            ],
            "secret": "your-webhook-secret",
            "active": True
        }
    )
    webhook = response.json()
```

## Webhook Events

### Review Events

* `review.created` - New review created
* `review.assigned` - Review assigned to reviewer
* `review.decided` - Decision made on review
* `review.status_changed` - Review status changed
* `review.updated` - Review updated

### Decision Events

* `decision.approved` - Review approved
* `decision.rejected` - Review rejected
* `decision.modified` - Review modified

## Webhook Payload

```json theme={null}
{
  "event": "review.decided",
  "timestamp": "2024-01-01T12:00:00Z",
  "data": {
    "review_id": 123,
    "task_type": "payment",
    "status": "approved",
    "decision": {
      "decision_type": "approve",
      "reviewer_name": "Alice Smith",
      "timestamp": "2024-01-01T12:00:00Z"
    }
  }
}
```

## Security

### Signature Verification

Webhooks include a signature header for verification:

```python theme={null}
import hmac
import hashlib

def verify_webhook(payload, signature, secret):
    expected_signature = hmac.new(
        secret.encode(),
        payload.encode(),
        hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(signature, expected_signature)
```

## Retry Logic

Platform automatically retries failed webhook deliveries:

* Immediate retry on failure
* Exponential backoff
* Maximum 3 retries
* Dead letter queue for persistent failures

## Multi-User Approval Workflows

Platform supports complex approval workflows via webhooks:

### Sequential Approval

```json theme={null}
{
  "workflow_type": "sequential",
  "approvers": ["alice@example.com", "bob@example.com"],
  "current_step": 1,
  "total_steps": 2
}
```

### Parallel Approval

```json theme={null}
{
  "workflow_type": "parallel",
  "approvers": ["alice@example.com", "bob@example.com"],
  "required_approvals": 2
}
```

### Conditional Workflow

```json theme={null}
{
  "workflow_type": "conditional",
  "conditions": [
    {
      "if": "amount > 10000",
      "then": ["finance@example.com"]
    },
    {
      "if": "urgency == 'critical'",
      "then": ["oncall@example.com"]
    }
  ]
}
```

## No-Code Integrations

Platform webhooks work seamlessly with no-code platforms:

### n8n

Connect Humancheck webhooks to n8n workflows for automation.

### Zapier

Use Zapier to connect Humancheck webhooks to 5000+ apps.

### Gumloop

Build complex workflows with Gumloop using Humancheck webhooks.

## Next Steps

* Learn about [Connectors](/connectors/overview)
* Explore [Platform Features](/platform/overview)
* Check out [API Reference](/api-reference/introduction)
