Events
Events record every significant change in your Stile account, with API delivery state for reconciliation.
Every time something significant happens — a session is verified, a review is resolved, a trust-reuse grant changes — Stile creates an event. Webhooks and the Events API share the core id, object, type, data, and created envelope. The API enriches that envelope with version and delivery state for reconciliation; those API-only fields are not included in webhook POST bodies. Treat webhook delivery as the source of truth — poll this API on cold start or for reconciliation.
Examples show cURL, Python, Go, and Node.js. Approved preview users can also use the private-preview Node.js SDK as a typed convenience wrapper for the full event catalog.
The event object
{
"id": "evt_abc123",
"object": "event",
"type": "verification_session.verified",
"api_version": "2025-01-01",
"livemode": true,
"created": 1741564800,
"pending_webhooks": 1,
"data": {
"object": {
"id": "vks_xyz789",
"object": "verification_session",
"status": "verified",
"type": "identity",
"client_reference_id": "order_123",
"current_method": "document_capture",
"age_tier": "min_age_21",
"jurisdiction": "US-CA",
"jurisdiction_audit_declared": "US-CA",
"jurisdiction_audit_ip_derived": "US-CA",
"jurisdiction_audit_resolved": "US-CA",
"jurisdiction_audit_source": "input_field",
"jurisdiction_audit_mismatch": false,
"verification_path": null,
"workflow_version_id": "wfv_abc123",
"livemode": true,
"completed_at": 1741564800,
"created": 1741561200,
"verification_result": {
"method": "document_capture",
"confidence": 0.98,
"age_verified": true,
"age_estimate": 29,
"identity_verified": true,
"face_match_passed": true,
"barcode_cross_ref_match": true,
"liveness_score": 0.97
}
}
},
"delivery_summary": {
"total": 1,
"delivered": 1,
"failed": 0,
"pending": 0
}
}| Parameter | Type | Description |
|---|---|---|
id | string | Unique event identifier (evt_...). Stable across webhook retries — deduplicate on this value. |
object | string | Always "event". |
type | string | The event type, e.g. "verification_session.verified". See the full catalog below. |
api_version | string | null | API version stored with the event. Events API only; omitted from webhook POST bodies. |
livemode | boolean | Whether the event belongs to live mode (true) or test mode (false). Events API only; omitted from webhook POST bodies. |
created | number | Unix timestamp (seconds) when the event was created. |
pending_webhooks | number | Number of endpoint deliveries queued when the event was dispatched. Events API only. This is not a live completion counter; use delivery_summary for current delivery state. |
data | object | Envelope containing data.object, a snapshot of the resource that caused the event. For verification_session.* events, data.object is the session. Retrieve the resource for its current state. |
delivery_summary | object | null | Live delivery counts: total, delivered, failed, and pending. Events API only; webhook POST bodies do not include it. |
deliveries | WebhookDelivery[] | Current delivery record for each subscribed endpoint. Included only by GET /v1/events/:id, not list responses or webhook POST bodies. |
Events are snapshots
The data.object payload reflects the compact session event snapshot as it was when the event
fired, not the full verification-session response. It omits secrets, metadata, collected data,
expires_at, URLs, and the full results array. If you need the current full state — for example
after processing a backlog — retrieve the session via the Verification Sessions
API.
Retrieve an event
/v1/events/:idcurl https://api.stile.id/v1/events/evt_abc123 \
-H "Authorization: Bearer stile_sk_..."import requests
res = requests.get(
"https://api.stile.id/v1/events/evt_abc123",
headers={"Authorization": "Bearer stile_sk_..."},
)
event = res.json()
print(event["type"]) # "verification_session.verified"req, _ := http.NewRequest("GET", "https://api.stile.id/v1/events/evt_abc123", nil)
req.Header.Set("Authorization", "Bearer stile_sk_...")
res, _ := http.DefaultClient.Do(req)const event = await stile.events.retrieve("evt_abc123");
console.log(event.type); // "verification_session.verified"
console.log(event.data.object); // The verification-session event snapshotList events
/v1/eventsReturns a paginated list of events. Filter by type, time window, or session to reconcile your records against what Stile recorded.
| Parameter | Type | Description |
|---|---|---|
limit | number= 10 | Number of events to return. Between 1 and 100. |
starting_after | string | Return older events that follow this ID in the newest-first list. |
ending_before | string | Return newer events that precede this ID in the newest-first list. |
type | string | Filter by event type (e.g. "verification_session.verified"). |
created_after | number | Unix timestamp. Only return events created after this time. |
created_before | number | Unix timestamp. Only return events created before this time. |
session_id | string | Filter events related to a specific verification session. |
Use only one cursor per request: starting_after moves toward older events and ending_before moves toward newer events.
curl "https://api.stile.id/v1/events?limit=50" \
-H "Authorization: Bearer stile_sk_..."import requests
res = requests.get(
"https://api.stile.id/v1/events",
headers={"Authorization": "Bearer stile_sk_..."},
params={"limit": 50},
)
data = res.json()req, _ := http.NewRequest("GET", "https://api.stile.id/v1/events?limit=50", nil)
req.Header.Set("Authorization", "Bearer stile_sk_...")
res, _ := http.DefaultClient.Do(req)const { data } = await stile.events.list({ limit: 50 });
for (const event of data) {
console.log(event.type, event.created);
}Event types
The complete catalog. Events cover three areas: the verification session lifecycle (verification_session.*), manual review outcomes (session_review.*), and trust-reuse grants (trust_reuse_grant.*, trust_reuse_consent.*). Subscribe per endpoint via enabled_events — or use ["*"] to receive everything (see Webhook Endpoints).
| Event type | Trigger |
|---|---|
verification_session.created | A new verification session was created. |
verification_session.verified | The session completed successfully. |
verification_session.failed | All verification methods were exhausted. |
verification_session.cancelled | The session was cancelled. |
verification_session.expired | The session expired without completion. |
session_review.flagged | A session was routed to manual review by policy or fraud signals. |
session_review.approved | A reviewer approved a flagged session. |
session_review.rejected | A reviewer rejected a flagged session — treat it as not verified. |
session_review.escalated | A flagged session was escalated for senior review. |
trust_reuse_grant.created | A returning user reused a verification at another Stile operator. |
trust_reuse_grant.revoked | A trust-reuse grant was revoked. See Trust Reuse. |
trust_reuse_consent.revoked_by_user | A user withdrew their trust-reuse consent. |
Delivery status
pending_webhooks records how many endpoint deliveries were queued when the event was dispatched. It is retained for compatibility and does not decrement as deliveries finish.
Use delivery_summary.pending for the current number of unresolved deliveries. delivery_summary is computed from delivery records whenever you list or retrieve events. Inspect each endpoint's current delivery state with the deliveries API.
Deduplication
One event can produce multiple webhook delivery records — exactly one per subscribed endpoint. Retries update the original record rather than creating attempt-history rows. The event id is the stable identity across every endpoint delivery.
Dedupe on the event id, not the delivery id
Record processed event IDs and skip events you've already handled. Automatic retries of one
delivery keep both the event id and Stile-Webhook-Id; a second subscribed endpoint has its own
delivery record for the same event. Manual retries also reuse the original delivery record. The
event ID is therefore the stable business-level deduplication key. See handling
duplicates for a worked example.
Next steps
Webhooks guide
Set up an endpoint, handle deliveries, and understand the retry schedule.
Verify signatures
Authenticate every delivery with the Stile-Signature header before processing.
Webhook Endpoints API
Create and manage endpoints, inspect deliveries, and rotate signing secrets.
Verification Sessions API
Retrieve the current state of the session referenced by an event.