stile
HTTP API

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
  }
}
ParameterTypeDescription
idstringUnique event identifier (evt_...). Stable across webhook retries — deduplicate on this value.
objectstringAlways "event".
typestringThe event type, e.g. "verification_session.verified". See the full catalog below.
creatednumberUnix timestamp (seconds) when the event was created.
pending_webhooksnumberNumber of webhook deliveries for this event not yet acknowledged with a 2xx. See below.
dataobjectA 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

GET/v1/events/:id
curl 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 object

List events

GET/v1/events

Returns a paginated list of events. Filter by type, time window, or session to reconcile your records against what Stile recorded.

ParameterTypeDescription
limitnumber= 10Number of events to return. Between 1 and 100.
starting_afterstringEvent ID cursor for pagination.
typestringFilter by event type (e.g. "verification_session.verified").
created_afternumberUnix timestamp. Only return events created after this time.
created_beforenumberUnix timestamp. Only return events created before this time.
session_idstringFilter 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 typeTrigger
verification_session.createdA new verification session was created.
verification_session.verifiedThe session completed successfully.
verification_session.failedAll verification methods were exhausted.
verification_session.cancelledThe session was cancelled.
verification_session.expiredThe session expired without completion.
session_review.flaggedA verified session was flagged for manual review by fraud signals.
session_review.approvedA reviewer approved a flagged session.
session_review.rejectedA reviewer rejected a flagged session — treat it as not verified.
session_review.escalatedA flagged session was escalated for senior review.
trust_reuse_grant.createdA returning user reused a verification at another Stile operator.
trust_reuse_grant.revokedA trust-reuse grant was revoked. See Trust Reuse.
trust_reuse_consent.revoked_by_userA 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

On this page