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

# Create an environment

`POST /environments`

Create an environment that can be used by tests and transactions

## Request body

- EnvironmentResource — unresolved $ref

## Response `201`

successful operation

- EnvironmentResource — unresolved $ref

## Other responses

- `500` — problem creating an environment

## Changes

- **2023-05-02** `356fe46f6721` — 1 breaking, 6 info
  - removed the success response with the status `200`
  - api tag `resource-api` added
  - api tag `api` removed
  - added the media type `text/yaml` to the request body
  - …3 more
- **2022-11-17** `9ee6203c38fa` — 3 info
  - added the media type `application/json` to the request body
  - added the media type `application/json` for the response with the status `200`
  - added the non-success response with the status `400`

[Change history](https://skmtc.dev/kubeshop/apis/tracetest/changes/environments/post.md)

---

[API](https://skmtc.dev/kubeshop/apis/tracetest.md) · [All operations](https://skmtc.dev/kubeshop/apis/tracetest/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kubeshop/tracetest/revisions/49ffca7b5e87/schema)
