Svix

Official JavaScript/TypeScript client for the Svix webhook delivery API and signature verification.

SDK
npm
v2.3.0
3,390stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
90/100Excellent
Development Activity96
Maintenance100
Community64
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
72/100Good
Architecture78
Code Quality85
Innovation70
Learning Curve55

svix is the official JavaScript/TypeScript client library for Svix, a webhooks-as-a-service platform that handles deliverability, retries, and security for outgoing webhooks on behalf of API providers. The package wraps the full Svix management API (applications, endpoints, messages, event types, ingest sources, connectors, streaming, and more) behind a single Svix client class, and separately ships a Webhook helper for verifying and signing HMAC-based webhook payloads on the receiving end using the open standardwebhooks scheme.

It is one of nine officially maintained Svix client libraries (alongside Go, Python, Java, Kotlin, Ruby, C#, Rust, and PHP) generated from a shared OpenAPI specification in the same monorepo, so its request/response shapes and behavior stay consistent across languages.

What You Get

  • A Svix client class exposing typed resource clients for applications, endpoints, messages, event types, message attempts, ingest sources/endpoints, connectors, integrations, and streaming
  • Automatic regional API routing (US/EU/IN/CA/AU) inferred from the auth token, with an override via serverUrl
  • Built-in retry with exponential backoff (or a custom retry schedule) and automatic idempotency-key generation for POST requests
  • A Webhook class for verifying inbound webhook signatures (svix-* or standard webhook-* headers) and signing outbound payloads
  • Typed error handling via ApiException<HttpErrorOut> / ApiException<HTTPValidationError> so 4xx/422 responses are structured, not opaque
  • An AutoConfig/AutoConfigConsumer helper for auto-discovering endpoint configuration

Common Use Cases

  • Adding outbound webhooks to a SaaS product without building retry/delivery/security infrastructure in-house
  • Verifying that an incoming webhook request actually came from Svix (or another standardwebhooks-compliant sender) before processing it
  • Managing per-tenant application, endpoint, and event-type configuration programmatically from a backend service
  • Building an internal dashboard or CLI on top of the Svix management API for support/ops teams
  • Ingesting third-party webhooks (Shopify, Stripe, GitHub, etc.) through Svix’s ingest sources and republishing them to internal consumers

Under The Hood

Architecture The JS/TS client lives under javascript/ in the svix-webhooks monorepo. Its entry point, src/index.ts, exports a Svix class that lazily instantiates one resource client per API area (Application, Authentication, BackgroundTask, Connector, Endpoint, Environment, EventType, Health, Ingest, Integration, Message, MessageAttempt, OperationalWebhook, Statistics, Streaming) via getters, each sharing one SvixRequestContext built in request.ts. Every request flows through a single SvixRequest builder (path/query/header/body setters) whose send() performs the fetch call, injects an auto-generated idempotency key for POSTs, retries with exponential backoff via sendWithRetry, and maps error responses through filterResponseForErrors into typed ApiExceptions. Nearly all of src/api/* and src/models/* carry a // this file is @generated header, produced by the monorepo’s shared codegen/ generator from one OpenAPI spec (codegen/lib-openapi.json) that also drives the other eight language SDKs — the genuinely hand-written surface is limited to request.ts, webhook.ts, autoconfig.ts/autoconfigConsumer.ts, and util.ts. Changing the shared SvixRequestContext/SvixRequest abstraction would ripple through every generated api/* file at once, since they all funnel through request.send().

Tech Stack The package is a TypeScript, ESM-only build (type: module, engines.node >= 22) bundled with tsdown (a Rolldown-based bundler) into dist/index.mjs, linted and formatted with Biome 2.2.4 rather than ESLint/Prettier, and typechecked with tsc --noEmit under a strict tsconfig.json. Its only runtime dependency is standardwebhooks (also maintained by Svix), which webhook.ts wraps to normalize both svix-* and generic webhook-* header names. Dev dependencies (@stablelib/utf8, fast-sha256, mockttp) are used purely for test fixtures and HTTP mocking; there is no web framework in play since this is a pure fetch-based API client.

Code Quality Tests run on Node’s built-in node:test runner with assert/strict rather than Jest or Vitest. webhook.test.ts (205 lines) exhaustively covers signature-verification edge cases — empty/undefined keys, missing headers, timestamp tolerance, multiple signature values, and both branded and unbranded header formats — alongside autoconfig.test.ts, request.test.ts, and mockttp.test.ts for HTTP-level behavior. CI (javascript-lint.yml) runs Biome checks, tsc typechecking, a build step, a guard that fails if package.json drifts from a fresh build, and the full test suite on every PR touching javascript/** or the shared OpenAPI spec. Errors are typed and explicit (ApiException<T> discriminated by HTTP status) rather than silently swallowed, and setQueryParam includes an exhaustiveness (never) check for type safety.

API Design The surface is deliberately low-friction: new Svix(token) infers the correct regional API host directly from the token’s embedded region segment, so callers on the EU/IN/CA/AU clusters don’t need to configure a base URL manually. Resource access reads naturally (svix.application.create(...), svix.endpoint.list(...)), retries and idempotency keys are handled transparently, and Webhook.verify() accepts either Svix’s own headers or the generic standardwebhooks header names so consumers of either convention integrate without translation code. Getting started is two lines end-to-end, and the same request/response shapes are generated identically across all nine officially supported language clients, which keeps cross-language migration low-cost for teams using more than one.

Used by 12 apps in this directory

TypeScript
100%
MIT

Botpress

AI Assistants · AI Development · Customer Support

14,893

The open-source hub for building and deploying LLM-powered AI agents with TypeScript-first tooling, 40+ integrations, and a revolutionary code-execution agent framework.

View details
94
Repo Health
82
Technical
64
Dependency
Built with
TypeScript100%
Updated 3 days ago
TypeScript
96%
Other

Cal.diy

Scheduling

48,218

The 100% MIT-licensed, community-driven scheduling platform — self-host your own booking infrastructure with no enterprise strings attached.

View details
95
Repo Health
86
Technical
65
Dependency
Built with
TypeScript96%
Updated yesterday
TypeScript
45%
Other

Convex Backend

Developer Tools · Databases

12,494

Open-source reactive database that lets developers build live-updating apps with pure TypeScript, strong consistency, and real-time subscriptions—no separate API layer required.

View details
87
Repo Health
82
Technical
68
Dependency
Built with
TypeScript45%
Rust43%
Updated 2 days ago
TypeScript
92%
MIT

Dittofeed

Marketing · Automation

2,926

Open-source omni-channel customer engagement platform for automating transactional and marketing messages via email, SMS, WhatsApp, Slack, and mobile push.

View details
54
Repo Health
75
Technical
62
Dependency
Built with
TypeScript92%
Updated 5 months ago
TypeScript
100%
Other

Dub

Marketing · Analytics

24,676

The open-source link attribution platform for short links, conversion tracking, and affiliate programs — powering 100M+ clicks monthly.

View details
80
Repo Health
78
Technical
62
Dependency
Built with
TypeScript100%
Updated 2 days ago
TypeScript
94%
AGPL 3.0

Laudspeaker

Marketing · Automation

2,620

Open-source customer engagement platform for building visual, event-triggered messaging journeys across email, SMS, push, in-app, and webhooks.

View details
51
Repo Health
66
Technical
62
Dependency
Built with
TypeScript94%
Updated 1 months ago
TypeScript
99%
Other

LobeHub

AI Assistants · Productivity · Automation

82,273

Your Chief Agent Operator — build, schedule, and collaborate with an entire AI team in one self-hostable workspace.

View details
92
Repo Health
81
Technical
69
Dependency
Built with
TypeScript99%
Updated today
TypeScript
98%
Other

Novu

Developer Tools

39,870

Open-source communication infrastructure that connects your products and AI agents to every channel your users live on — Inbox, Email, SMS, Push, Chat, and more.

View details
93
Repo Health
80
Technical
64
Dependency
Built with
TypeScript98%
Updated yesterday
TypeScript
88%
AGPL 3.0

OpenPanel

Analytics

6,884

Open-source Mixpanel alternative with session replay, MCP integration, and privacy-first product analytics you fully control.

View details
74
Repo Health
74
Technical
68
Dependency
Built with
TypeScript88%
Updated 3 days ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search