Skip to main content
POST
/
api
/
v1
/
environments
Create environment
curl --request POST \
  --url https://api.example.com/api/v1/environments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "docker",
  "image": {
    "docker": "<string>",
    "dockerfile": {
      "type": "inline",
      "value": "<string>"
    }
  },
  "resources": {
    "cpu": 123,
    "memory": "<string>",
    "disk": "<string>"
  },
  "network": {
    "allow": [
      "<string>"
    ]
  },
  "lifecycle": {
    "preserve": true,
    "stop_on_terminal": true,
    "auto_stop": "<string>"
  },
  "labels": {},
  "volumes": [
    {
      "id": "<string>",
      "mount_path": "<string>",
      "subpath": "<string>"
    }
  ],
  "env": {}
}
'
{
  "id": "docker",
  "revision": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
  "image": {
    "docker": "<string>",
    "dockerfile": {
      "type": "inline",
      "value": "<string>"
    }
  },
  "resources": {
    "cpu": 123,
    "memory": "<string>",
    "disk": "<string>"
  },
  "network": {
    "allow": [
      "<string>"
    ]
  },
  "lifecycle": {
    "preserve": true,
    "stop_on_terminal": true,
    "auto_stop": "<string>"
  },
  "labels": {},
  "volumes": [
    {
      "id": "<string>",
      "mount_path": "<string>",
      "subpath": "<string>"
    }
  ],
  "env": {}
}

Authorizations

Authorization
string
header
required

Raw dev token passed as Authorization: Bearer fabro_dev_... when server.auth.methods includes dev-token.

Body

application/json

Request body for creating a server-managed environment.

id
string
required
Pattern: ^[a-z0-9][a-z0-9-]{0,62}$
Example:

"docker"

provider
enum<string>
required

Desired environment provider.

Available options:
local,
docker,
daytona
image
object
required

REST-safe environment image settings. Dockerfile sources are inline-only; local paths are rejected by the REST API.

resources
object
required
network
object
required
lifecycle
object
required
labels
object
required
volumes
object[]
required
env
object
required

Response

Environment created

Public server-managed environment definition.

id
string
required
Pattern: ^[a-z0-9][a-z0-9-]{0,62}$
Example:

"docker"

revision
string
required

Stable revision used with If-Match for optimistic concurrency.

Pattern: ^[0-9a-f]{64}$
Example:

"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"

provider
enum<string>
required

Desired environment provider.

Available options:
local,
docker,
daytona
image
object
required

REST-safe environment image settings. Dockerfile sources are inline-only; local paths are rejected by the REST API.

resources
object
required
network
object
required
lifecycle
object
required
labels
object
required
volumes
object[]
required
env
object
required