---
title: "Create compute environment"
method: POST
path: "/compute/v1/environments"
tags: ["Compute"]
---

# Create compute environment

`POST /compute/v1/environments`

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.

## Request body

- object
  - `name` string, required — Environment name (alphanumeric, hyphens, and underscores only)

## Response `201`

Environment created successfully

- object
  - `id` string — Unique environment identifier
  - `name` string — Environment name
  - `slug` string — URL-friendly slug derived from name
  - `domain` string — Unique domain for this environment
  - `isDefault` boolean — Whether this is the default environment
  - `status` 'active' | 'inactive' — Environment status
  - `createdAt` string, date-time — Environment creation timestamp

## Other responses

- `400` — Invalid request - missing name or invalid name format
- `401` — Invalid API key
- `404` — Organization not found
- `409` — Environment with this name already exists

---

[API](https://skmtc.net/casemark/apis/case-dev-api.md) · [All operations](https://skmtc.net/casemark/apis/case-dev-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/casemark/case-dev-api/versions/5b7e64e6d6f9/schema)
