OneOS Docs
Genesis 0.3.1 Console

API reference

Tides

Live collaboration: shared rooms where people and agents edit together, presence, members, activity and saved versions.

Operations
26
Base path
https://os.one.ml/api/v1/tides
Scopes
tides:read tides:write
API keys
—
SDK
genesis.call('tides_activity', …) · helpers under genesis.tides
CLI
genesis tides
MCP
25 tools; the other 1 through genesis_call

Operations

OperationEndpointAPI key
The activity log across rooms (a project, a subject or the whole org)GET/activity—
Who is live across rooms (a project, a subject or the whole org)GET/presence—
List the rooms the caller can read, newest firstGET/rooms—
Create a roomPOST/rooms—
Get a roomGET/rooms/{room}—
Move a room to the trashDELETE/rooms/{room}—
Rename a room, change its access or metadataPATCH/rooms/{room}—
A room's activity log, newest first (people and agents)GET/rooms/{room}/activity—
Edit a room's document with plain edits (the agent path)POST/rooms/{room}/edit—
Export everything you may take out of a roomGET/rooms/{room}/export—
Join a room (stream URLs, cursor and the caller's perms)POST/rooms/{room}/join—
List a room's grants, including revoked onesGET/rooms/{room}/members—
Grant a principal perms in a room (replaces its previous perms)PUT/rooms/{room}/members/{principal}—
Revoke a principal from a roomDELETE/rooms/{room}/members/{principal}—
Replay a room's ops after a cursor, or wait for the next onesGET/rooms/{room}/ops—
Append one op (a Yjs update, or opaque bytes)POST/rooms/{room}/ops—
Who is in a room nowGET/rooms/{room}/presence—
Set the caller's presence (a heartbeat with state)POST/rooms/{room}/presence—
Restore a trashed roomPOST/rooms/{room}/restore—
List a room's versions, newest firstGET/rooms/{room}/snapshots—
Save a named version of the room's documentPOST/rooms/{room}/snapshots—
Get a version, optionally renderedGET/rooms/{room}/snapshots/{snapshot}—
Bring the document back to a versionPOST/rooms/{room}/snapshots/{snapshot}/restore—
Read a room's documentGET/rooms/{room}/state—
Follow a room live (server-sent events)GET/rooms/{room}/stream—
The verified caller and how its ops are attributedGET/whoami—

Activity

The activity log across rooms (a project, a subject or the whole org)

GET/v1/tides/activity

tides:readtides_activity

Scope tides:read. The same log as tides_room_activity over every room the caller can read, filtered by project or subject, newest first, with room_name on each entry and the 24-hour actors summary. This is what a dashboard shows for a project: what people and agents did, where, and on whose behalf.

Parameters

  • project_idquery · string
  • subject_typequery · "document" | "project" | "org" | "thread" | "task" | "meeting" | "other"
  • subject_idquery · string
  • beforequery · string (date-time)

    The next_before of the previous page

  • limitquery · integer
  • typequery · "op" | "event"

Responses

  • 200A page of activity
    Response fields
    • dataobject[]required
    • data[].[].type"op" | "event"
    • data[].[].room_idstring
    • data[].[].room_namestring | null
    • data[].[].kindstring

      op: update, edit, restore; event: room.created, room.updated, room.trashed, room.restored, member.granted, member.revoked, snapshot.created

    • data[].[].seqinteger
    • data[].[].cursorstring
    • data[].[].actor_kind"human" | "agent" | "key"
    • data[].[].actor_idstring
    • data[].[].actor_didstring | null
    • data[].[].on_behalf_ofstring | null
    • data[].[].viastring
    • data[].[].bytesinteger
    • data[].[].detailobject
    • data[].[].created_atstring (date-time)
    • next_beforestring | null
    • actorsobject[]
    • actors[].[].actor_kindstring
    • actors[].[].actor_idstring
    • actors[].[].actor_didstring | null
    • actors[].[].on_behalf_ofstring | null
    • actors[].[].ops_24hinteger
    • actors[].[].last_atstring (date-time)
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 422invalid, unknown_root, invalid_content, invalid_update or out_of_range
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/tides/activity" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

A room's activity log, newest first (people and agents)

GET/v1/tides/rooms/{room}/activity

tides:readtides_room_activity

Scope tides:read. Ops (who, on whose behalf, how, how many bytes; never the bytes) merged with room events (room.created, room.updated, room.trashed, room.restored, member.granted, member.revoked, snapshot.created), plus actors: who was active in the last 24 hours with their op counts. Page with next_before.

Parameters

  • roompath · stringrequired
  • beforequery · string (date-time)

    The next_before of the previous page

  • limitquery · integer
  • typequery · "op" | "event"

Responses

  • 200A page of activity
    Response fields
    • dataobject[]required
    • data[].[].type"op" | "event"
    • data[].[].room_idstring
    • data[].[].room_namestring | null
    • data[].[].kindstring

      op: update, edit, restore; event: room.created, room.updated, room.trashed, room.restored, member.granted, member.revoked, snapshot.created

    • data[].[].seqinteger
    • data[].[].cursorstring
    • data[].[].actor_kind"human" | "agent" | "key"
    • data[].[].actor_idstring
    • data[].[].actor_didstring | null
    • data[].[].on_behalf_ofstring | null
    • data[].[].viastring
    • data[].[].bytesinteger
    • data[].[].detailobject
    • data[].[].created_atstring (date-time)
    • next_beforestring | null
    • actorsobject[]
    • actors[].[].actor_kindstring
    • actors[].[].actor_idstring
    • actors[].[].actor_didstring | null
    • actors[].[].on_behalf_ofstring | null
    • actors[].[].ops_24hinteger
    • actors[].[].last_atstring (date-time)
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 422invalid, unknown_root, invalid_content, invalid_update or out_of_range
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/tides/rooms/$ROOM/activity" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Presence

Who is live across rooms (a project, a subject or the whole org)

GET/v1/tides/presence

tides:readtides_presence_across

Scope tides:read. Live presence in each room the caller can read (and may see presence in), grouped by room, plus actors: each person or agent once, with the rooms they are in.

Parameters

  • project_idquery · string
  • subject_typequery · "document" | "project" | "org" | "thread" | "task" | "meeting" | "other"
  • subject_idquery · string

Responses

  • 200Live presence by room
    Response fields
    • dataobject[]
    • data[].[].room_idstring
    • data[].[].namestring
    • data[].[].presenceobject[]
    • data[].[].presence[].[].conn_idstring
    • data[].[].presence[].[].actor_kind"human" | "agent" | "key"
    • data[].[].presence[].[].actor_idstring
    • data[].[].presence[].[].actor_didstring | null
    • data[].[].presence[].[].on_behalf_ofstring | null
    • data[].[].presence[].[].display_namestring | null
    • data[].[].presence[].[].stateobject
    • data[].[].presence[].[].expires_atstring (date-time)
    • actorsobject[]
    • actors[].[].actor_kind"human" | "agent" | "key"
    • actors[].[].actor_idstring
    • actors[].[].actor_didstring | null
    • actors[].[].on_behalf_ofstring | null
    • actors[].[].roomsstring[]
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 422invalid, unknown_root, invalid_content, invalid_update or out_of_range
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/tides/presence" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Who is in a room now

GET/v1/tides/rooms/{room}/presence

tides:readtides_presence_list

Scope tides:read and the room's presence perm. One entry per live lease, people and agents alike.

Parameters

  • roompath · stringrequired

Responses

  • 200Live presence
    Response fields
    • dataobject[]required
    • data[].[].conn_idstring
    • data[].[].actor_kind"human" | "agent" | "key"
    • data[].[].actor_idstring
    • data[].[].actor_didstring | null
    • data[].[].on_behalf_ofstring | null
    • data[].[].display_namestring | null
    • data[].[].stateobject
    • data[].[].expires_atstring (date-time)
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/tides/rooms/$ROOM/presence" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Set the caller's presence (a heartbeat with state)

POST/v1/tides/rooms/{room}/presence

tides:readtides_presence_set

Scope tides:write and the room's presence perm. Up to 2 KB of state (status, cursor, selection, focus) for ttl seconds (up to 300). With the conn_id from tides_join each connection has its own lease; without it, one lease per actor. Open streams get the new list.

Parameters

  • roompath · stringrequired
  • asquery · "one"

    one shows a person session's writes as One's (actor agent one:<person> on behalf of the person); person sessions only

Request body application/json

  • stateobject

    e.g. {"status": "editing", "cursor": 42, "focus": "shapes/s1"}

  • ttlinteger

    min 1 · max 300 · default 30

  • conn_idstring

    pattern ^tc_[a-z2-7]{26}$

  • display_namestring

    max length 80

Responses

  • 200The lease
    Response fields
    • conn_idstring
    • actor_kind"human" | "agent" | "key"
    • actor_idstring
    • actor_didstring | null
    • on_behalf_ofstring | null
    • display_namestring | null
    • stateobject
    • expires_atstring (date-time)
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 422invalid, unknown_root, invalid_content, invalid_update or out_of_range
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/tides/rooms/$ROOM/presence" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Rooms

List the rooms the caller can read, newest first

GET/v1/tides/rooms

tides:readtides_rooms_list

Scope tides:read. Each room with its head_seq, size_bytes, live presence_count and the caller's perms. Pass next_after back as after for the next page.

Parameters

  • project_idquery · string
  • limitquery · integer
  • afterquery · string
  • deletedquery · boolean

    true lists the trash (30 days)

  • subject_typequery · "document" | "project" | "org" | "thread" | "task" | "meeting" | "other"
  • subject_idquery · string

Responses

  • 200A page of rooms
    Response fields
    • dataobject[]required
    • data[].[].idstring

      pattern ^tr_[a-z2-7]{26}$

    • data[].[].object"tides.room"
    • data[].[].namestring
    • data[].[].protocol"yjs-v1-text" | "yjs-v1-doc" | "opaque-v1"
    • data[].[].schemastring | null
    • data[].[].access"org" | "project" | "members"
    • data[].[].subjectobject | null
    • data[].[].history"compact" | "full"
    • data[].[].project_idstring
    • data[].[].environment"sandbox" | "live"
    • data[].[].metadataobject
    • data[].[].head_seqinteger
    • data[].[].cursorstring
    • data[].[].size_bytesinteger
    • data[].[].ops_bytesinteger
    • data[].[].presence_countinteger
    • data[].[].perms"read" | "write" | "presence" | "admin"[]
    • data[].[].created_bystring
    • data[].[].created_by_kindstring
    • data[].[].created_atstring (date-time)
    • data[].[].updated_atstring (date-time)
    • data[].[].deleted_atstring | null (date-time)
    • data[].[].versioninteger
    • has_moreboolean
    • next_afterstring | null
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 422invalid, unknown_root, invalid_content, invalid_update or out_of_range
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/tides/rooms" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Create a room

POST/v1/tides/rooms

tides:writetides_rooms_create

Scope tides:write. The protocol (and schema) never change afterwards. The creator becomes the room's admin. The room goes to the selected project, or project_id (which must match a selected project). An org has at most 500 rooms per environment (409 room_limit). With an idempotency_key, a retry returns the same room (200) instead of a new one (201).

Request body application/json

  • namestringrequired

    min length 1 · max length 200

  • protocol"yjs-v1-text" | "yjs-v1-doc" | "opaque-v1"

    default "yjs-v1-text"

  • schema"canvas.v1" | "prose.v1" | "blocks.v1"

    Required for yjs-v1-doc rooms

  • access"org" | "project" | "members"

    project needs a selected project or project_id default "org"

  • subjectobject

    What the room is the live space of

  • subject.type"document" | "project" | "org" | "thread" | "task" | "meeting" | "other"required
  • subject.idstring | null

    pattern ^[A-Za-z0-9][A-Za-z0-9_:.@-]{0,127}$

  • history"compact" | "full"

    default "compact"

  • metadataobject
  • project_idstring

    pattern ^pr_[A-Za-z0-9_-]{1,128}$

  • idempotency_keystring

    min length 8 · max length 128 · pattern ^[A-Za-z0-9_.:-]{8,128}$

Responses

  • 200The room an earlier request with this key created
    Response fields
    • idstring

      pattern ^tr_[a-z2-7]{26}$

    • object"tides.room"
    • namestring
    • protocol"yjs-v1-text" | "yjs-v1-doc" | "opaque-v1"
    • schemastring | null
    • access"org" | "project" | "members"
    • subjectobject | null
    • history"compact" | "full"
    • project_idstring
    • environment"sandbox" | "live"
    • metadataobject
    • head_seqinteger
    • cursorstring
    • size_bytesinteger
    • ops_bytesinteger
    • presence_countinteger
    • perms"read" | "write" | "presence" | "admin"[]
    • created_bystring
    • created_by_kindstring
    • created_atstring (date-time)
    • updated_atstring (date-time)
    • deleted_atstring | null (date-time)
    • versioninteger
  • 201The new room
    Response fields
    • idstring

      pattern ^tr_[a-z2-7]{26}$

    • object"tides.room"
    • namestring
    • protocol"yjs-v1-text" | "yjs-v1-doc" | "opaque-v1"
    • schemastring | null
    • access"org" | "project" | "members"
    • subjectobject | null
    • history"compact" | "full"
    • project_idstring
    • environment"sandbox" | "live"
    • metadataobject
    • head_seqinteger
    • cursorstring
    • size_bytesinteger
    • ops_bytesinteger
    • presence_countinteger
    • perms"read" | "write" | "presence" | "admin"[]
    • created_bystring
    • created_by_kindstring
    • created_atstring (date-time)
    • updated_atstring (date-time)
    • deleted_atstring | null (date-time)
    • versioninteger
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 409idempotency_conflict, protocol_mismatch, missing_dependencies, find_not_found, room_limit or socket_unavailable
  • 413op_too_large (over 256 KiB), room_full (64 MiB) or a body over the limit
  • 422invalid, unknown_root, invalid_content, invalid_update or out_of_range
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/tides/rooms" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string"
  }'

Get a room

GET/v1/tides/rooms/{room}

tides:readtides_rooms_get

Scope tides:read.

Parameters

  • roompath · stringrequired

Responses

  • 200The room
    Response fields
    • idstring

      pattern ^tr_[a-z2-7]{26}$

    • object"tides.room"
    • namestring
    • protocol"yjs-v1-text" | "yjs-v1-doc" | "opaque-v1"
    • schemastring | null
    • access"org" | "project" | "members"
    • subjectobject | null
    • history"compact" | "full"
    • project_idstring
    • environment"sandbox" | "live"
    • metadataobject
    • head_seqinteger
    • cursorstring
    • size_bytesinteger
    • ops_bytesinteger
    • presence_countinteger
    • perms"read" | "write" | "presence" | "admin"[]
    • created_bystring
    • created_by_kindstring
    • created_atstring (date-time)
    • updated_atstring (date-time)
    • deleted_atstring | null (date-time)
    • versioninteger
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/tides/rooms/$ROOM" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Move a room to the trash

DELETE/v1/tides/rooms/{room}

tides:writetides_rooms_delete

Scope tides:write and the room's admin perm. The room leaves every list and its streams end; restore it within 30 days with tides_rooms_restore.

Parameters

  • roompath · stringrequired

Responses

  • 200The trashed room
    Response fields
    • idstring

      pattern ^tr_[a-z2-7]{26}$

    • object"tides.room"
    • namestring
    • protocol"yjs-v1-text" | "yjs-v1-doc" | "opaque-v1"
    • schemastring | null
    • access"org" | "project" | "members"
    • subjectobject | null
    • history"compact" | "full"
    • project_idstring
    • environment"sandbox" | "live"
    • metadataobject
    • head_seqinteger
    • cursorstring
    • size_bytesinteger
    • ops_bytesinteger
    • presence_countinteger
    • perms"read" | "write" | "presence" | "admin"[]
    • created_bystring
    • created_by_kindstring
    • created_atstring (date-time)
    • updated_atstring (date-time)
    • deleted_atstring | null (date-time)
    • versioninteger
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/tides/rooms/$ROOM" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Rename a room, change its access or metadata

PATCH/v1/tides/rooms/{room}

tides:writetides_rooms_update

Scope tides:write and the room's admin perm. The protocol and schema cannot change (422). Changing access re-checks every open stream.

Parameters

  • roompath · stringrequired

Request body application/json

  • namestring

    min length 1 · max length 200

  • access"org" | "project" | "members"
  • metadataobject

Responses

  • 200The room
    Response fields
    • idstring

      pattern ^tr_[a-z2-7]{26}$

    • object"tides.room"
    • namestring
    • protocol"yjs-v1-text" | "yjs-v1-doc" | "opaque-v1"
    • schemastring | null
    • access"org" | "project" | "members"
    • subjectobject | null
    • history"compact" | "full"
    • project_idstring
    • environment"sandbox" | "live"
    • metadataobject
    • head_seqinteger
    • cursorstring
    • size_bytesinteger
    • ops_bytesinteger
    • presence_countinteger
    • perms"read" | "write" | "presence" | "admin"[]
    • created_bystring
    • created_by_kindstring
    • created_atstring (date-time)
    • updated_atstring (date-time)
    • deleted_atstring | null (date-time)
    • versioninteger
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 422invalid, unknown_root, invalid_content, invalid_update or out_of_range
  • 4xx 5xxThe error envelope.
curl -X PATCH "https://os.one.ml/api/v1/tides/rooms/$ROOM" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Edit

Edit a room's document with plain edits (the agent path)

POST/v1/tides/rooms/{room}/edit

tides:writetides_edit

Scope tides:write and the room's write perm; meters tides.ops. Tides turns the edits into one CRDT update, so people's open editors merge it live. Positions (at, len) count Unicode code points. target is a root (text, prosemirror, meta, shapes, ...) or a path into a map (shapes/s1). Text and rich-text targets take insert, delete, replace (the nth occurrence of find) and append (rich text: blank-line separated paragraphs, a leading # makes a heading); maps take set and delete_key. In a blocks.v1 room, target blocks takes insert_block (id, type, text, checked, after: a block id, null for the top, left out for the end), set_block, move_block, delete_block, append and replace (across blocks); a block's own text is blocks/<id>/text. With base_cursor (the cursor of the state you read) positions are read against that version and carried onto edits made since. All edits apply or none do. An edit that changes nothing appends no op (applied: false).

Parameters

  • roompath · stringrequired
  • asquery · "one"

    one shows a person session's writes as One's (actor agent one:<person> on behalf of the person); person sessions only

Request body application/json

  • targetstring

    A root or a map path, e.g. text, prosemirror, meta, shapes/s1 default "text"

  • opsobject[]required
  • ops[].[].op"insert" | "delete" | "replace" | "append" | "set" | "delete_key" | "insert_block" | "set_block" | "move_block" | "delete_block"required
  • ops[].[].atinteger

    insert, delete: code-point position min 0

  • ops[].[].leninteger

    delete: code points min 0

  • ops[].[].textstring

    insert, append max length 65536

  • ops[].[].findstring

    replace min length 1 · max length 65536

  • ops[].[].withstring

    replace max length 65536

  • ops[].[].occurrenceinteger

    replace: which match, from 1 min 1

  • ops[].[].keystring

    set, delete_key pattern ^[A-Za-z0-9_.:-]{1,128}$

  • ops[].[].idstring

    *_block: the block id pattern ^[A-Za-z0-9_-]{1,80}$

  • ops[].[].typestring

    insert_block, set_block: paragraph, heading_1, heading_2, heading_3, bulleted_list_item, numbered_list_item, to_do, quote, code pattern ^[a-z][a-z0-9_]{0,39}$

  • ops[].[].checkedboolean

    insert_block, set_block: a to_do's state

  • ops[].[].afterstring | null

    insert_block, move_block: the block to follow; null for the top; left out for the end

  • ops[].[].valueany

    set: any JSON value up to 64 KiB

  • base_cursorstring

    The cursor of the state the positions were read from

  • idempotency_keystringrequired

    min length 8 · max length 128 · pattern ^[A-Za-z0-9_.:-]{8,128}$

Responses

  • 200The op an earlier request with this key appended, or nothing changed
    Response fields
    • seqinteger
    • cursorstring
    • replayedboolean
    • appliedboolean
  • 201The new op
    Response fields
    • seqinteger
    • cursorstring
    • replayedboolean
    • appliedboolean
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 409idempotency_conflict, protocol_mismatch, missing_dependencies, find_not_found, room_limit or socket_unavailable
  • 413op_too_large (over 256 KiB), room_full (64 MiB) or a body over the limit
  • 422invalid, unknown_root, invalid_content, invalid_update or out_of_range
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/tides/rooms/$ROOM/edit" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "ops": [
      {
        "op": "insert"
      }
    ],
    "idempotency_key": "string"
  }'

Export

Export everything you may take out of a room

GET/v1/tides/rooms/{room}/export

tides:readtides_rooms_export

Scope tides:read. The room, its document (the Yjs state, and Markdown and JSON renderings), its named versions with their content, its full activity log and, for the room's admins, its members. People keep what they make (CURRENT rule 11).

Parameters

  • roompath · stringrequired

Responses

  • 200The export
    Response fields
    • object"tides.export"
    • exported_atstring (date-time)
    • roomobject
    • room.idstring

      pattern ^tr_[a-z2-7]{26}$

    • room.object"tides.room"
    • room.namestring
    • room.protocol"yjs-v1-text" | "yjs-v1-doc" | "opaque-v1"
    • room.schemastring | null
    • room.access"org" | "project" | "members"
    • room.subjectobject | null
    • room.history"compact" | "full"
    • room.project_idstring
    • room.environment"sandbox" | "live"
    • room.metadataobject
    • room.head_seqinteger
    • room.cursorstring
    • room.size_bytesinteger
    • room.ops_bytesinteger
    • room.presence_countinteger
    • room.perms"read" | "write" | "presence" | "admin"[]
    • room.created_bystring
    • room.created_by_kindstring
    • room.created_atstring (date-time)
    • room.updated_atstring (date-time)
    • room.deleted_atstring | null (date-time)
    • room.versioninteger
    • documentobject | null
    • document.cursorstring
    • document.yjsstring
    • document.markdownstring
    • document.jsonobject
    • versionsobject[]
    • versions[].[].idstring
    • versions[].[].object"tides.snapshot"
    • versions[].[].room_idstring
    • versions[].[].seqinteger
    • versions[].[].cursorstring
    • versions[].[].kind"named" | "auto"
    • versions[].[].labelstring | null
    • versions[].[].bytesinteger
    • versions[].[].created_bystring
    • versions[].[].created_atstring (date-time)
    • versions[].[].formatstring
    • versions[].[].statestring
    • versions[].[].contentany
    • activityobject[]
    • membersobject[]
    • members[].[].principalstring
    • members[].[].kind"human" | "agent" | "key"
    • members[].[].role"owner" | "editor" | "viewer" | null
    • members[].[].perms"read" | "write" | "presence" | "admin"[]
    • members[].[].granted_bystring
    • members[].[].granted_atstring (date-time)
    • members[].[].revoked_atstring | null (date-time)
    • members[].[].revoked_at_seqinteger | null
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/tides/rooms/$ROOM/export" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Join

Join a room (stream URLs, cursor and the caller's perms)

POST/v1/tides/rooms/{room}/join

tides:readtides_join

Scope tides:read. Returns the connection id, the head cursor, the stream, state and presence URLs, and how the caller's ops will be attributed. want: socket returns a single-use 60-second ticket for the low-latency socket once it is enabled; until then it is a 409 socket_unavailable and the stream is the way in.

Parameters

  • roompath · stringrequired
  • asquery · "one"

    one shows a person session's writes as One's (actor agent one:<person> on behalf of the person); person sessions only

Request body application/json

  • want"sse" | "socket"

    default "sse"

  • resumestring

    pattern ^tc_[a-z2-7]{26}$

Responses

  • 200How to follow the room
    Response fields
    • room_idstring

      pattern ^tr_[a-z2-7]{26}$

    • conn_idstring

      pattern ^tc_[a-z2-7]{26}$

    • actorobject
    • actor.kind"human" | "agent" | "key"
    • actor.idstring
    • actor.on_behalf_ofstring | null
    • actor.via"session" | "key" | "delegation" | "agent" | "one"
    • perms"read" | "write" | "presence" | "admin"[]
    • protocolstring
    • schemastring | null
    • cursorstring
    • sse_urlstring (uri)
    • state_urlstring (uri)
    • presence_urlstring (uri)
    • socket_urlstring (uri)
    • ticketstring

      Single use, 60 s; send as Sec-WebSocket-Protocol "ticket.<ticket>"

    • expires_atstring (date-time)
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 409idempotency_conflict, protocol_mismatch, missing_dependencies, find_not_found, room_limit or socket_unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/tides/rooms/$ROOM/join" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Members

List a room's grants, including revoked ones

GET/v1/tides/rooms/{room}/members

tides:readtides_members_list

Scope tides:read and the room's admin perm.

Parameters

  • roompath · stringrequired

Responses

  • 200The grants
    Response fields
    • dataobject[]required
    • data[].[].principalstring
    • data[].[].kind"human" | "agent" | "key"
    • data[].[].role"owner" | "editor" | "viewer" | null
    • data[].[].perms"read" | "write" | "presence" | "admin"[]
    • data[].[].granted_bystring
    • data[].[].granted_atstring (date-time)
    • data[].[].revoked_atstring | null (date-time)
    • data[].[].revoked_at_seqinteger | null
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/tides/rooms/$ROOM/members" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Grant a principal perms in a room (replaces its previous perms)

PUT/v1/tides/rooms/{room}/members/{principal}

tides:writetides_members_grant

Scope tides:write and the room's admin perm. Send a role (owner = all four perms, editor = read, write, presence, viewer = read, presence) or explicit perms; read is always included. The principal is a person (h_), an agent (a_, or an OpenAgentID DID did:oas:…, matched against an agent token's gateway-signed DID) or a key. Each perm still needs the principal's own scope: read and presence need tides:read, write and admin need tides:write.

Parameters

  • roompath · stringrequired
  • principalpath · stringrequired

    A person (h_), an agent (a_ or an OpenAgentID did:oas:…) or a key id

Request body application/json

  • role"owner" | "editor" | "viewer"

    Or perms; not both

  • perms"read" | "write" | "presence" | "admin"[]
  • kind"human" | "agent" | "key"

    Inferred from the id prefix (h_, a_, key_) when left out

Responses

  • 200The grant
    Response fields
    • principalstring
    • kind"human" | "agent" | "key"
    • role"owner" | "editor" | "viewer" | null
    • perms"read" | "write" | "presence" | "admin"[]
    • granted_bystring
    • granted_atstring (date-time)
    • revoked_atstring | null (date-time)
    • revoked_at_seqinteger | null
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 422invalid, unknown_root, invalid_content, invalid_update or out_of_range
  • 4xx 5xxThe error envelope.
curl -X PUT "https://os.one.ml/api/v1/tides/rooms/$ROOM/members/$PRINCIPAL" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Revoke a principal from a room

DELETE/v1/tides/rooms/{room}/members/{principal}

tides:writetides_members_revoke

Scope tides:write and the room's admin perm. Records revoked_at_seq; nothing by that principal lands after it, its presence is cleared and its streams end within about a second. A revoke holds even in an access: org room.

Parameters

  • roompath · stringrequired
  • principalpath · stringrequired

    A person (h_), an agent (a_ or an OpenAgentID did:oas:…) or a key id

Responses

  • 200The revoked grant
    Response fields
    • principalstring
    • kind"human" | "agent" | "key"
    • role"owner" | "editor" | "viewer" | null
    • perms"read" | "write" | "presence" | "admin"[]
    • granted_bystring
    • granted_atstring (date-time)
    • revoked_atstring | null (date-time)
    • revoked_at_seqinteger | null
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 4xx 5xxThe error envelope.
curl -X DELETE "https://os.one.ml/api/v1/tides/rooms/$ROOM/members/$PRINCIPAL" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Ops

Replay a room's ops after a cursor, or wait for the next ones

GET/v1/tides/rooms/{room}/ops

tides:readtides_ops_list

Scope tides:read. Up to limit ops after cursor (the start when left out). With wait (seconds, up to 25) an empty page waits for the next op; permission is checked again on every poll. Apply the page, then continue from its cursor.

Parameters

  • roompath · stringrequired
  • cursorquery · string

    A cursor this room returned (<room>:<seq>); the start when left out

  • limitquery · integer
  • waitquery · integer

Responses

  • 200A page of ops
    Response fields
    • dataobject[]required
    • data[].[].seqinteger
    • data[].[].cursorstring
    • data[].[].kind"update" | "edit" | "restore"
    • data[].[].actor_kind"human" | "agent" | "key"
    • data[].[].actor_idstring
    • data[].[].actor_didstring | null
    • data[].[].on_behalf_ofstring | null
    • data[].[].viastring
    • data[].[].updatestring
    • data[].[].payloadstring
    • data[].[].created_atstring (date-time)
    • cursorstringrequired
    • head_seqinteger
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 422invalid, unknown_root, invalid_content, invalid_update or out_of_range
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/tides/rooms/$ROOM/ops" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Append one op (a Yjs update, or opaque bytes)

POST/v1/tides/rooms/{room}/ops

tides:writetides_ops_append

Scope tides:write and the room's write perm; meters tides.ops and tides.op_bytes. For CRDT-aware clients: update is a Yjs v1 update (Yjs rooms), payload raw bytes (opaque-v1 rooms), base64, at most 256 KiB. The update is applied to the room's document first: an unknown root or the wrong kind of content is a 422, an update that depends on changes the room has not seen a 409 missing_dependencies (sync first). Agents usually want tides_edit instead.

Parameters

  • roompath · stringrequired
  • asquery · "one"

    one shows a person session's writes as One's (actor agent one:<person> on behalf of the person); person sessions only

Request body application/json

  • updatestring

    A Yjs v1 update (yjs-v1-text and yjs-v1-doc rooms)

  • payloadstring

    Raw bytes (opaque-v1 rooms)

  • idempotency_keystringrequired

    min length 8 · max length 128 · pattern ^[A-Za-z0-9_.:-]{8,128}$

Responses

  • 200The op an earlier request with this key appended
    Response fields
    • seqinteger
    • cursorstring
    • replayedboolean
    • appliedboolean
  • 201The new op
    Response fields
    • seqinteger
    • cursorstring
    • replayedboolean
    • appliedboolean
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 409idempotency_conflict, protocol_mismatch, missing_dependencies, find_not_found, room_limit or socket_unavailable
  • 413op_too_large (over 256 KiB), room_full (64 MiB) or a body over the limit
  • 422invalid, unknown_root, invalid_content, invalid_update or out_of_range
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/tides/rooms/$ROOM/ops" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "idempotency_key": "string"
  }'

Restore

Restore a trashed room

POST/v1/tides/rooms/{room}/restore

tides:writetides_rooms_restore

Scope tides:write and the room's admin perm; within 30 days of the trash.

Parameters

  • roompath · stringrequired

Responses

  • 200The restored room
    Response fields
    • idstring

      pattern ^tr_[a-z2-7]{26}$

    • object"tides.room"
    • namestring
    • protocol"yjs-v1-text" | "yjs-v1-doc" | "opaque-v1"
    • schemastring | null
    • access"org" | "project" | "members"
    • subjectobject | null
    • history"compact" | "full"
    • project_idstring
    • environment"sandbox" | "live"
    • metadataobject
    • head_seqinteger
    • cursorstring
    • size_bytesinteger
    • ops_bytesinteger
    • presence_countinteger
    • perms"read" | "write" | "presence" | "admin"[]
    • created_bystring
    • created_by_kindstring
    • created_atstring (date-time)
    • updated_atstring (date-time)
    • deleted_atstring | null (date-time)
    • versioninteger
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/tides/rooms/$ROOM/restore" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Snapshots

List a room's versions, newest first

GET/v1/tides/rooms/{room}/snapshots

tides:readtides_snapshots_list

Scope tides:read. named versions people and agents made, and auto compaction points.

Parameters

  • roompath · stringrequired
  • kindquery · "named" | "auto"

Responses

  • 200The versions
    Response fields
    • dataobject[]required
    • data[].[].idstring
    • data[].[].object"tides.snapshot"
    • data[].[].room_idstring
    • data[].[].seqinteger
    • data[].[].cursorstring
    • data[].[].kind"named" | "auto"
    • data[].[].labelstring | null
    • data[].[].bytesinteger
    • data[].[].created_bystring
    • data[].[].created_atstring (date-time)
    • data[].[].formatstring
    • data[].[].statestring
    • data[].[].contentany
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/tides/rooms/$ROOM/snapshots" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Save a named version of the room's document

POST/v1/tides/rooms/{room}/snapshots

tides:writetides_snapshots_create

Scope tides:write and the room's write perm; meters tides.snapshots.

Parameters

  • roompath · stringrequired

Request body application/json

  • labelstring

    max length 120

Responses

  • 201The version
    Response fields
    • idstring
    • object"tides.snapshot"
    • room_idstring
    • seqinteger
    • cursorstring
    • kind"named" | "auto"
    • labelstring | null
    • bytesinteger
    • created_bystring
    • created_atstring (date-time)
    • formatstring
    • statestring
    • contentany
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 409idempotency_conflict, protocol_mismatch, missing_dependencies, find_not_found, room_limit or socket_unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/tides/rooms/$ROOM/snapshots" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

Get a version, optionally rendered

GET/v1/tides/rooms/{room}/snapshots/{snapshot}

tides:readtides_snapshots_get

Scope tides:read. With format, the version's document as tides_state renders it.

Parameters

  • roompath · stringrequired
  • snapshotpath · stringrequired
  • formatquery · "yjs" | "text" | "json" | "markdown"

Responses

  • 200The version
    Response fields
    • idstring
    • object"tides.snapshot"
    • room_idstring
    • seqinteger
    • cursorstring
    • kind"named" | "auto"
    • labelstring | null
    • bytesinteger
    • created_bystring
    • created_atstring (date-time)
    • formatstring
    • statestring
    • contentany
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/tides/rooms/$ROOM/snapshots/$SNAPSHOT" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Bring the document back to a version

POST/v1/tides/rooms/{room}/snapshots/{snapshot}/restore

tides:writetides_snapshots_restore

Scope tides:write and the room's write perm; meters tides.ops. Appends one new op that makes the document match the version; history is never rewritten, and open editors merge it like any other edit.

Parameters

  • roompath · stringrequired
  • snapshotpath · stringrequired
  • asquery · "one"

    one shows a person session's writes as One's (actor agent one:<person> on behalf of the person); person sessions only

Request body application/json

  • idempotency_keystringrequired

    min length 8 · max length 128 · pattern ^[A-Za-z0-9_.:-]{8,128}$

Responses

  • 200The op an earlier request with this key appended, or the document already matched
    Response fields
    • seqinteger
    • cursorstring
    • replayedboolean
    • appliedboolean
  • 201The restore op
    Response fields
    • seqinteger
    • cursorstring
    • replayedboolean
    • appliedboolean
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 409idempotency_conflict, protocol_mismatch, missing_dependencies, find_not_found, room_limit or socket_unavailable
  • 4xx 5xxThe error envelope.
curl -X POST "https://os.one.ml/api/v1/tides/rooms/$ROOM/snapshots/$SNAPSHOT/restore" \
  -H "Authorization: Bearer $GENESIS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "idempotency_key": "string"
  }'

State

Read a room's document

GET/v1/tides/rooms/{room}/state

tides:readtides_state

Scope tides:read. yjs (default) is the full Yjs state as base64 for apps: apply it, then follow from cursor. text, json and markdown render the document for agents (prose.v1 as ProseMirror JSON or Markdown; canvas.v1 maps as JSON, shapes and blocks as Markdown). opaque-v1 rooms have only json (the head).

Parameters

  • roompath · stringrequired
  • formatquery · "yjs" | "text" | "json" | "markdown"

Responses

  • 200The document at cursor
    Response fields
    • room_idstring
    • protocolstring
    • schemastring | null
    • seqinteger
    • cursorstring
    • formatstring
    • statestring

      format=yjs

    • contentany

      format=text|markdown: a string; json: an object

  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 409idempotency_conflict, protocol_mismatch, missing_dependencies, find_not_found, room_limit or socket_unavailable
  • 422invalid, unknown_root, invalid_content, invalid_update or out_of_range
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/tides/rooms/$ROOM/state" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Stream

Follow a room live (server-sent events)

GET/v1/tides/rooms/{room}/stream

tides:readtides_stream

Scope tides:read; meters tides.connection_minutes. text/event-stream from cursor (or Last-Event-ID): ready once, op per op (its id is its cursor, so a reconnecting EventSource resumes exactly), presence with the full list whenever it changes, a : ping comment every 15 s, reconnect after 55 minutes (reconnect from the cursor), and error (revoked) if the caller loses read access.

Parameters

  • roompath · stringrequired
  • cursorquery · string

    A cursor this room returned (<room>:<seq>); the start when left out

  • conn_idquery · string
  • last-event-idheader · string

Responses

  • 200The event stream
    Response fields

    Type: string

  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 404No such room (or one the caller cannot read), or no such version
  • 422invalid, unknown_root, invalid_content, invalid_update or out_of_range
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/tides/rooms/$ROOM/stream" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

Whoami

The verified caller and how its ops are attributed

GET/v1/tides/whoami

tides:readtides_whoami

Scope tides:read.

Parameters

  • asquery · "one"

    one shows a person session's writes as One's (actor agent one:<person> on behalf of the person); person sessions only

Responses

  • 200The caller
    Response fields
    • orgstring
    • principalstring
    • kindstring
    • scopesstring[]
    • environment"sandbox" | "live"
    • project_idstring | null
    • actorobject
    • actor.kind"human" | "agent" | "key"
    • actor.idstring
    • actor.on_behalf_ofstring | null
    • actor.via"session" | "key" | "delegation" | "agent" | "one"
  • 401Missing or invalid identity, or a replayed request
  • 403The credential lacks the scope, the caller lacks the room perm, or a cursor from another room
  • 4xx 5xxThe error envelope.
curl "https://os.one.ml/api/v1/tides/whoami" \
  -H "Authorization: Bearer $GENESIS_API_KEY"

L1fe AI Inc. · Built from Genesis 0.3.1 and the live gateway on 2026-10-25. Support