Create Collab Token

Beta

Admin only. Mint a short-lived Keryx capability token for a Generic Doc asset, enabling live collaborative reads (and, with edit permission, writes) over WebSocket and REST. Only generic_doc assets are eligible — Athena-managed asset types are never reachable through this endpoint. The requested access is a ceiling clamped by the caller’s permission on the asset.

Authentication

X-API-KEYstring
API Key authentication via header

Path parameters

asset_idstringRequired

Request

This endpoint expects an object.
accessenumOptionalDefaults to view

Requested access ceiling. This is a ceiling, not a grant: ‘edit’ is clamped to read-only unless the caller has edit permission on the asset.

Response

Successful Response
access_typeenum

Granted access: r = read + live subscribe, rw = read-write.

doc_idstring
Keryx document id within the org.
expires_at_msinteger

Token expiry in epoch milliseconds. Re-mint before this passes; the @athenaintel/react collab client does so automatically.

orgstring

Keryx org (room namespace) for the document.

rest_urlstring

REST base URL. Endpoints follow {rest_url}/{name}/v1/{org}/{doc_id} (ydoc, activity, changeset).

tokenstring

Keryx capability token (yauth). Pass as the yauth query parameter on the WebSocket upgrade and REST requests. Room-bound: valid only for this asset’s document.

ws_urlstring

WebSocket base URL. Connect to {ws_url}/{org}/{doc_id}?yauth={token}.

branchstringOptionalDefaults to main
Document branch.

Errors

422
Unprocessable Entity Error