Skip to content

sessions_append

POST
/sessions/{id}/events
curl --request POST \
--url https://api.canopyhq.dev/sessions/000000000000000000000000000000000000000000000000000000000000000000000000/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '[ { "body": "example", "kind": { "name": "example", "version": 1 } } ]'
id
required

A stream id: 72 hex chars, the shard then the owner digest.

string

The session to land on.

Media typeapplication/json
Array<object>

A record as a client offers it over the wire: kind and body, nothing the door or the log stamps.

object
body
required
kind
required
object
name
required
string
version
required
integer format: int32
Examplegenerated
[
{
"body": "example",
"kind": {
"name": "example",
"version": 1
}
}
]

The landed envelopes, including each record cursor.

Media typeapplication/json
Array<object>

The envelope: the only surface the filter is evaluated on. Trellis never reads beneath it.

object
at
required

Unix milliseconds, minted with the cursor at the single point of intake.

integer format: int64
cursor
required

Monotonic per-stream position, minted at the single point of intake. Producers never carry or assert one.

integer format: int64
idem
One of:
null
kind
required

A kind string and the version of its body, one unit.

object
name
required
string
version
required
integer format: int32
producer
required

Who landed a record. Asserted on the offer, checked by the write clause.

string
size
required
integer format: int32
stream
required

A stream id: 72 hex chars, the shard then the owner digest.

string
to
One of:
null
Example
[
{
"stream": "000000000000000000000000000000000000000000000000000000000000000000000000"
}
]

A malformed body, or a kind that is not well formed; parse errors identify the field and reason when available.

No session token, or one that did not verify.

The token does not attach, or the filter refused a record.

No such session.

The session is archived, or the token’s key already holds a different record.