Skip to main content

Svix Stream

Svix Stream is an event streaming platform that enables services to reliably deliver events to multiple destinations through a single integrated API.

The core of Svix Stream is built on top of Streams, Events, and Sinks. Events are pushed to a Stream, and Svix will batch, transform, and dispatch the events to one or more Sinks.

stream-diagram

Streams

Streams are unbounded, append only data stores, where events are stored and processed in a stable, first-in-first-out ordering.

Creating a Stream is simple using the API:

import { Svix } from "svix";

const streamOut = await svix.stream.stream.create({
name: "My Stream",
uid: "unique-identifier"
});

The new Stream will look something like:

{
"id": "strm_31BLjHyfpwFzMmLjO0MrL",
"uid": "unique-identifier",
"name": "My Stream",
"createdAt": "2025-09-29T19:41:36.153Z",
"updatedAt": "2025-09-29T19:41:36.153Z",
"metadata": {}
}

And can be viewed in the Stream section of the Svix Dashboard.

stream-diagram

Events

With the new Stream, you can immediately start writing events.

const events = await svix.stream.events.create("stream_id", {
events: [
{
"eventType": "user.created",
"payload": "{ \"email\": \"bob@enterprise.io\" }"
},
{
"eventType": "user.login",
"payload": "{ \"id\": 12, \"timestamp\": \"2025-07-21T14:23:17.861Z\" }"
}
]
});

Events written to a Stream always contain two fields:

  • eventType - An identifier denoting the type of event being sent. (For more info, see Event Types)
  • payload - A string representing the event. Payloads will typically be JSON, though in practice they can be any format that fits your use case.

In the Stream Dashboard, you'll see the most recent events that have been sent to the Stream.

stream-recent-events

Events are persisted to the Stream for 14 days. While the Events are saved to the Stream, they'll be dispatched, in order, to one or more Sinks attached to the Stream.

Sinks

Sinks define where Events in the Stream are sent, and can be anything from an HTTP endpoint to an Object Storage bucket (S3, Google Cloud Storage, Azure Blob Storage), or even an Open Telemetry Trace collector.

When configuring Sinks, you control:

  • Which event types the Sink is subscribed to.
  • How events are batched together before dispatch.
  • Custom JavaScript transformations to modify events before delivery.

For more information on configuring Sinks, see Introduction to Sinks