Skip to main content
PUT
/
ds
/
{bucket}
/
{stream}
curl -X PUT https://stream.tonbo.dev/ds/demo/hello
bucket
string
required
Bucket ID. Must match [a-z0-9_-]{4,64}.
stream
string
required
Stream ID within the bucket.
Content-Type
string
Content type of the initial payload (e.g. application/json). Becomes the stream’s content type.
Stream-Closed
string
Set to true to close the stream immediately after creation.
Stream-TTL
string
Time-to-live in seconds. The stream will expire after this duration.
Stream-Expires-At
string
Absolute expiration timestamp (RFC 3339). Mutually exclusive with Stream-TTL.
If-Match
string
Conditional create — only succeed if the stream’s ETag matches.
Stream-Seq
string
Client-supplied sequence token for conflict detection.
Producer-Id
string
Producer identity for exactly-once writes.
Producer-Epoch
string
Producer epoch (must accompany Producer-Id).
Producer-Seq
string
Producer sequence number (must accompany Producer-Id).
body
binary
Optional initial payload. If provided, becomes the first entry in the stream.

Response

StatusMeaning
201Stream created.
200Stream already exists with identical configuration (idempotent).
400Invalid stream ID, invalid headers, or bad JSON payload.
404Bucket not found.
409Stream already exists with different configuration, or sequence conflict.
412If-Match precondition failed.
Response headers include Location, Content-Type, Stream-Next-Offset, and ETag.
curl -X PUT https://stream.tonbo.dev/ds/demo/hello
If a stream with the same ID already exists and has identical configuration, the response is 200 OK (idempotent). If the existing stream differs in content type, closed state, or retention, the response is 409 Conflict.