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

# Create or update a stream

`PUT /storage/streams/{name}`

## Request

- Base URL: `https://api.quiva.ai`
- URL: `https://api.quiva.ai/storage/streams/{name}`
- Auth: one of:
  - HTTP bearer
  - API key in header `x-api-key`
- TypeScript: <https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-5/docs/storage/streams/:name/put.ts> (a function with typed inputs; its response is checked against the schema)

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

## Changes

- **2025-07-04** `d566a61279be`: 26 warning, 8 info
  - the `max_bytes` request property's min was set to `1.00`
  - the `max_msg_size` request property's min was set to `1.00`
  - the `max_msgs` request property's min was set to `1.00`
  - removed the request property `allow_direct`
  - …30 more
- **2025-06-13** `e4ad9e1ccd66`: 5 warning, 2 info
  - removed the optional property `cluster` from the response with the `200` status
  - removed the optional property `config` from the response with the `200` status
  - removed the optional property `created` from the response with the `200` status
  - removed the optional property `state` from the response with the `200` status
  - …3 more
- **2025-05-22** `72fe48f81978`: 2 breaking, 2 info
  - the response's body type changed from no type to `object` for status `400`
  - the response's body type changed from no type to `object` for status `401`
  - added the optional property `error` to the response with the `400` status
  - added the optional property `error` to the response with the `401` status

[Operation history](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-5/changes/storage/streams/:name/put.md)

---

[API](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-5.md) - [All operations](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-5/llms.txt) - [OpenAPI document](https://skmtc.dev/quivaworks/apis/quiva-ai-gateway-5/revisions/104591eadd10?raw)
