---
title: "Set (or autodetect) the browser preview URL for a session"
method: POST
path: "/api/v1/sessions/{sessionId}/preview"
tags: ["sessions"]
---

# Set (or autodetect) the browser preview URL for a session

`POST /api/v1/sessions/{sessionId}/preview`

## Path parameters

- `sessionId` string, required — Session identifier, e.g. project-1.

## Request body

- SetSessionPreviewRequest
  - `url` string — Preview target URL. When empty, the daemon autodetects a static entry point in the session workspace.

## Response `200`

OK

- SessionResponse
  - `session` ControllersSessionView, required
    - `activity` DomainActivity, required
      - `lastActivityAt` string, date-time, required
      - `state` string, required
    - `autoInjectCI` boolean, required
    - `autoInjectReview` boolean, required
    - `branch` string
    - `createdAt` string, date-time, required
    - `displayName` string
    - `harness` string
    - `id` string, required
    - `isPinned` boolean, required
    - `isTerminated` boolean, required
    - `issueId` string
    - `kind` string, required
    - `mode` 'chat' | 'tui', required
    - `pinnedAt` string, date-time, nullable
    - `previewRevision` integer
    - `previewUrl` string
    - `projectId` string, required
    - `prs` SessionPRFacts[], required
      - `ci` 'unknown' | 'pending' | 'passing' | 'failing', required
      - `mergeability` 'unknown' | 'mergeable' | 'conflicting' | 'blocked' | 'unstable', required
      - `number` integer, required
      - `review` 'none' | 'approved' | 'changes_requested' | 'review_required', required
      - `reviewComments` boolean, required
      - `state` 'draft' | 'open' | 'merged' | 'closed', required
      - `updatedAt` string, date-time, required
      - `url` string, required
    - `reviewerHarness` 'claude-code' | 'codex' | 'copilot' | 'cursor' | 'kilocode' | 'opencode' | 'kiro' | 'pi' | 'qwen' | 'agy' | 'continue' | 'goose' | 'vibe' | 'devin' | 'droid' | 'kimi' | 'kimchi' | 'muse' | 'amp' | 'aider' | 'grok' | 'crush' | 'auggie' | 'cline' | 'autohand'
    - `scmStatus` 'pr_open' | 'draft' | 'ci_failed' | 'review_pending' | 'changes_requested' | 'approved' | 'mergeable' | 'merged'
    - `status` 'working' | 'pr_open' | 'draft' | 'ci_failed' | 'review_pending' | 'changes_requested' | 'approved' | 'mergeable' | 'merged' | 'needs_input' | 'exited' | 'idle' | 'terminated' | 'no_signal', required
    - `terminalHandleId` string
    - `terminateOnPrMerge` boolean, required
    - `updatedAt` string, date-time, required

## Other responses

- `400` — Bad Request
- `404` — Not Found
- `500` — Internal Server Error
- `501` — Not Implemented

## Changes

- **2026-08-13** `1c746377fde5` — 1 info
  - added the required property `session/autoInjectCI` to the response with the `200` status
- **2026-08-09** `be069344383f` — 1 info
  - added the required property `session/autoInjectReview` to the response with the `200` status
- **2026-08-09** `25a4d3b59cf4` — 1 warning
  - added the new `kimchi` enum value to the `session/reviewerHarness` response property for the response status `200`
- **2026-08-07** `6ffec0ec12f0` — 21 warning
  - added the new `agy` enum value to the `session/reviewerHarness` response property for the response status `200`
  - added the new `aider` enum value to the `session/reviewerHarness` response property for the response status `200`
  - added the new `amp` enum value to the `session/reviewerHarness` response property for the response status `200`
  - added the new `auggie` enum value to the `session/reviewerHarness` response property for the response status `200`
  - …17 more
- **2026-08-06** `d8396ad2c721` — 1 info
  - added the required property `session/mode` to the response with the `200` status

[Full history](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/changes/api/v1/sessions/:sessionId/preview/post.md)

---

[API](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon.md) · [All operations](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/llms.txt) · [OpenAPI document](https://skmtc.dev/composiohq/apis/agent-orchestrator-http-daemon/revisions/1c746377fde5?raw)
