---
title: "Create or update a stream"
method: PUT
path: "/storage/streams/{name}"
tags: ["Streams"]
---

# Create or update a stream

`PUT /storage/streams/{name}`

Creates a new stream or updates an existing stream with the provided configuration. If the stream does not exist, it will be created. If it exists, it will be updated with the new configuration.

Note that some properties cannot be changed after a stream is created, such as the storage type. If you attempt to change these properties, the request will fail with a 400 error.

## Path parameters

- `name` string, required

## Request body

- UpdateStreamRequest
  - `description` string — Updated description of the stream
  - `max_msgs` integer — Updated maximum number of messages
  - `max_bytes` integer — Updated maximum size in bytes
  - `max_msg_size` integer — Updated maximum message size in bytes

## Response `200`

Bad Request

- SuccessMessage
  - `message` string

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/quivaworks/apis/quiva-ai-gateway-5.md) · [All operations](https://skmtc.net/quivaworks/apis/quiva-ai-gateway-5/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/quivaworks/quiva-ai-gateway-5/revisions/072de10ada5e/schema)
