Skip to main content
POST
Create a durable sandbox session

Authorizations

x-api-key
string
header
required

Project API key. Create and manage keys in the dashboard under Project → API Keys. Send as header: x-api-key:

Headers

x-username
string
default:(project default user)

External user (end user) to act as. Optional — if omitted, Flowra uses the project’s default external user. Send a stable username (e.g. customer_alice) only when you need another end-user context.

Body

application/json
threadId
string

Isolation thread id. Defaults to http:{uuid} so HTTP sessions do not collide with chat threads.

Example:

"b737d8af-a9e0-4251-9714-3fdc1126e5fb"

workflowId
string<uuid>

Optional workflow id for billing attribution

Example:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

templateId
string

Sandbox template name or id override

Example:

"code-interpreter-v1"

maxDurationSec
number

Max session duration in seconds (capped by server config)

Required range: 60 <= x <= 86400
Example:

3600

Response

201 - application/json

Sandbox session created

success
boolean
required

Success status

Example:

true

message
string
required

Success message

Example:

"Operation completed successfully"

data
object
required
Example: