---
title: "Deploy an environment"
method: POST
path: "/v1/environments/{environmentId}/deploy"
tags: ["environments"]
---

# Deploy an environment

`POST /v1/environments/{environmentId}/deploy`

Deploy an environment

## Path parameters

- `environmentId` string, required — The ID of the environment to deploy

## Request body

- object
  - `token` string — The token to identify the source archive
  - `settings` object — Project settings detected by the client from the source. When provided, the server skips downloading and extracting the source archive to detect them.
    - `installCommand` string
    - `buildCommand` string
    - `buildOutputDir` string
    - `startCommand` string
    - `transport` 'stdio' | 'sse' | 'streamablehttp', required

## Response `200`

The environment has been deployed successfully

- object
  - `id` string, required
  - `status` 'ongoing' | 'deployed' | 'failed' | 'canceled', required
  - `sourceRef` string, nullable, required
  - `sourceCommitId` string, nullable, required
  - `sourceCommitMessage` string, nullable, required
  - `authorUsername` string, nullable, required
  - `authorAvatarUrl` string, nullable, required
  - `startedAt` string, date-time, nullable, required
  - `completedAt` string, date-time, nullable, required
  - `environmentId` string, required
  - `environmentName` string, required
  - `isCurrent` boolean, required
  - `deploymentPageUrl` string, uri, nullable, required

## Other responses

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

## Changes

- **2026-07-26** `b18b3cd6a658` — 1 info
  - added the non-success response with the status `409`

[Change history](https://skmtc.dev/alpic/apis/alpic-api-2/changes/v1/environments/:environmentId/deploy/post.md)

---

[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)
