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

# Create an environment

`POST /v1/environments`

Create an environment for a project

## Request body

- object
  - `projectId` string, required — The ID of the project to create the environment for
  - `name` string, required — The name of the environment
  - `sourceBranch` string, required — The branch used to build the environment
  - `environmentVariables` object[]
    - `key` string, required
    - `value` string, required
    - `isSecret` boolean

## Response `200`

The environment has been created successfully

- object
  - `id` string, required
  - `name` string, required
  - `sourceBranch` string, nullable, required — The branch used to build the environment
  - `urls` string[], required — The URLs of the MCP server
  - `createdAt` string, date-time, required
  - `projectId` string, required — The ID of the project the environment belongs to

## Other responses

- `400` — 400
- `404` — 404

---

[API](https://skmtc.dev/alpic/apis/alpic-api-2.md) · [All operations](https://skmtc.dev/alpic/apis/alpic-api-2/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/alpic/alpic-api-2/revisions/262875478562/schema)
