# Webhooks

> Signed events to your server when a size is recommended, a garment is published or a shopper disconnects.

Source: https://docs.tryyoursize.com/products/webhooks/

Register an HTTPS endpoint in Studio → Developers → Webhooks and receive signed events. Payloads never carry shopper identity or measurements.

| Event | When |
|---|---|
| `fit.recommended` | A shopper got a size for one of your products |
| `garment.published` | A garment version was published (Studio or API) |
| `fit_check.completed` | A fit check finished |
| `profile.disconnected` | A shopper disconnected your store |
| `usage.threshold_reached` | Coming soon: your usage reached a threshold of your plan |
| `webhook.test` | You sent a test event from Studio |

Every delivery has a `TYS-Signature` header (`t=<unix>,v1=<HMAC-SHA256 hex>`). Verify it against the **raw** body:

```ts
const event = tys.webhooks.constructEvent(rawBody, req.headers["tys-signature"], process.env.TYS_WEBHOOK_SECRET!);
```

- [Webhooks guide](https://docs.tryyoursize.com/guides/webhooks.md): Envelope, verification in any language, retries, rolling the secret.
- [constructEvent() (Node.js)](https://docs.tryyoursize.com/reference/node/webhooks-construct-event.md)
- [Webhook.construct_event() (Python)](https://docs.tryyoursize.com/reference/python/webhook-construct-event.md)
