stile
API Reference

Events

Events record every significant action in your stile account. They are the source of truth for webhook deliveries.

All examples on this page assume you've initialized the Node.js SDK. See Installation for setup.

The event object

{
  "id": "evt_abc123",
  "object": "event",
  "type": "verification_session.verified",
  "livemode": false,
  "created": 1741564800,
  "pending_webhooks": 0,
  "data": {
    "id": "vks_xyz789",
    "object": "verification_session",
    "status": "verified",
    "type": "identity",
    "client_reference_id": "user_123",
    "livemode": false,
    "expires_at": 1741651200,
    "completed_at": 1741564800,
    "created": 1741561200
  }
}

Retrieve an event

GET/v1/events/:id
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
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.
const { data } = await stile.events.list({ limit: 50 });

for (const event of data) {
  console.log(event.type, event.created);
}

Event types

Event typeTrigger
verification_session.createdA new verification session was created.
verification_session.processingA verification method started processing.
verification_session.requires_inputA method requires additional user input.
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.

Pending webhooks

The pending_webhooks field indicates how many webhook deliveries are still queued for this event. Once all endpoints have acknowledged the delivery (HTTP 2xx), this drops to 0. Events with delivery failures will continue retrying — see the Webhooks guide for retry behavior.

On this page