Shares

Share endpoints let you create public links to session snapshots. Shared sessions are accessible without authentication at /s/:id and can optionally expire.

POST/shareAuthenticated

Create a shareable link for a session snapshot.

ParameterTypeRequiredDescription
session_idstringYesSession to share
expires_in_msnumber | nullNoExpiration in milliseconds (null = no expiry)
curl -X POST http://127.0.0.1:7741/share \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"session_id": "a1b2c3d4", "expires_in_ms": 86400000}'
200Response
{
  "ok": true,
  "data": {
    "share_id": "Xk9mQ2pL",
    "url": "http://127.0.0.1:7741/s/Xk9mQ2pL",
    "title": "GitHub issue summary",
    "model": "claude-sonnet-4-20250514",
    "message_count": 8,
    "created_at": "2026-03-03T12:00:00Z",
    "expires_at": "2026-03-04T12:00:00Z"
  }
}
GET/shareAuthenticated

List all shared sessions.

ParameterTypeRequiredDescription
session_idstringNoFilter by source session (query param)
limitnumberNoResults per page (default 50)
GET/share/:idAuthenticated

Get share metadata (JSON).

DELETE/share/:idAuthenticated

Revoke a shared link.

200Response
{
  "ok": true,
  "data": {
    "share_id": "Xk9mQ2pL",
    "status": "revoked"
  }
}
GET/s/:id

Public page — renders a styled HTML view of the shared conversation.

This endpoint renders an HTML page, not JSON. It checks expiration and revocation before serving. Share IDs use 48 bits of entropy from crypto.randomBytes, making them unguessable.