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/:idconst event = await stile.events.retrieve("evt_abc123");
console.log(event.type); // "verification_session.verified"
console.log(event.data); // The verification session objectList events
GET
/v1/events| 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. |
const { data } = await stile.events.list({ limit: 50 });
for (const event of data) {
console.log(event.type, event.created);
}Event types
| Event type | Trigger |
|---|---|
verification_session.created | A new verification session was created. |
verification_session.processing | A verification method started processing. |
verification_session.requires_input | A method requires additional user input. |
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. |
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.