provider maxconversations POST /api/environments/{environment_id}/conversations/{conversation}/open/
@utdk/posthog /api/environments/{environment_id}/conversations/{conversation}/open/
environments_conversations_open_create
Create-or-resume a sandbox conversation — the single sandbox session opener. With `content`, processes the turn (first message, in-progress follow-up, or terminal resume); without `content`, warms a sandbox that idles awaiting the first message. Returns the `(task, run)` handle the frontend opens SSE against. The conversation row is created on first use from the URL id.
conversation path required
A UUID string identifying this conversation.
string
environment_id path required
Deprecated. Use /api/projects/{project_id}/ instead.
string

Try it

Authentication
Configure credentials for PostHog API
environmentsConversationsOpenCreate
POST/api/environments/{environment_id}/conversations/{conversation}/open/
Create-or-resume a sandbox conversation — the single sandbox session opener. With `content`, processes the turn (first message, in-progress follow-up, or terminal resume); without `content`, warms a sandbox that idles awaiting the first message. Returns the `(task, run)` handle the frontend opens SSE against. The conversation row is created on first use from the URL id.

Parameters

required

A UUID string identifying this conversation.

required

Deprecated. Use /api/projects/{project_id}/ instead.

Input

The user's message text. Omit or null to warm a sandbox (boot + idle) ahead of the first message.

Client-generated trace id correlated with the resulting Run's SSE stream.

Typed PostHog entities (and free text) attached to this message.

Initial permission mode for the sandbox agent session. Defaults to `auto`, which allows safe tool use while preserving explicit confirmations. * `default` - default * `acceptEdits` - acceptEdits * `plan` - plan * `bypassPermissions` - bypassPermissions * `auto` - auto

Bind a brand-new sandbox conversation to an existing Task so the first message resumes that Task's run. Honored only when this request creates the conversation row; ignored for an already-existing conversation.

Configure credentials above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import posthog from '@utdk/posthog';

await posthog.environmentsConversationsOpenCreate()