Turn sharing on and get the share link — idempotent; {"access": "view"} asks for a view-only link; {"rotate": true} replaces it [write]

Changed on

A guest link (access prompt, the default) has a shareUrl that opens the session's guest page for anyone holding it, with no account; turns sent through it bill the session's owner. A view-only link (access view) has no shareUrl: anyone holding its token reads the conversation's text at GET /links/{token}/events and can do nothing else. A session has one link; asking for the other access level replaces it with a new token, so the old URL dies. Rotating keeps the level and kills the old URL immediately; rotate cannot be combined with access.

post/sessions/{id}/share

Request

  • Base URL
    https://api.agentsky.dev/v1
  • URL
    https://api.agentsky.dev/v1/sessions/{id}/share
  • Auth
    HTTP bearer

Path parameters

idstring required

The session id

Request body

rotateboolean
access'prompt' | 'view'

Response

OK

tokenstring nullable required
access'prompt' | 'view'
shareUrlstring

Changes

    • breaking

      the response property became optional for the status

    • info

      added the new optional request property

    • info

      added the optional property to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      the response property became required for the status

    • info

      the response property / became required for the status

    • info

      the response property / became required for the status

    • info

      added the required property to the response with the status