Skip to main content

Policy Webhooks

The milestones of the policy lifecycle are notified through webhooks of type insurance.policy.status_changed. Two statuses produce an event: issued (issuance confirmed by the insurer) and canceled (policy cancelled). The natural end of term (finished) does not produce a webhook — it is known since issuance through term.end_date.

Each policy is notified independently: an order with N products produces N policies and N events of each type, possibly at different times.

Setup and validation

Receiving webhooks requires a configured webhook URL, and every webhook must have its signature validated. See Configuring webhooks and Webhook validation.

Webhook structure​

FieldTypeDescription
webhook_typestringAlways insurance.policy.status_changed.
statusstringThe policy's new status: issued or canceled.
keystringThe policy key (policy_key).
event_datetimestringDate and time of the event, in UTC, in ISO 8601 format.
dataobjectEvent data. See the table below.

data attributes​

FieldTypeDescription
policy_keystringThe policy key.
order_keystringKey of the order the policy came from — the link to your sale.
requester_keystringYour integration's key as a distributor.
statusstringThe policy's new status — the same as the outer status field.
external_policy_numberstringThe policy number.
reasonstring / nullCancellation reason on the canceled event; null on issued.
sequenceintegerOrder of the event within the policy: a higher value is always a later event. The sequence is not contiguous — a policy's first webhook may arrive with a value greater than 1.
schema_versionintegerVersion of the data structure. Currently 1.
Attention

The policy cancellation status is canceled, with one l. The order's is cancelled, with two. Handle the two values separately.

Events by status​

Policy issued​

STATUS
issued

Sent when the insurer confirms the issuance. From this event on, the coverage is formally registered with the insurer.

Webhook Body
{
"status": "issued",
"webhook_type": "insurance.policy.status_changed",
"key": "0b6e7c1a-9a4e-4c1e-b1d4-2f5a8c9e0d31",
"event_datetime": "2026-10-05T20:41:02Z",
"data": {
"policy_key": "0b6e7c1a-9a4e-4c1e-b1d4-2f5a8c9e0d31",
"order_key": "5e2b3f60-7c4b-4c8e-9f1a-6d2e8b4a7c90",
"requester_key": "3f1c9a2e-4b7d-4e0a-9c55-2d8e7f6a1b30",
"status": "issued",
"external_policy_number": "QIS000000000123",
"reason": null,
"sequence": 1,
"schema_version": 1
}
}

Policy cancelled​

STATUS
canceled

Sent when the policy is cancelled — through policy cancellation or order cancellation after emission, at the moment of cancellation, or by the insurer. The reason field carries the reason given in the cancellation, or requester_requested if none was given; in a cancellation made by the insurer, it is provider_initiated.

Webhook Body
{
"status": "canceled",
"webhook_type": "insurance.policy.status_changed",
"key": "0b6e7c1a-9a4e-4c1e-b1d4-2f5a8c9e0d31",
"event_datetime": "2026-10-05T21:18:33Z",
"data": {
"policy_key": "0b6e7c1a-9a4e-4c1e-b1d4-2f5a8c9e0d31",
"order_key": "5e2b3f60-7c4b-4c8e-9f1a-6d2e8b4a7c90",
"requester_key": "3f1c9a2e-4b7d-4e0a-9c55-2d8e7f6a1b30",
"status": "canceled",
"external_policy_number": "QIS000000000123",
"reason": "Cliente solicitou o cancelamento",
"sequence": 3,
"schema_version": 1
}
}
Attention!

QI Tech webhooks must not be mapped strictly. Additional fields may be included in the webhook payloads returned by our APIs.