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

# Webhooks

> Webhooks allow your app to receive real-time notifications when events occur in OrbitForms. Build reactive integrations that respond instantly to form submissions and other events.

## Available Events

<CardGroup cols={2}>
  <Card title="submission.created">
    New form submission received
  </Card>

  <Card title="submission.qualified">
    Submission met qualification criteria
  </Card>

  <Card title="submission.updated">
    Submission data was modified
  </Card>

  <Card title="submission.deleted">
    Submission was deleted
  </Card>
</CardGroup>

## Webhook Payload

Each webhook delivers a JSON payload with event details:

```json theme={null}
{
  "event": "submission.created",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "submission_id": "sub_abc123",
    "form_id": "form_xyz789",
    "fields": {
      "email": "user@example.com",
      "name": "John Doe",
      "message": "Hello!"
    }
  }
}
```

## Signature Verification

All webhook requests include a signature header for verification. Always verify the signature to ensure the request came from OrbitForms:

```javascript theme={null}
const crypto = require('crypto');

function verifyWebhook(payload, signature, secret) {
  const expectedSignature = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from('sha256=' + expectedSignature)
  );
}
```

## Best Practices

<CardGroup cols={1}>
  <Card title="Respond quickly" icon="zap">
    Return a 2xx response within 5 seconds. Process asynchronously if needed.
  </Card>

  <Card title="Verify signatures" icon="shield">
    Always validate the webhook signature before processing.
  </Card>

  <Card title="Handle retries" icon="clock">
    Webhooks are retried on failure. Implement idempotency to avoid duplicates.
  </Card>
</CardGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Webhook Docs" icon="webhook" href="/developers/webhooks/overview">
    Full webhook documentation
  </Card>

  <Card title="API Reference" icon="shield" href="/developers/api/overview">
    Manage webhooks via API
  </Card>
</CardGroup>
