stile
HTTP API

Events

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

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",
  "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
curl https://api.stile.dev/v1/events/evt_abc123 \
  -H "Authorization: Bearer vk_test_..."
import requests

res = requests.get(
    "https://api.stile.dev/v1/events/evt_abc123",
    headers={"Authorization": "Bearer vk_test_..."},
)
event = res.json()
print(event["type"])  # "verification_session.verified"
req, _ := http.NewRequest("GET", "https://api.stile.dev/v1/events/evt_abc123", nil)
req.Header.Set("Authorization", "Bearer vk_test_...")
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
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.dev/v1/events?limit=50" \
  -H "Authorization: Bearer vk_test_..."
import requests

res = requests.get(
    "https://api.stile.dev/v1/events",
    headers={"Authorization": "Bearer vk_test_..."},
    params={"limit": 50},
)
data = res.json()
req, _ := http.NewRequest("GET", "https://api.stile.dev/v1/events?limit=50", nil)
req.Header.Set("Authorization", "Bearer vk_test_...")
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

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