---
title: "Create a project environment"
method: POST
path: "/v1/projects/{projectId}/environments"
tags: ["projects"]
---

# Create a project environment

`POST /v1/projects/{projectId}/environments`

Create a static project environment with a stable HTTPS URL. Built-in Production and PR Preview environments are managed by TesterArmy.

## Path parameters

- `projectId` string, required

## Headers

- `Authorization` string, required

## Request body

- object
  - `name` string, required
  - `url` string, required

## Response `201`

Project environment created

- ProjectsCreateAProjectEnvironmentResponse201
  - `environment` ProjectEnvironment, required
    - `id` string, uuid, required
    - `name` string, required
    - `slug` string, required
    - `kind` 'production' | 'pr_preview' | 'static', required
    - `url` string, nullable, required

## Other responses

- `400` — Bad Request - Invalid input parameters
- `401` — Unauthorized - Invalid or missing API key
- `404` — Project not found
- `409` — Environment name conflicts with an existing environment
- `429` — Too Many Requests - Usage limit exceeded
- `500` — Internal Server Error
- `504` — Gateway Timeout - Test execution exceeded time limit

---

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