curl -X PUT https://stream.tonbo.dev/ds/demo/hello
curl -X PUT https://stream.tonbo.dev/ds/demo/hello \
-H 'Content-Type: application/json' \
--data-binary '{"msg": "first entry"}'
curl -X PUT https://stream.tonbo.dev/ds/demo/ephemeral \
-H 'Stream-TTL: 3600'
Streams
Create stream
Create a new append-only stream within a bucket.
PUT
/
ds
/
{bucket}
/
{stream}
curl -X PUT https://stream.tonbo.dev/ds/demo/hello
curl -X PUT https://stream.tonbo.dev/ds/demo/hello \
-H 'Content-Type: application/json' \
--data-binary '{"msg": "first entry"}'
curl -X PUT https://stream.tonbo.dev/ds/demo/ephemeral \
-H 'Stream-TTL: 3600'
Content type of the initial payload (e.g.
application/json). Becomes the stream’s content type.Producer identity for exactly-once writes.
Response
| Status | Meaning |
|---|---|
201 | Stream created. |
200 | Stream already exists with identical configuration (idempotent). |
400 | Invalid stream ID, invalid headers, or bad JSON payload. |
404 | Bucket not found. |
409 | Stream already exists with different configuration, or sequence conflict. |
412 | If-Match precondition failed. |
Location, Content-Type, Stream-Next-Offset, and ETag.
curl -X PUT https://stream.tonbo.dev/ds/demo/hello
curl -X PUT https://stream.tonbo.dev/ds/demo/hello \
-H 'Content-Type: application/json' \
--data-binary '{"msg": "first entry"}'
curl -X PUT https://stream.tonbo.dev/ds/demo/ephemeral \
-H 'Stream-TTL: 3600'
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.
