Hooksbase SDKs
Hooksbase ships one first-party SDK today: @hooksbase/sdk for
TypeScript and modern JavaScript runtimes. Everything else in the docs should be
read as raw HTTP guidance or language-specific reference snippets, not as
first-party maintained clients.
Available through
The TypeScript SDK is the only first-party SDK today. Other language examples are raw HTTP guidance.
TypeScript SDK
PreferredUse @hooksbase/sdk for Node.js and TypeScript integrations.
Public API
AvailableUse raw HTTP for browser/raw surfaces such as form ingest and for any public route outside package scope.
CLI
AvailableUse the CLI when the workflow is terminal-driven rather than embedded in code.
Dashboard
Not applicableDashboard workflows are not SDK capabilities.
Client surfaces
TypeScript SDK
The first-party client for project APIs, Automations, ingest publishing, pagination helpers, and signature verification.
CLI
The first-party command-line surface for profiles, webhooks, Automations, deliveries, replay, DLQ, schedules, event drains, operator alerting, files, and ingest sends.
Raw HTTP
Use cURL or your own client for browser/raw surfaces, non-TypeScript runtimes, and HTTP-level contract checks.
Language snippets
Python, Ruby, Go, and PHP examples in these docs are reference snippets, not first-party client libraries.
TypeScript SDK
The SDK covers the core Public API routes and helper flows:
client.projects—getCurrent(),update()client.apiKeys—list(),create(),get(),revoke(),rotate()client.auditLogs—list(),get()client.httpPacks—list()client.templates—list()client.webhooks—list(),get(),create(),update(), destination helpers, routing helpers, transform helpers,listDeliveries(), metrics, backlog, email allowlists,testDelivery(),pause(),resume(),archive(),restore(),destroy(),rotateIngestSecret(),rotateSigningSecret(),listSecretVersions()client.automations—list(),create(),get(),update(), version helpers, lifecycle helpers, test runs, webhook binding helpers, and Enterprise egress attachmentclient.automationRuns—list(),get(),getLogs(),getEgressEvents(),export()client.automationTemplates,client.automationQuotas,client.automationBillingUsage, andclient.automationEgressPoliciesclient.schedules—list(),create(),pause(),resume(),delete()client.deliveries—list(),get(),replay(),listReplayJobs(),bulkReplay()client.replayJobs—get()client.bulkOperations—get()client.dlq—list(),get(),redrive(),export(),bulkRedrive()client.usage—get({ from, to, webhookId? })client.eventDrains—list(),create(),get(),update(),pause(),resume(),delete()client.files—downloadSignedUrl(),downloadDeliveryFile()client.operatorWebhooks,client.alertChannels,client.alertRules, andclient.operatorIncidentsfor operator alertingclient.ingest—publishJson(),publishBytes(),publishJsonByWebhookName(),publishBytesByWebhookName()verifyHooksbaseWebhook()for outbound signature verificationpaginateCursor()andtakePages()for cursor pagination- typed errors such as
HooksbaseApiError,HooksbaseAuthError,HooksbaseRateLimitError,HooksbaseNetworkError, andHooksbaseTimeoutError
Create a client
import { createHooksbaseClient } from '@hooksbase/sdk'
const client = createHooksbaseClient({
apiKey: process.env.HOOKSBASE_API_KEY,
})
createHooksbaseClient() accepts:
apiKey— project API key (swk_...)baseUrl— defaults tohttps://api.hooksbase.comtimeoutMs— per-request timeout, defaults to10000retryCount— idempotent retry count on transient failures, defaults to2userAgent— optional override for the outboundUser-Agentheaderfetch— optionalfetchimplementation for testing or non-standard runtimes
Create an Automation with Code Mode
const created = await client.automations.create({
webhookId: 'wh_123',
name: 'Normalize agent event',
type: 'transform',
})
await client.automations.createVersion(created.automation.id, {
code: 'export async function run(input) { return { type: "dispatch", body: input.source.payload } }',
})
await client.automations.test(created.automation.id, {
payload: { provider: 'stripe', type: 'invoice.payment_failed' },
waitForSettlementMs: 3000,
})
Raw and dashboard-only surfaces
Form ingest remains browser/raw HTTP only: use GET/POST /v1/form/{publicId}
directly when embedding public forms. The SDK also does not wrap
session-authenticated dashboard workflows such as project creation, team
invites, billing checkout, onboarding wizard state, or browser-only UI traffic.
See raw HTTP examples when you need copy-ready HTTP requests for the underlying routes, even when an SDK helper also exists.
Common mistakes
- Treating Python, Ruby, Go, or PHP snippets in the docs as official SDKs.
- Assuming the SDK wraps dashboard-only product flows. The dashboard is a UI and is not exposed as a public API surface.
- Expecting form-ingest-specific helpers. Form ingest is intentionally browser or raw HTTP today.
- Using raw HTTP examples from old docs that still reference removed prefixes
instead of current
swk_...andwhsec_...values. - Assuming SDK coverage and public API coverage are the same. Check the Public API reference and this page together.
What is Hooksbase?
Hooksbase is event infrastructure for AI agents. It ingests events over four channels — HTTP, email, HTML form, and scheduled cron — verifies them, routes them by rule, runs versioned Automations in the event path, and delivers them to HTTP and cloud destinations (AWS SQS, AWS EventBridge, GCP Pub/Sub, and S3-compatible storage) with retries, strict ordering, Standard Webhooks-compatible signing, deterministic replay, and a dead-letter path. It is a hosted service, runs on Cloudflare Workers, is operated at hooksbase.com, and is not affiliated with — and shares no code or ownership with — other similarly named webhook, hook, or tunnelling tools.