Documentation Index
Fetch the complete documentation index at: https://docs.qoder.com/llms.txt
Use this file to discover all available pages before exploring further.
POST /v1/environments
Creates a new cloud execution environment for hosting Agent sessions.
| Header | Required | Description |
|---|
Authorization | Yes | Bearer <PAT> |
Content-Type | Yes | application/json |
Request body
| Field | Type | Required | Description |
|---|
name | string | Yes | Environment name |
description | string | No | Environment description |
config | object | Yes | Environment configuration object |
config.type | string | Yes | Always "cloud" |
config.networking | object | No | Network access configuration |
config.networking.type | string | No | Network type: "unrestricted", "limited", or "allowlist" |
config.networking.allowed_hosts | array | No | Allowlist of hosts (only for allowlist type) |
config.networking.allow_package_managers | boolean | No | Whether to allow package manager network access |
config.packages | object | No | Pre-installed package configuration |
config.packages.apt | array | No | List of apt packages to install |
config.packages.pip | array | No | List of pip packages to install |
config.packages.npm | array | No | List of npm packages to install |
metadata | object | No | Custom metadata key-value pairs |
Example request
curl -s -X POST 'https://openapi.qoder.sh/api/v1/cloud/environments' \
-H "Authorization: Bearer $QODER_PAT" \
-H 'Content-Type: application/json' \
-d '{
"name": "doc-test-env",
"config": {
"type": "cloud",
"networking": {
"type": "limited"
},
"packages": {
"apt": ["curl"]
}
}
}'
Example response
HTTP 200 OK
{
"id": "env_019e3bb39b6774d8878cd0b9d237574b",
"type": "environment",
"name": "doc-test-env",
"description": "",
"status": "ready",
"config": {
"type": "cloud",
"networking": {
"type": "limited"
},
"packages": {
"apt": [
"curl"
]
}
},
"created_at": "2026-05-18T15:28:07.017808Z",
"updated_at": "2026-05-18T15:28:07.017808Z"
}
Response fields
| Field | Type | Description |
|---|
id | string | Environment unique identifier with the env_ prefix |
type | string | Always "environment" |
name | string | Environment name |
description | string | Environment description |
status | string | Environment status (such as "ready") |
config | object | Environment configuration |
created_at | string | Creation time (ISO 8601) |
updated_at | string | Last update time (ISO 8601) |
Errors
| HTTP | Type | Trigger |
|---|
| 400 | invalid_request_error | Invalid request parameters (such as missing config.type) |
| 401 | authentication_error | PAT invalid or expired |
| 403 | permission_error | Not authorized for this operation |
| 409 | conflict_error | An environment with the same name already exists |
See Errors for the full error envelope.