Creates a new compute environment for running serverless workloads. Each environment gets its own isolated namespace with a unique domain for hosting applications and APIs. The first environment created becomes the default environment for the organization.
curl --request POST \
--url https://api.case.dev/compute/v1/environments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "document-review-prod"
}
'{
"id": "env_abc123",
"name": "document-review-prod",
"slug": "document-review-prod",
"domain": "document-review-prod-lawfirm.case.dev",
"isDefault": true,
"status": "active",
"createdAt": "2024-01-15T10:30:00Z"
}API key starting with sk_case_
Environment name (alphanumeric, hyphens, and underscores only)
^[a-zA-Z0-9_-]+$"document-review-prod"
Environment created successfully
Unique environment identifier
Environment name
URL-friendly slug derived from name
Unique domain for this environment
Whether this is the default environment
Environment status
active, inactive Environment creation timestamp
Was this page helpful?
curl --request POST \
--url https://api.case.dev/compute/v1/environments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "document-review-prod"
}
'{
"id": "env_abc123",
"name": "document-review-prod",
"slug": "document-review-prod",
"domain": "document-review-prod-lawfirm.case.dev",
"isDefault": true,
"status": "active",
"createdAt": "2024-01-15T10:30:00Z"
}