Skip to main content
POST
http://localhost:3000
/
environments
curl -X POST 'https://api.example.com/environments' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "tenantId": "tenant_acme",
    "projectId": "project_api",
    "name": "Production"
  }'
{
  "id": "environment_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
  "tenantId": "tenant_acme",
  "projectId": "project_api",
  "scopeId": "scope_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5c",
  "name": "Production"
}

Request Body

id
string
Optional client-provided ID. Format: environment_{uuidv7}
tenantId
string
required
ID of the tenant
projectId
string
required
ID of the project this environment belongs to
name
string
required
Display name for the environment (e.g., “Production”, “Staging”, “Development”)

Response

Returns the created environment object. Also creates an associated scope automatically and links it to the project’s scope hierarchy.
curl -X POST 'https://api.example.com/environments' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "tenantId": "tenant_acme",
    "projectId": "project_api",
    "name": "Production"
  }'
{
  "id": "environment_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5b",
  "tenantId": "tenant_acme",
  "projectId": "project_api",
  "scopeId": "scope_0190a1b2-c3d4-7e5f-8a9b-0c1d2e3f4a5c",
  "name": "Production"
}