Skip to content
Everruns Cloud is open in early access. Run agents without operating the platform.

create_environment

POST
/v1/environments
curl --request POST \
--url https://app.everruns.com/api/v1/environments \
--header 'Content-Type: application/json' \
--data '{ "description": "Recoverable coding workspace managed by Daytona", "display_name": "Coding - Daytona", "name": "coding-daytona", "profile": { "bootstrap": { "commands": [ "example" ] }, "containment": { "escalation": "never", "filesystem": { "writable_roots": [ "example" ] }, "level": "none", "network": { "mode": "deny" } }, "durability": "checkpointed", "lifecycle": { "idle_action": "checkpoint_and_stop", "idle_after_seconds": 300 }, "source_revision_id": "example", "target": { "connection_id": "conn_01933b5a000070008000000000000001", "kind": "host", "options": {}, "provider": "daytona" } } }'

Create a reusable Environment and its first immutable revision.

Media typeapplication/json
object
description

Optional explanation of the Environment’s intended workload.

string | null
Example
Recoverable coding workspace managed by Daytona
display_name
required

Human-readable name shown in management surfaces.

string
Example
Coding - Daytona
name
required

Stable addressable name used by Agent environment references.

string
Example
coding-daytona
profile
required

Initial immutable execution profile revision.

object
bootstrap

Reproducible commands run when physical compute is initialized.

object
commands

Ordered commands replayed when creating or recovering physical compute.

Array<string>
containment
One of:

Requested isolation policy; resolution supplies an honest target default.

object
escalation

Whether the runtime may widen containment after Session creation.

string
Allowed values: never approval auto
filesystem

Filesystem mutation boundary for command execution.

object
writable_roots

Absolute roots the runtime may mutate; empty means provider default.

Array<string>
level
required

Isolation mechanism the provider must supply.

string
Allowed values: none native isolated
network
One of:
object
mode
required
string
Allowed values: deny
durability
One of:

Requested recovery guarantee; resolution supplies a target default.

string
Allowed values: checkpointed provider_snapshot none
lifecycle

Idle lifecycle policy controlled by Everruns.

object
idle_action

Action Everruns requests after the idle interval.

string
Allowed values: checkpoint_and_stop stop keep_running
idle_after_seconds

Inactivity interval before applying idle_action.

integer format: int64
Example
300
source_revision_id

Immutable reusable Environment revision this profile was copied from. The profile remains a complete snapshot so Agent versions are portable and later Environment revisions cannot change an existing version.

string | null
target
required

Provider-neutral target plus its concrete adapter binding.

object
connection_id

Credential/transport binding for a registered machine target.

string | null
Example
conn_01933b5a000070008000000000000001
kind
required

Provider-neutral target class.

string
Allowed values: host machine vfs container managed
options

Provider-owned, non-secret configuration. Credentials are references, never values in this object.

object
provider

Concrete adapter for target kinds with more than one implementation.

string | null
Example
daytona
Media typeapplication/json

Organization-scoped reusable execution Environment.

object
created_at
required

Creation timestamp.

string format: date-time
current_revision
required

Latest immutable revision used for new references.

object
created_at
required

Revision creation timestamp.

string format: date-time
environment_id
required

Parent reusable Environment identifier.

string
id
required

Stable public revision identifier pinned into Agent and Session snapshots.

string
profile
required

Complete immutable authored profile.

object
bootstrap

Reproducible commands run when physical compute is initialized.

object
commands

Ordered commands replayed when creating or recovering physical compute.

Array<string>
containment
One of:

Requested isolation policy; resolution supplies an honest target default.

object
escalation

Whether the runtime may widen containment after Session creation.

string
Allowed values: never approval auto
filesystem

Filesystem mutation boundary for command execution.

object
writable_roots

Absolute roots the runtime may mutate; empty means provider default.

Array<string>
level
required

Isolation mechanism the provider must supply.

string
Allowed values: none native isolated
network
One of:
object
mode
required
string
Allowed values: deny
durability
One of:

Requested recovery guarantee; resolution supplies a target default.

string
Allowed values: checkpointed provider_snapshot none
lifecycle

Idle lifecycle policy controlled by Everruns.

object
idle_action

Action Everruns requests after the idle interval.

string
Allowed values: checkpoint_and_stop stop keep_running
idle_after_seconds

Inactivity interval before applying idle_action.

integer format: int64
source_revision_id

Immutable reusable Environment revision this profile was copied from. The profile remains a complete snapshot so Agent versions are portable and later Environment revisions cannot change an existing version.

string | null
target
required

Provider-neutral target plus its concrete adapter binding.

object
connection_id

Credential/transport binding for a registered machine target.

string | null
kind
required

Provider-neutral target class.

string
Allowed values: host machine vfs container managed
options

Provider-owned, non-secret configuration. Credentials are references, never values in this object.

object
provider

Concrete adapter for target kinds with more than one implementation.

string | null
revision
required

Monotonically increasing revision number within the Environment.

integer format: int32
description

Optional explanation of the Environment’s intended workload.

string | null
display_name
required

Human-readable name shown in management surfaces.

string
id
required

Stable public Environment identifier.

string
is_managed
required

Whether the definition is owned and sealed by the platform.

boolean
name
required

Addressable name used in configuration.

string
status
required

Lifecycle state such as active or archived.

string
updated_at
required

Timestamp of the most recent definition or revision change.

string format: date-time
Example
{
"current_revision": {
"profile": {
"containment": {
"escalation": "never",
"level": "none",
"network": {
"mode": "deny"
}
},
"durability": "checkpointed",
"lifecycle": {
"idle_action": "checkpoint_and_stop",
"idle_after_seconds": 300
},
"target": {
"connection_id": "conn_01933b5a000070008000000000000001",
"kind": "host",
"provider": "daytona"
}
},
"revision": 3
},
"description": "Recoverable coding workspace managed by Daytona",
"display_name": "Coding - Daytona",
"name": "coding-daytona",
"status": "active"
}