Create a new Wormkey session with a unique slug and tokens for owner access.
Request Body
The local port number your application is running on
Authentication mode for the session. Options: none, basicWhen set to basic, the response will include generated username and password credentials.
Session expiration duration. Accepts formats like 30m (minutes) or 24h (hours)
Response
Unique session identifier (format: sess_<token>)
Human-readable session slug (format: adjective-noun-number)
Public URL where viewers can access the session
Owner dashboard URL with authentication token included
URL to the overlay script for embedding session controls
WebSocket edge URL for tunnel connection
Combined token for session authentication (format: slug.ownerToken)
ISO 8601 timestamp when the session expires
Basic auth username (only present when authMode is basic)
Basic auth password (only present when authMode is basic)
Example Request
curl -X POST https://control.wormkey.io/sessions \
-H "Content-Type: application/json" \
-d '{
"port": 3000,
"authMode": "none",
"expiresIn": "24h"
}'
Example Response
{
"sessionId": "sess_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"slug": "quiet-lime-42",
"publicUrl": "https://wormkey.io/s/quiet-lime-42",
"ownerUrl": "https://wormkey.io/.wormkey/owner?slug=quiet-lime-42&token=x7y8z9a0b1c2d3e4f5g6h7i8j9k0l1m2",
"overlayScriptUrl": "https://wormkey.io/.wormkey/overlay.js?slug=quiet-lime-42",
"edgeUrl": "wss://wormkey.io/tunnel",
"sessionToken": "quiet-lime-42.x7y8z9a0b1c2d3e4f5g6h7i8j9k0l1m2",
"expiresAt": "2026-03-04T15:30:00.000Z"
}
Example Response (Basic Auth)
{
"sessionId": "sess_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"slug": "bold-mint-17",
"publicUrl": "https://wormkey.io/s/bold-mint-17",
"ownerUrl": "https://wormkey.io/.wormkey/owner?slug=bold-mint-17&token=x7y8z9a0b1c2d3e4f5g6h7i8j9k0l1m2",
"overlayScriptUrl": "https://wormkey.io/.wormkey/overlay.js?slug=bold-mint-17",
"edgeUrl": "wss://wormkey.io/tunnel",
"sessionToken": "bold-mint-17.x7y8z9a0b1c2d3e4f5g6h7i8j9k0l1m2",
"expiresAt": "2026-03-04T15:30:00.000Z",
"username": "worm",
"password": "a1b2c3d4"
}