Svix Event API

The Event API from Svix — 2 operation(s) for event.

Operations 3

GET /api/v1/stream/{stream_id}/sink/{sink_id}/events Poller Sink Stream Events #
POST /api/v1/stream/{stream_id}/events Create Events #
GET /api/v1/stream/{stream_id}/events/latest Get Latest Stream Events #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/svix-event-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

svix-event-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Svix Event API
  description: Welcome to the Svix API documentation!
  version: 1.922.0
  x-logo:
    url: https://www.svix.com/static/img/brand-padded.svg
    altText: Svix Logo
servers:
- url: https://api.eu.svix.com
  description: The Svix EU region
- url: https://api.us.svix.com
  description: The Svix US region
- url: https://api.ca.svix.com
  description: The Svix Canada region
- url: https://api.au.svix.com
  description: The Svix Australia region
- url: https://api.in.svix.com
  description: The Svix India region
tags:
- name: Event
paths:
  /api/v1/stream/{stream_id}/sink/{sink_id}/events:
    get:
      tags:
      - Event
      summary: Poller Sink Stream Events
      description: 'Iterate over a stream of events.


        The sink must be of type `poller` to use the poller endpoint.'
      operationId: v1.streaming.events.get
      parameters:
      - in: path
        name: stream_id
        description: The Stream's ID or UID.
        required: true
        schema:
          description: The Stream's ID or UID.
          type: string
          maxLength: 60
          minLength: 1
          example: unique-identifier
        style: simple
      - in: path
        name: sink_id
        description: The StreamSink's ID or UID.
        required: true
        schema:
          description: The StreamSink's ID or UID.
          type: string
          maxLength: 60
          minLength: 1
          example: unique-identifier
        style: simple
      - in: query
        name: limit
        description: Limit the number of returned items
        schema:
          description: Limit the number of returned items
          type: integer
          format: uint64
          maximum: 250
          minimum: 1.0
        style: form
      - in: query
        name: iterator
        description: The iterator returned from a prior invocation
        schema:
          description: The iterator returned from a prior invocation
          type: string
          nullable: true
        style: form
      - in: query
        name: after
        schema:
          type: string
          format: date-time
          nullable: true
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EventStreamOut'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
      security:
      - HTTPBearer: []
      x-codeSamples:
      - lang: TypeScript
        label: JavaScript
        source: "const response = await svix.streaming.events.get(\n  \"strm_31Dc0DD72P5AddYUguyBd\",\n  \"sink_31Dc11sPYY9aLDkwPuGMa\"\n);"
      - lang: TypeScript
        label: TypeScript
        source: "const response = await svix.streaming.events.get(\n  \"strm_31Dc0DD72P5AddYUguyBd\",\n  \"sink_31Dc11sPYY9aLDkwPuGMa\"\n);"
      - lang: Python
        label: Python
        source: "response = svix.streaming.events.get(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    \"sink_31Dc11sPYY9aLDkwPuGMa\",\n)"
      - lang: Python
        label: Python (Async)
        source: "response = await svix.streaming.events.get(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    \"sink_31Dc11sPYY9aLDkwPuGMa\",\n)"
      - lang: Go
        label: Go
        source: "response, err := svix.Streaming.Events.Get(\n\tctx,\n\t\"strm_31Dc0DD72P5AddYUguyBd\",\n\t\"sink_31Dc11sPYY9aLDkwPuGMa\",\n\tnil,\n)"
      - lang: Kotlin
        label: Kotlin
        source: val response = svix.streaming.events.get("strm_31Dc0DD72P5AddYUguyBd", "sink_31Dc11sPYY9aLDkwPuGMa")
      - lang: Java
        label: Java
        source: "var response = svix.getStreaming()\n        .getEvents()\n        .get(\"strm_31Dc0DD72P5AddYUguyBd\", \"sink_31Dc11sPYY9aLDkwPuGMa\");"
      - lang: Ruby
        label: Ruby
        source: response = svix.streaming.events.get("strm_31Dc0DD72P5AddYUguyBd", "sink_31Dc11sPYY9aLDkwPuGMa")
      - lang: Rust
        label: Rust
        source: "let response = svix\n    .streaming()\n    .events()\n    .get(\n        \"strm_31Dc0DD72P5AddYUguyBd\".to_string(),\n        \"sink_31Dc11sPYY9aLDkwPuGMa\".to_string(),\n        None,\n    )\n    .await?;"
      - lang: C#
        label: C#
        source: "var response = svix.Streaming.Events.Get(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    \"sink_31Dc11sPYY9aLDkwPuGMa\"\n);"
      - lang: PHP
        label: PHP
        source: "$response = $svix->streaming->events->get(\n    \"strm_31Dc0DD72P5AddYUguyBd\",\n    \"sink_31Dc11sPYY9aLDkwPuGMa\"\n);"
      - lang: Shell
        label: CLI
        source: svix streaming events get "strm_31Dc0DD72P5AddYUguyBd" "sink_31Dc11sPYY9aLDkwPuGMa"
      - lang: Shell
        label: cURL
        source: "curl -X 'GET' \\\n  'https://api.eu.svix.com/api/v1/stream/strm_31Dc0DD72P5AddYUguyBd/sink/sink_31Dc11sPYY9aLDkwPuGMa/events' \\\n  -H 'Authorization: Bearer AUTH_TOKEN' \\\n  -H 'Accept: application/json'"
  /api/v1/stream/{stream_id}/events:
    post:
      tags:
      - Event
      summary: Create Events
      description: Creates events on the Stream.
      operationId: v1.streaming.events.create
      parameters:
      - in: path
        name: stream_id
        description: The Stream's ID or UID.
        required: true
        schema:
          description: The Stream's ID or UID.
          type: string
          maxLength: 60
          minLength: 1
          example: unique-identifier
        style: simple
      - in: header
        name: idempotency-key
        description: The request's idempotency key
        schema:
          type: string
        style: simple
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateStreamEventsIn'
        required: true
      responses:
        '202':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateStreamEventsOut'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
      security:
      - HTTPBearer: []
      x-codeSamples:
      - lang: TypeScript
        label: JavaScript
        source: "await svix.streaming.events.create(\"rock_inc_uid\", {\n  events: [\n    {\n      \"eventType\": \"user.signup\",\n      \"payload\": '{\"email\":\"test@example.com\",\"username\":\"test_user\"}'\n    }\n  ]\n});"
      - lang: TypeScript
        label: TypeScript
        source: "await svix.streaming.events.create(\"rock_inc_uid\", {\n  events: [\n    {\n      \"eventType\": \"user.signup\",\n      \"payload\": '{\"email\":\"test@example.com\",\"username\":\"test_user\"}'\n    }\n  ]\n});"
      - lang: Python
        label: Python
        source: "svix.streaming.events.create(\"rock_inc_uid\", CreateStreamEventsIn(\n  events=[\n    EventIn(\n      eventType=\"user.signup\",\n      payload='{\"email\":\"test@example.com\",\"username\":\"test_user\"}'\n    )\n  ]\n))"
      - lang: Python
        label: Python (Async)
        source: "await svix.streaming.events.create(\"rock_inc_uid\", CreateStreamEventsIn(\n  events=[\n    EventIn(\n      eventType=\"user.signup\",\n      payload='{\"email\":\"test@example.com\",\"username\":\"test_user\"}'\n    )\n  ]\n))"
      - lang: Go
        label: Go
        source: "svixClient.Streaming.Events.Create(\n  ctx,\n  \"rock_inc_uid\",\n  &svix.CreateStreamEventsIn{\n    Events: []svix.EventIn{\n      {\n        EventType: \"user.signup\",\n        Payload: \\`{\"email\":\"test@example.com\",\"username\":\"test_user\"}\\`,\n      }\n    },\n  })"
      - lang: Kotlin
        label: Kotlin
        source: "svix.streaming.events.create(\"rock_inc_uid\", CreateStreamEventsIn()\n    .events(arrayOf(\n      EventIn(\n        eventType = \"user.signup\",\n        payload = \\`{\"email\":\"test@example.com\",\"username\":\"test_user\"}\\`,\n      )\n    ))\n)"
      - lang: Java
        label: Java
        source: "svix.getStream().getEvents().create(\"rock_inc_uid\", new CreateStreamEventsIn()\n    .events(new EventIn[]{\n      new EventIn()\n        .eventType(\"user.signup\")\n        .payload(\"{\\\"email\\\":\\\"test@example.com\\\",\\\"username\\\":\\\"test_user\\\"}\")\n    })\n);"
      - lang: Ruby
        label: Ruby
        source: "svix.streaming.events.create(\"rock_inc_uid\", Svix::CreateStreamEventsIn.new({\n    \"events\": [\n      {\n        \"eventType\": \"user.signup\",\n        \"payload\": '{\"email\":\"test@example.com\",\"username\":\"test_user\"}'\n      }\n    ]\n}))"
      - lang: Rust
        label: Rust
        source: "svix.streaming().events().create(\"rock_inc_uid\", CreateStreamEventsIn {\n    events: vec![\n      EventIn {\n        event_type: \"user.signup\".into(),\n        payload: r#\"{\"email\":\"test@example.com\",\"username\":\"test_user\"}\"#.into()\n      }\n    ],\n    stream: None,\n}, None).await?;"
      - lang: PHP
        label: Php
        source: "$svix->streaming->events->create(\n  'rock_inc_uid',\n  CreateStreamEventsIn::create(\n    events: [\n      [\n        'eventType' => 'user.signup',\n        'payload' => '{\"email\":\"test@example.com\",\"username\":\"test_user\"}'\n      ]\n    ],\n  )\n);"
      - lang: C#
        label: C#
        source: "await svix.Streaming.Events.CreateAsync(\"stream_id\", new CreateStreamEventsIn{\n    events: new EventIn[] {\n      new EventIn(\n        eventType: \"user.signup\",\n        payload: \"{\\\\\"email\\\\\":\\\\\"test@example.com\\\\\",\\\\\"username\\\\\":\\\\\"test_user\\\\\"}\"\n      )\n    }\n});"
      - lang: Shell
        label: cURL
        source: "curl -X 'POST' \\\\\n  'https://api.svix.com/api/v1/stream/rock_inc_uid/events' \\\\\n  -H 'accept: application/json' \\\\\n  -H \"Authorization: Bearer \\${AUTH_TOKEN}\" \\\\\n  -H 'Content-Type: application/json' \\\\\n  -d '{\n  \"events\": [\n    {\n      \"eventType\":\"user.signup\",\n      \"payload\":\"{\\\\\"email\\\":\\\\\"test@example.com\\\\\",\\\\\"username\\\\\":\\\\\"test_user\\\\\"}\"\n    }\n  ],\n}'"
      - lang: Shell
        label: CLI
        source: Coming soon to Svix CLI
  /api/v1/stream/{stream_id}/events/latest:
    get:
      tags:
      - Event
      summary: Get Latest Stream Events
      description: Get the latest events from the stream
      operationId: v1.streaming.events.get-latest
      parameters:
      - in: path
        name: stream_id
        description: The Stream's ID or UID.
        required: true
        schema:
          description: The Stream's ID or UID.
          type: string
          maxLength: 60
          minLength: 1
          example: unique-identifier
        style: simple
      - in: query
        name: limit
        schema:
          type: integer
          format: uint64
          default: 20
          maximum: 50
          minimum: 1.0
        style: form
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LatestEventsOut'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '429':
          description: Too Many Requests
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorOut'
      security:
      - HTTPBearer: []
      x-internal: true
components:
  schemas:
    HttpErrorOut:
      title: HttpError
      type: object
      properties:
        code:
          type: string
        detail:
          type: string
      required:
      - code
      - detail
    EventOut:
      type: object
      properties:
        eventType:
          description: The event type's name
          type: string
          maxLength: 256
          pattern: ^[a-zA-Z0-9\-_.]+$
          example: user.signup
        payload:
          type: string
        timestamp:
          type: string
          format: date-time
      required:
      - eventType
      - payload
      - timestamp
    CreateStreamEventsIn:
      type: object
      properties:
        events:
          type: array
          items:
            $ref: '#/components/schemas/EventIn'
          example:
          - eventType: user.signup
            payload: '{"email":"test@example.com","username":"test_user"}'
        stream:
          description: 'Optionally creates a new Stream alongside the events.


            If the stream id or uid that is used in the path already exists, this argument is ignored.'
          $ref: '#/components/schemas/StreamIn'
          nullable: true
      required:
      - events
    LatestEventsOut:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/EventOut'
      required:
      - data
    EventStreamOut:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/EventOut'
        iterator:
          type: string
        done:
          type: boolean
      required:
      - data
      - done
      - iterator
    CreateStreamEventsOut:
      type: object
    StreamIn:
      type: object
      properties:
        name:
          description: The stream's name.
          type: string
          minLength: 1
        uid:
          description: An optional unique identifier for the stream.
          type: string
          maxLength: 60
          minLength: 1
          pattern: ^(?!strm_)[a-zA-Z0-9_-]+$
          example: unique-identifier
          nullable: true
        metadata:
          type: object
          default: {}
          additionalProperties:
            type: string
      required:
      - name
    ValidationError:
      description: Validation errors have their own schema to provide context for invalid requests eg. mismatched types and out of bounds values. There may be any number of these per 422 UNPROCESSABLE ENTITY error.
      type: object
      properties:
        loc:
          description: The location as a [`Vec`] of [`String`]s -- often in the form `["body", "field_name"]`, `["query", "field_name"]`, etc. They may, however, be arbitrarily deep.
          type: array
          items:
            type: string
        msg:
          description: The message accompanying the validation error item.
          type: string
        type:
          description: The type of error, often "type_error" or "value_error", but sometimes with more context like as "value_error.number.not_ge"
          type: string
      required:
      - loc
      - msg
      - type
    EventIn:
      type: object
      properties:
        eventType:
          description: The event type's name
          type: string
          maxLength: 256
          pattern: ^[a-zA-Z0-9\-_.]+$
          example: user.signup
        payload:
          type: string
      required:
      - eventType
      - payload
    HTTPValidationError:
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      required:
      - detail
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer
      description: HTTP Bearer token passed in the `Authorization` header
x-tagGroups:
- name: General
  tags:
  - Background Task
  - Environment
- name: Dispatch
  tags:
  - Application
  - Event Type
  - Authentication
  - Endpoint
  - Message
  - Message Attempt
  - Integration
  - Connector
- name: Stream
  tags:
  - Stream
  - Sink
  - Event
  - Stream Event Type
  - Stream Authentication
- name: Ingest
  tags:
  - Ingest Source
  - Ingest Endpoint
- name: Operational Webhooks
  tags:
  - Webhook
  - Webhook Endpoint
- name: Statistics
  tags:
  - Statistics
- name: Utility
  tags:


# --- truncated at 32 KB (32 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/svix/refs/heads/main/openapi/svix-event-api-openapi.yml