---
title: "Create interactive shell session"
method: POST
path: "/v1/runtimes/{runtimeId}/shell/session"
tags: ["Runtimes"]
---

# Create interactive shell session

`POST /v1/runtimes/{runtimeId}/shell/session`

## Request

- Base URL: `https://api.1claw.co`
- URL: `https://api.1claw.co/v1/runtimes/{runtimeId}/shell/session`
- Auth: HTTP bearer

Human-only. Creates a short-lived WebSocket session token for the
runtime's PTY terminal. Requires step-up auth via `password`,
`totp_code`, `passkey_credential`, or `reauth_token` (from
`POST /v1/auth/reauth` with purpose `runtime_shell`).
Runtime must have `shell_access_enabled` and be running.
Enabling shell on a running runtime may require stop/start, or
the server may auto-reconcile the sidecar on connect.

## Path parameters

- `runtimeId` string, uuid, required

## Request body

- ShellSessionRequest: Step-up credentials for an interactive shell session. Provide one of password, totp_code, passkey_credential, or reauth_token.
  - `password` string
  - `totp_code` string
  - `passkey_credential` object
  - `reauth_token` string: Single-use `rat_` token from POST /v1/auth/reauth (purpose runtime_shell)

## Response `200`

Shell session created

- ShellSessionResponse
  - `session_token` string, required
  - `ws_url` string, required: WebSocket URL for the PTY terminal
  - `expires_in` integer, required
  - `runtime_id` string, uuid, required
  - `max_session_minutes` integer, required

## Other responses

- `400`: Invalid request
- `401`: Authentication required or invalid
- `403`: Insufficient permissions
- `404`: Resource not found

---

[API](https://skmtc.dev/1claw/apis/1claw-api.md) · [All operations](https://skmtc.dev/1claw/apis/1claw-api/llms.txt) · [OpenAPI document](https://skmtc.dev/1claw/apis/1claw-api/revisions/5fa0918f3b41?raw)
