Skip to main content
A thread session object is an append-only stream of structured items. The envelope marks the object as a thread and holds optional metadata about it; items themselves live in a separate store with their own read/write commands.

Envelope

Upload a thread envelope with upload_session_object, setting value.type to "thread":
The thread object inside value carries two optional sub-fields: The envelope is read back as-is via download_session_object. No items are included in that response — items are fetched exclusively through the thread item commands.

Thread Items

Each item posted to a thread has the following shape:

Content Blocks

Each entry in content is an object with a type discriminator: Items are immutable once posted. There is no per-item update or delete command. To remove all items, delete the envelope — this cascades and removes every item in the thread.

Operations

All three commands require the alias of the thread envelope. If the envelope does not exist or its value.type is not "thread", the server returns invalid_thread_envelope.

Events

After each post_session_thread_item call the server emits a session_thread_item_posted event:
Listeners can use item_id together with created_since in list_session_thread_items to fetch only new items since the last known position.

See also