Skip to main content
POST
Run code in an ephemeral sandbox

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
language
enum<string>
required

Script language

Available options:
javascript,
python
Example:

"javascript"

source
string
required

Script source (JavaScript or Python)

Example:

"export default async function ({ state }) { return { ...state, ok: true }; }"

state
object

State object passed to the script (default preview state if omitted)

Example:
timeoutMs
number
default:8000

Timeout in milliseconds (default 8000, max 20000)

Required range: 1000 <= x <= 20000
Example:

8000

Response

Ephemeral run result

success
boolean
required

Success status

Example:

true

message
string
required

Success message

Example:

"Operation completed successfully"

data
object
required
Example: