Events
Events record every significant change in your Stile account — the same objects delivered to your webhook endpoints.
Every time something significant happens — a session is verified, a review is resolved, a trust-reuse grant changes — Stile creates an event. Webhook deliveries POST these same event objects to your endpoints; the Events API lets you retrieve and list them on demand. 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. You can also use the Node.js SDK as a typed convenience wrapper.
The event object
{
"id": "evt_abc123",
"object": "event",
"type": "verification_session.verified",
"created": 1741564800,
"pending_webhooks": 0,
"data": {
"id": "vks_xyz789",
"object": "verification_session",
"status": "verified",
"type": "identity",
"client_reference_id": "user_123",
"expires_at": 1741651200,
"completed_at": 1741564800,
"created": 1741561200
}
}| 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. |
created | number | Unix timestamp (seconds) when the event was created. |
pending_webhooks | number | Number of webhook deliveries for this event not yet acknowledged with a 2xx. See below. |
data | object | A snapshot of the verification session at the time the event was created — not a live reference. Retrieve the session for its current state. |
Events are snapshots
The data payload reflects the session as it was when the event fired. If you need the current
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); // The verification session objectList 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 | Event ID cursor for pagination. |
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. |
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 verified session was flagged for manual review by 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. |
Pending webhooks
The pending_webhooks field indicates how many webhook deliveries are still queued for this event. Once all subscribed endpoints have acknowledged the delivery (HTTP 2xx), it drops to 0. Endpoints with delivery failures continue retrying on the automatic schedule — see retry behavior in the Webhooks guide.
A non-zero pending_webhooks on an older event is a useful health signal: it means at least one of your endpoints hasn't accepted the delivery yet. Inspect the failing deliveries via the deliveries API.
Deduplication
One event can produce multiple webhook deliveries — one per subscribed endpoint, plus retries after failures. The event id is the stable identity across all of them.
Dedupe on the event id, not the delivery id
Retries reuse the same event id but arrive with a new delivery ID in the Stile-Webhook-Id
header. Record processed event IDs and skip events you've already handled — 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.
Webhook Endpoints
Register, manage, and debug the HTTPS endpoints that receive Stile's signed event notifications.
Check compliance requirements GET
Returns regulatory details for one or more use cases in a jurisdiction, plus a most-restrictive merged summary. No request body; all parameters are query strings.