# License key expired (/api/webhooks/license-expired)

Webhook event `license:expired`, sent as `POST` to your subscription's URL.

Fires once for each expiry that passes while a `generated` key is active: when the hourly expiry check finds it, or straight away when a refund or chargeback moves the expiry into the past. A key renewed after its expiry passed, but before the hourly check ran, works again and gets only `license:extended`. When the check first runs it looks back one day only. It also follows `license:reinstated` straight away when the key's expiry passed while it was revoked. An expiry does not change the key, so this event carries the `version` of the key when its expiry passed, which can be the same as an earlier event's (`license:issued`, `license:reinstated`): skip repeats by `event_id`, not by `version`. If the hourly check saw the expiry before a late renewal was announced, this event comes first, with the key as it was then, and `license:extended` follows. Made once per change, in the background, so it may come a little after the payment or refund. Like any event it can be delivered more than once (skip an `event_id` you have seen), and events can arrive out of order: keep the license with the highest `version` and ignore one with a lower `version`. Changes made close together can be sent as one event with the latest state. The key itself is never sent: `text` and `html` are null, at any `expand` depth, and `key_last4` tells keys apart. The body is an event object with the license in `data`.

## Parameters

- `X-Comecero-Signature` (header): Proof the delivery comes from Comecero and was not changed. It is the HMAC-SHA256 of the raw request body (UTF-8), keyed with the signature key as UTF-8, written as 64 lowercase hex characters. The key is the event subscription's `signature_key`, or the account's signature key (Settings, Technical) when the subscription has none. Every account gets one when it is created, so deliveries are signed unless the key was removed. To check it, compute the HMAC over the body exactly as received, before you parse it, and compare the two strings in constant time. Reject the delivery when they differ. The signature has no timestamp, so to guard against a replayed delivery also skip any `event_id` you already handled. If you cannot check signatures, use the event only as a hint: get the object by its id from the API before you act on it.
- `User-Agent` (header): Always `Comecero-Event (+https://comecero.com)`.

Responses: 200.

Full schemas: operation `event_license_expired` in /openapi.json.