Chronicle Labs API is currently in beta. Reach out for access
SECURITY
Authentication
Authenticate every request with a bearer API key. Use idempotency keys to make write retries safe.
Install
npm install @chronicle-labs/sdkSDK generation in progress - until published, Node 18+ fetch works with no extra dependencies.
API keys
Chronicle issues two key types. Use test keys with the sandbox base URL and live keys with production.
- ck_test_... - sandbox traffic only.
- ck_live_... - production traffic only.
Node
JS
import { Chronicle } from "@chronicle-labs/sdk";
const chronicle = new Chronicle({
apiKey: process.env.CHRONICLE_API_KEY,
});Idempotency
For POST endpoints, include an Idempotency-Key header so Chronicle can deduplicate retries. If the same key is sent again, the original response is returned without reprocessing.
Node
JS
await chronicle.events.create(
{ source: "custom_app", source_event_id: "evt_abc", /* ... */ },
{ idempotencyKey: "evt_unique_abc123" },
);Authentication errors
- 401 Unauthorized - missing or invalid API key.
- 403 Forbidden - valid key but lacking tenant/resource permission.