Expose a port the agent's local server listens on [write]

Changed on

Create-or-get: the port gets a stable origin https://app-<id>.agentsky.dev/ relayed to the pod (HTTP and WebSocket) while the pod runs; calling again returns the same record, and a visibility in the body replaces the stored one in place. port is 1024–65535 and never the pod's own (400 invalid_request). A private port (the default) admits a browser only through an entry link from POST …/grants; a public port admits anyone with the address. A parked pod answers a paused page and is never woken by a visit. An archived session answers 400 session_archived.

put/sessions/{id}/ports/{port}

Request

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

Path parameters

idstring required

The session id

portinteger required

The port the app listens on inside the pod

Request body

visibility'private' | 'public'

Omitted = keep the stored value (private for a new port)

Response

OK

portinteger required

What the app listens on inside the pod

idstring required

Names the origin; not a credential

urlstring required

https://app-<id>.agentsky.dev/ — stable for the port's life

visibility'private' | 'public' required
created_atstring date-time required

Changes

    • 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