# Webhooks (/docs/webhooks)



<Callout>
  Webhooks are on the roadmap and not yet generally available. This page documents the intended design — expect changes before launch.
</Callout>

## How it will work [#how-it-will-work]

You register an HTTPS URL in your organization settings. Factory OS POSTs a JSON payload to that URL whenever a subscribed event fires.

## Planned event catalog [#planned-event-catalog]

| Event                        | When it fires                             |
| ---------------------------- | ----------------------------------------- |
| `production_order.created`   | A new work order is opened                |
| `production_order.completed` | A work order is closed                    |
| `machine.state_changed`      | Machine transitions (running, idle, down) |
| `quality.defect_logged`      | A defect is recorded                      |
| `andon.called`               | An andon escalation is raised             |
| `andon.resolved`             | An andon is cleared                       |

## Signing [#signing]

Payloads will be signed with HMAC-SHA256. Verify the `X-Xentr-Signature` header with your webhook secret before trusting the payload.

## Retries [#retries]

Failed deliveries (non-2xx response, timeout >10s) retry with exponential backoff up to 24 hours.

***

For now, poll the REST API or subscribe to Supabase realtime channels for live data.
