Chronicle Labs API is currently in beta. Reach out for access
API REFERENCE
Sources
Register custom source adapters, discover providers, and browse event catalogs.
npm install @chronicle-labs/sdkEndpoints
| Method | Path | Status |
|---|---|---|
POST | /v1/sources | Beta |
GET | /v1/sources | Beta |
GET | /v1/sources/{id} | Beta |
GET | /v1/sources/{id}/catalog | Beta |
Register a source
Register a custom source so Chronicle can receive webhooks for it and categorize ingested events. The source ID you choose becomes the webhook path segment and the value you pass as source when ingesting events.
tenant_idstringrequiredTenant namespace. The source is scoped to this tenant.
idstringrequiredUnique slug for the source (lowercase, no spaces). Used in webhook URL and event source field.
namestringrequiredHuman-readable display name.
descriptionstringShort description of what this source provides.
webhook_secretstringSigning secret for verifying inbound webhooks. If omitted, signature verification is skipped.
signature_schemeenumOne of "hmac-sha1" or "hmac-sha256". Defaults to "hmac-sha256".
event_typesobject[]Pre-declare event types this source will emit. Each object has event_type, description, and category.
const source = await chronicle.sources.create({
tenant_id: "tenant_demo",
id: "my_crm",
name: "My CRM",
description: "Internal CRM system events",
webhook_secret: "whsec_abc123",
signature_scheme: "hmac-sha256",
event_types: [
{ event_type: "crm.contact_created", description: "New contact added", category: "contact" },
{ event_type: "crm.deal_closed", description: "Deal moved to closed-won", category: "deal" },
],
});{
"id": "my_crm",
"tenant_id": "tenant_demo",
"name": "My CRM",
"description": "Internal CRM system events",
"version": "1.0.0",
"capabilities": { "webhook": true },
"webhook_url": "https://api.chronicle-labs.dev/v1/webhooks/my_crm",
"event_types_count": 2
}List sources
Returns all registered source adapters for a tenant.
tenant_idstringrequiredTenant namespace.
limitintegerMax sources to return (default 25, max 1000).
offsetintegerNumber of results to skip (default 0).
const sources = await chronicle.sources.list({ tenant_id: "tenant_demo" });{
"sources": [
{ "id": "intercom", "name": "Intercom", "description": "Intercom conversation events", "version": "1.0.0", "capabilities": { "webhook": true } }
],
"count": 1,
"has_more": false
}Retrieve a source
Fetch full details for a single source including its manifest and capabilities.
tenant_idstringrequiredTenant namespace (query param).
const source = await chronicle.sources.retrieve("intercom", { tenant_id: "tenant_demo" });{
"manifest": {
"id": "intercom",
"name": "Intercom",
"description": "Intercom conversation events",
"version": "1.0.0",
"capabilities": { "webhook": true },
"event_catalog": []
}
}Get source catalog
Returns event types Chronicle understands for a source, with PII field metadata.
tenant_idstringrequiredTenant namespace (query param).
const catalog = await chronicle.sources.catalog("intercom", { tenant_id: "tenant_demo" });{
"source_id": "intercom",
"events": [
{ "event_type": "support.message.customer", "source_topic": "conversation.user.created", "description": "Customer sent a message", "category": "message", "pii_fields": ["payload.body"] }
]
}