Skip to main content

Event Types

Just like Svix Webhooks, each event sent through Svix Stream has an associated event type. Event types are identifiers denoting the type of event being sent, and are primarily used by Sinks to filter on events.

Event types are just a string, for example: user.signup, invoice.paid and workflow.completed.

You can see all of your environment's Stream Event Types under the "Event Types" tab in the Stream Dashboard.

stream-recent-events

You can create event types in the Stream Dashboard, or via the API.

import { Svix } from "svix";

const streamEventTypeOut = await svix.stream.eventType.create({
name: "user.signup",
description: null,
featureFlags: ["cool-new-feature"]
});

Event Type Filtering

When creating a Sink, you can optionally specify which event types the Sink should filter on.

In this example, the Google Cloud Storage sink will only receive events with the event type user.created or user.login.

stream-recent-events

If no event types are selected when creating a Sink, the Sink will receive all events, regardless of the event type.