Skip to main content
POST
/
streams
Create a stream.
curl --request POST \
  --url https://{basin}.b.s2.dev/v1/streams \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "stream": "<string>"
}
'
{
  "created_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "cipher": "aegis-256",
  "deleted_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://s2.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

Stream encryption is not configured explicitly when creating a stream. A stream inherits the basin’s configured stream_cipher when it is created, and that cipher is immutable for the lifetime of the stream.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your access token.

Headers

s2-request-token
string

Client-specified request token for idempotent retries.

Maximum string length: 36

Body

application/json
stream
string
required

Stream name that is unique to the basin. It can be between 1 and 512 bytes in length.

Required string length: 1 - 512
config
object

Stream configuration.

Response

created_at
string<date-time>
required

Creation time in RFC 3339 format.

name
string
required

Stream name.

Required string length: 1 - 512
cipher
null | enum<string>

Encryption algorithm for this stream, if encryption is enabled.

Available options:
aegis-256,
aes-256-gcm
deleted_at
string<date-time> | null

Deletion time in RFC 3339 format, if the stream is being deleted.