Share a session via the API

Updated October 21, 2026

Create a shareable read-only link for any session via the API.

A shared session link lets anyone with the URL read the transcript and fork it — without needing an AgentSky account. You can also embed a shared session in your own page.

How to create a share link:

  1. POST /api/v1/sessions/{id}/share with { "enabled": true }.
  2. The response includes shareUrl — a link in the form /s/{token}.
  3. Share that URL. Anyone who opens it can read the full transcript and fork the session to their own workspace.

Embedding a shared session:

Add ?embed=1 and optionally ?theme=light or ?theme=dark to the share URL when embedding it in an iframe:

<iframe src="https://agentsky.dev/s/abc123?embed=1&theme=light"></iframe>

To revoke a share link:

POST /api/v1/sessions/{id}/share with { "enabled": false }. The link stops working immediately.

Where: API

Good to know: The link holder can read and fork the session but never edit it or send messages to it. One active share link per session. Related: Share a chat with someone, Use the AgentSky API.

View as Markdown