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/:idcurl 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 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. |
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 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.