openapi: 3.1.0
info:
title: Svix Application Stream API
description: 'Welcome to the Svix API documentation!
Useful links: [Homepage](https://www.svix.com) | [Support email](mailto:support+docs@svix.com) | [Blog](https://www.svix.com/blog/) | [Slack Community](https://www.svix.com/slack/)
# Introduction
This is the reference documentation and schemas for the [Svix webhook service](https://www.svix.com) API. For tutorials and other documentation please refer to [the documentation](https://docs.svix.com).
## Main concepts
In Svix you have four important entities you will be interacting with:
- `messages`: these are the webhooks being sent. They can have contents and a few other properties.
- `application`: this is where `messages` are sent to. Usually you want to create one application for each user on your platform.
- `endpoint`: endpoints are the URLs messages will be sent to. Each application can have multiple `endpoints` and each message sent to that application will be sent to all of them (unless they are not subscribed to the sent event type).
- `event-type`: event types are identifiers denoting the type of the message being sent. Event types are primarily used to decide which events are sent to which endpoint.
## Authentication
Get your authentication token (`AUTH_TOKEN`) from the [Svix dashboard](https://dashboard.svix.com) and use it as part of the `Authorization` header as such: `Authorization: Bearer ${AUTH_TOKEN}`. For more information on authentication, please refer to the [authentication token docs](https://docs.svix.com/api-keys).
<SecurityDefinitions />
## Code samples
The code samples assume you already have the respective libraries installed and you know how to use them. For the latest information on how to do that, please refer to [the documentation](https://docs.svix.com/).
## Idempotency
Svix supports [idempotency](https://en.wikipedia.org/wiki/Idempotence) for safely retrying requests without accidentally performing the same operation twice. This is useful when an API call is disrupted in transit and you do not receive a response.
To perform an idempotent request, pass the idempotency key in the `Idempotency-Key` header to the request. The idempotency key should be a unique value generated by the client. You can create the key in however way you like, though we suggest using UUID v4, or any other string with enough entropy to avoid collisions. Your idempotency key should not begin with the string `auto_`, which is reserved for internal use by the client libraries.
Svix''s idempotency works by saving the resulting status code and body of the first request made for any given idempotency key for any successful request. Subsequent requests with the same key return the same result for a period of up to 12 hours.
Please note that idempotency is only supported for `POST` requests.
## Cross-Origin Resource Sharing
This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). And that allows cross-domain communication from the browser. All responses have a wildcard same-origin which makes them completely public and accessible to everyone, including any code on any site.
'
version: 1.84.0
x-logo:
altText: Svix Logo
url: https://www.svix.com/static/img/brand-padded.svg
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: Stream
paths:
/api/v1/stream:
get:
tags:
- Stream
summary: List Streams
description: List of all the organization's streams.
operationId: v1.streaming.stream.list
parameters:
- 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.0
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
maxLength: 27
minLength: 26
pattern: ^strm_[A-Za-z0-9]{21,22}$
nullable: true
example: strm_2yZwUhtgs5Ai8T9yRQJXA
style: form
- in: query
name: order
description: The sorting order of the returned items
schema:
description: The sorting order of the returned items
$ref: '#/components/schemas/Ordering'
nullable: true
style: form
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/ListResponse_StreamOut_'
'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:
- label: JavaScript
lang: TypeScript
source: const response = await svix.streaming.stream.list();
- label: TypeScript
lang: TypeScript
source: const response = await svix.streaming.stream.list();
- label: Python
lang: Python
source: response = svix.streaming.stream.list()
- label: Python (Async)
lang: Python
source: response = await svix.streaming.stream.list()
- label: Go
lang: Go
source: response, err := svix.Streaming.Stream.List(ctx, nil)
- label: Kotlin
lang: Kotlin
source: val response = svix.streaming.stream.list()
- label: Java
lang: Java
source: var response = svix.getStreaming().getStream().list();
- label: Ruby
lang: Ruby
source: response = svix.streaming.stream.list
- label: Rust
lang: Rust
source: let response = svix.streaming().stream().list(None).await?;
- label: C#
lang: C#
source: var response = svix.Streaming.Stream.List();
- label: PHP
lang: PHP
source: $response = $svix->streaming->stream->list();
- label: CLI
lang: Shell
source: svix streaming stream list
- label: cURL
lang: Shell
source: "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stream' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json'"
post:
tags:
- Stream
summary: Create Stream
description: Creates a new stream.
operationId: v1.streaming.stream.create
parameters:
- in: header
name: idempotency-key
description: The request's idempotency key
schema:
type: string
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/StreamIn'
required: true
responses:
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/StreamOut'
'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:
- label: JavaScript
lang: TypeScript
source: "const response = await svix.streaming.stream.create({\n metadata: {},\n name: \"sample string\",\n uid: \"unique-identifier\",\n});"
- label: TypeScript
lang: TypeScript
source: "const response = await svix.streaming.stream.create({\n metadata: {},\n name: \"sample string\",\n uid: \"unique-identifier\",\n});"
- label: Python
lang: Python
source: "response = svix.streaming.stream.create(\n StreamIn(\n metadata={},\n name=\"sample string\",\n uid=\"unique-identifier\",\n ),\n)"
- label: Python (Async)
lang: Python
source: "response = await svix.streaming.stream.create(\n StreamIn(\n metadata={},\n name=\"sample string\",\n uid=\"unique-identifier\",\n ),\n)"
- label: Go
lang: Go
source: "response, err := svix.Streaming.Stream.Create(\n\tctx,\n\tStreamIn{Metadata: nil, Name: \"sample string\", Uid: new(\"unique-identifier\")},\n\tnil,\n)"
- label: Kotlin
lang: Kotlin
source: "val response =\n svix.streaming.stream.create(\n StreamIn(metadata = mapOf(), name = \"sample string\", uid = \"unique-identifier\")\n )"
- label: Java
lang: Java
source: "var response = svix.getStreaming()\n .getStream()\n .create(new StreamIn().metadata(Map.of()).name(\"sample string\").uid(\"unique-identifier\"));"
- label: Ruby
lang: Ruby
source: 'response = svix.streaming.stream.create({metadata: {}, name: "sample string", uid: "unique-identifier"})'
- label: Rust
lang: Rust
source: "let response = svix\n .streaming()\n .stream()\n .create(\n StreamIn {\n metadata: Some(HashMap::new()),\n name: \"sample string\".to_string(),\n uid: Some(\"unique-identifier\".to_string()),\n },\n None,\n )\n .await?;"
- label: C#
lang: C#
source: "var response = svix.Streaming.Stream.Create(\n new StreamIn\n {\n Metadata = [],\n Name = \"sample string\",\n Uid = \"unique-identifier\",\n }\n);"
- label: PHP
lang: PHP
source: "$response = $svix->streaming->stream->create(\n StreamIn::create(\n name: \"sample string\"\n )\n ->withMetadata([])\n ->withUid(\"unique-identifier\")\n);"
- label: CLI
lang: Shell
source: "svix streaming stream create '{\n \"metadata\": {},\n \"name\": \"sample string\",\n \"uid\": \"unique-identifier\"\n }'"
- label: cURL
lang: Shell
source: "curl -X 'POST' \\\n 'https://api.eu.svix.com/api/v1/stream' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"metadata\": {},\n \"name\": \"sample string\",\n \"uid\": \"unique-identifier\"\n }'"
/api/v1/stream/{stream_id}:
get:
tags:
- Stream
summary: Get Stream
description: Get a stream by id or uid.
operationId: v1.streaming.stream.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
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/StreamOut'
'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:
- label: JavaScript
lang: TypeScript
source: const response = await svix.streaming.stream.get("strm_31Dc0DD72P5AddYUguyBd");
- label: TypeScript
lang: TypeScript
source: const response = await svix.streaming.stream.get("strm_31Dc0DD72P5AddYUguyBd");
- label: Python
lang: Python
source: "response = svix.streaming.stream.get(\n \"strm_31Dc0DD72P5AddYUguyBd\",\n)"
- label: Python (Async)
lang: Python
source: "response = await svix.streaming.stream.get(\n \"strm_31Dc0DD72P5AddYUguyBd\",\n)"
- label: Go
lang: Go
source: response, err := svix.Streaming.Stream.Get(ctx, "strm_31Dc0DD72P5AddYUguyBd")
- label: Kotlin
lang: Kotlin
source: val response = svix.streaming.stream.get("strm_31Dc0DD72P5AddYUguyBd")
- label: Java
lang: Java
source: var response = svix.getStreaming().getStream().get("strm_31Dc0DD72P5AddYUguyBd");
- label: Ruby
lang: Ruby
source: response = svix.streaming.stream.get("strm_31Dc0DD72P5AddYUguyBd")
- label: Rust
lang: Rust
source: "let response = svix\n .streaming()\n .stream()\n .get(\"strm_31Dc0DD72P5AddYUguyBd\".to_string())\n .await?;"
- label: C#
lang: C#
source: var response = svix.Streaming.Stream.Get("strm_31Dc0DD72P5AddYUguyBd");
- label: PHP
lang: PHP
source: "$response = $svix->streaming->stream->get(\n \"strm_31Dc0DD72P5AddYUguyBd\"\n);"
- label: CLI
lang: Shell
source: svix streaming stream get "strm_31Dc0DD72P5AddYUguyBd"
- label: cURL
lang: Shell
source: "curl -X 'GET' \\\n 'https://api.eu.svix.com/api/v1/stream/strm_31Dc0DD72P5AddYUguyBd' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json'"
put:
tags:
- Stream
summary: Update Stream
description: Update a stream.
operationId: v1.streaming.stream.update
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
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/StreamIn'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/StreamOut'
'201':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/StreamOut'
'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:
- label: JavaScript
lang: TypeScript
source: "const response = await svix.streaming.stream.update(\"strm_31Dc0DD72P5AddYUguyBd\", {\n metadata: {},\n name: \"sample string\",\n uid: \"unique-identifier\",\n});"
- label: TypeScript
lang: TypeScript
source: "const response = await svix.streaming.stream.update(\"strm_31Dc0DD72P5AddYUguyBd\", {\n metadata: {},\n name: \"sample string\",\n uid: \"unique-identifier\",\n});"
- label: Python
lang: Python
source: "response = svix.streaming.stream.update(\n \"strm_31Dc0DD72P5AddYUguyBd\",\n StreamIn(\n metadata={},\n name=\"sample string\",\n uid=\"unique-identifier\",\n ),\n)"
- label: Python (Async)
lang: Python
source: "response = await svix.streaming.stream.update(\n \"strm_31Dc0DD72P5AddYUguyBd\",\n StreamIn(\n metadata={},\n name=\"sample string\",\n uid=\"unique-identifier\",\n ),\n)"
- label: Go
lang: Go
source: "response, err := svix.Streaming.Stream.Update(\n\tctx,\n\t\"strm_31Dc0DD72P5AddYUguyBd\",\n\tStreamIn{Metadata: nil, Name: \"sample string\", Uid: new(\"unique-identifier\")},\n)"
- label: Kotlin
lang: Kotlin
source: "val response =\n svix.streaming.stream.update(\n \"strm_31Dc0DD72P5AddYUguyBd\",\n StreamIn(metadata = mapOf(), name = \"sample string\", uid = \"unique-identifier\"),\n )"
- label: Java
lang: Java
source: "var response = svix.getStreaming()\n .getStream()\n .update(\n \"strm_31Dc0DD72P5AddYUguyBd\",\n new StreamIn().metadata(Map.of()).name(\"sample string\").uid(\"unique-identifier\"));"
- label: Ruby
lang: Ruby
source: "response = svix\n .streaming\n .stream\n .update(\"strm_31Dc0DD72P5AddYUguyBd\", {metadata: {}, name: \"sample string\", uid: \"unique-identifier\"})"
- label: Rust
lang: Rust
source: "let response = svix\n .streaming()\n .stream()\n .update(\n \"strm_31Dc0DD72P5AddYUguyBd\".to_string(),\n StreamIn {\n metadata: Some(HashMap::new()),\n name: \"sample string\".to_string(),\n uid: Some(\"unique-identifier\".to_string()),\n },\n )\n .await?;"
- label: C#
lang: C#
source: "var response = svix.Streaming.Stream.Update(\n \"strm_31Dc0DD72P5AddYUguyBd\",\n new StreamIn\n {\n Metadata = [],\n Name = \"sample string\",\n Uid = \"unique-identifier\",\n }\n);"
- label: PHP
lang: PHP
source: "$response = $svix->streaming->stream->update(\n \"strm_31Dc0DD72P5AddYUguyBd\",\n StreamIn::create(\n name: \"sample string\"\n )\n ->withMetadata([])\n ->withUid(\"unique-identifier\")\n);"
- label: CLI
lang: Shell
source: "svix streaming stream update \"strm_31Dc0DD72P5AddYUguyBd\" '{\n \"metadata\": {},\n \"name\": \"sample string\",\n \"uid\": \"unique-identifier\"\n }'"
- label: cURL
lang: Shell
source: "curl -X 'PUT' \\\n 'https://api.eu.svix.com/api/v1/stream/strm_31Dc0DD72P5AddYUguyBd' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"metadata\": {},\n \"name\": \"sample string\",\n \"uid\": \"unique-identifier\"\n }'"
delete:
tags:
- Stream
summary: Delete Stream
description: Delete a stream.
operationId: v1.streaming.stream.delete
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
responses:
'204':
description: no content
'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:
- label: JavaScript
lang: TypeScript
source: await svix.streaming.stream.delete("strm_31Dc0DD72P5AddYUguyBd");
- label: TypeScript
lang: TypeScript
source: await svix.streaming.stream.delete("strm_31Dc0DD72P5AddYUguyBd");
- label: Python
lang: Python
source: "svix.streaming.stream.delete(\n \"strm_31Dc0DD72P5AddYUguyBd\",\n)"
- label: Python (Async)
lang: Python
source: "await svix.streaming.stream.delete(\n \"strm_31Dc0DD72P5AddYUguyBd\",\n)"
- label: Go
lang: Go
source: err := svix.Streaming.Stream.Delete(ctx, "strm_31Dc0DD72P5AddYUguyBd")
- label: Kotlin
lang: Kotlin
source: "svix.streaming.stream.delete(\n \"strm_31Dc0DD72P5AddYUguyBd\"\n)"
- label: Java
lang: Java
source: svix.getStreaming().getStream().delete("strm_31Dc0DD72P5AddYUguyBd");
- label: Ruby
lang: Ruby
source: response = svix.streaming.stream.delete("strm_31Dc0DD72P5AddYUguyBd")
- label: Rust
lang: Rust
source: svix.streaming().stream().delete("strm_31Dc0DD72P5AddYUguyBd".to_string()).await?;
- label: C#
lang: C#
source: var response = svix.Streaming.Stream.Delete("strm_31Dc0DD72P5AddYUguyBd");
- label: PHP
lang: PHP
source: "$svix->streaming->stream->delete(\n \"strm_31Dc0DD72P5AddYUguyBd\"\n);"
- label: CLI
lang: Shell
source: svix streaming stream delete "strm_31Dc0DD72P5AddYUguyBd"
- label: cURL
lang: Shell
source: "curl -X 'DELETE' \\\n 'https://api.eu.svix.com/api/v1/stream/strm_31Dc0DD72P5AddYUguyBd' \\\n -H 'Authorization: Bearer AUTH_TOKEN'"
patch:
tags:
- Stream
summary: Patch Stream
description: Partially update a stream.
operationId: v1.streaming.stream.patch
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
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/StreamPatch'
required: true
responses:
'200':
description: ''
content:
application/json:
schema:
$ref: '#/components/schemas/StreamOut'
'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:
- label: JavaScript
lang: TypeScript
source: "const response = await svix.streaming.stream.patch(\"strm_31Dc0DD72P5AddYUguyBd\", {\n description: \"sample string\",\n metadata: {},\n uid: \"unique-identifier\",\n});"
- label: TypeScript
lang: TypeScript
source: "const response = await svix.streaming.stream.patch(\"strm_31Dc0DD72P5AddYUguyBd\", {\n description: \"sample string\",\n metadata: {},\n uid: \"unique-identifier\",\n});"
- label: Python
lang: Python
source: "response = svix.streaming.stream.patch(\n \"strm_31Dc0DD72P5AddYUguyBd\",\n StreamPatch(\n description=\"sample string\",\n metadata={},\n uid=\"unique-identifier\",\n ),\n)"
- label: Python (Async)
lang: Python
source: "response = await svix.streaming.stream.patch(\n \"strm_31Dc0DD72P5AddYUguyBd\",\n StreamPatch(\n description=\"sample string\",\n metadata={},\n uid=\"unique-identifier\",\n ),\n)"
- label: Go
lang: Go
source: "response, err := svix.Streaming.Stream.Patch(\n\tctx,\n\t\"strm_31Dc0DD72P5AddYUguyBd\",\n\tStreamPatch{\n\t\tDescription: new(\"sample string\"),\n\t\tMetadata: nil,\n\t\tUid: NewNullable(\"unique-identifier\"),\n\t},\n)"
- label: Kotlin
lang: Kotlin
source: "val response =\n svix.streaming.stream.patch(\n \"strm_31Dc0DD72P5AddYUguyBd\",\n StreamPatch(\n description = \"sample string\",\n metadata = mapOf(),\n uid = MaybeUnset.Present(\"unique-identifier\"),\n ),\n )"
- label: Java
lang: Java
source: "var response = svix.getStreaming()\n .getStream()\n .patch(\n \"strm_31Dc0DD72P5AddYUguyBd\",\n new StreamPatch()\n .description(\"sample string\")\n .metadata(Map.of())\n .uid(\"unique-identifier\"));"
- label: Ruby
lang: Ruby
source: "response = svix\n .streaming\n .stream\n .patch(\"strm_31Dc0DD72P5AddYUguyBd\", {description: \"sample string\", metadata: {}, uid: \"unique-identifier\"})"
- label: Rust
lang: Rust
source: "let response = svix\n .streaming()\n .stream()\n .patch(\n \"strm_31Dc0DD72P5AddYUguyBd\".to_string(),\n StreamPatch {\n description: Some(\"sample string\".to_string()),\n metadata: Some(HashMap::new()),\n uid: js_option::JsOption::Some(\"unique-identifier\".to_string()),\n },\n )\n .await?;"
- label: C#
lang: C#
source: "var response = svix.Streaming.Stream.Patch(\n \"strm_31Dc0DD72P5AddYUguyBd\",\n new StreamPatch\n {\n Description = \"sample string\",\n Metadata = [],\n Uid = \"unique-identifier\",\n }\n);"
- label: PHP
lang: PHP
source: "$response = $svix->streaming->stream->patch(\n \"strm_31Dc0DD72P5AddYUguyBd\",\n StreamPatch::create()\n ->withDescription(\"sample string\")\n ->withMetadata([])\n ->withUid(\"unique-identifier\")\n);"
- label: CLI
lang: Shell
source: "svix streaming stream patch \"strm_31Dc0DD72P5AddYUguyBd\" '{\n \"description\": \"sample string\",\n \"metadata\": {},\n \"uid\": \"unique-identifier\"\n }'"
- label: cURL
lang: Shell
source: "curl -X 'PATCH' \\\n 'https://api.eu.svix.com/api/v1/stream/strm_31Dc0DD72P5AddYUguyBd' \\\n -H 'Authorization: Bearer AUTH_TOKEN' \\\n -H 'Accept: application/json' \\\n -H 'Content-Type: application/json' \\\n -d '{\n \"description\": \"sample string\",\n \"metadata\": {},\n \"uid\": \"unique-identifier\"\n }'"
components:
schemas:
HTTPValidationError:
type: object
required:
- detail
properties:
detail:
type: array
items:
$ref: '#/components/schemas/ValidationError'
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
# --- truncated at 32 KB (49 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/svix/refs/heads/main/openapi/svix-stream-api-openapi.yml