Streams
Create stream
Create a new append-only stream within a bucket.
PUT
Documentation Index
Fetch the complete documentation index at: https://docs.snakream.tonbo.dev/llms.txt
Use this file to discover all available pages before exploring further.
Bucket ID. Must match
[a-z0-9_-]{4,64}.Stream ID within the bucket.
Content type of the initial payload (e.g.
application/json). Becomes the stream’s content type.Set to
true to close the stream immediately after creation.Time-to-live in seconds. The stream will expire after this duration.
Absolute expiration timestamp (RFC 3339). Mutually exclusive with
Stream-TTL.Conditional create: only succeed if the stream’s ETag matches.
Client-supplied sequence token for conflict detection.
Producer identity for exactly-once writes.
Producer epoch (must accompany
Producer-Id).Producer sequence number (must accompany
Producer-Id).Optional initial payload. If provided, becomes the first entry in the stream.
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.
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.
