---
title: "Create new environment."
method: POST
path: "/api/v1/environment"
tags: ["environment"]
---

# Create new environment.

`POST /api/v1/environment`

Creating new environment.

## Cookies

- `Session` string, nullable

## Request body

- EnvironmentCreate — Environment create model.
  - `environment` 'dev' | 'prd' | 'stg' | 'tst', required — Supported environments.
  - `dnsName` string, required — DNS name of the environment service.
  - `port` integer, required — Port.
  - `openapiJson` string — OpenAPI JSON as url or str (may be empty).
  - `version` string, required — API version.
  - `catalogueId` string, required — Id of catalogue item to which throttling belongs.
  - `lifecycle` string — Lifecycle state.
  - `tryOutAllow` boolean — Allow try-out tool to make requests.
  - `targetIpPublic` boolean — Target ip is public.
  - `throttling` string[], nullable — Throttling options.

## Response `200`

Successful Response

- EnvironmentResponse — Environment response schema with history and id.
  - `environment` 'dev' | 'prd' | 'stg' | 'tst', required — Supported environments.
  - `dnsName` string, required — DNS name of the environment service.
  - `port` integer, required — Port.
  - `openapiJson` string — OpenAPI JSON as url or str (may be empty).
  - `version` string, required — API version.
  - `catalogueId` string, required — Id of catalogue item to which throttling belongs.
  - `lifecycle` string — Lifecycle state.
  - `tryOutAllow` boolean — Allow try-out tool to make requests.
  - `targetIpPublic` boolean — Target ip is public.
  - `id` string, required — Unique id in db.
  - `history` HistoryResponse, required — History response model.
    - `id` string, required — Id of entry in db.
    - `creator` string, required — User or email of the creator.
    - `created` string, date-time, required — Datetime when the entry has been created.
    - `modifier` string, required — User or email of the modifier.
    - `modified` string, date-time, required — Datetime when the entry has been modified.
    - `revision` number — Revision of entry, incremented by 1 for each update
  - `throttling` ThrottlingResponseNoHistory[], nullable — Throttling options.
    - `name` string, required — Name of the throttling set.
    - `tierNumber` integer, nullable — Tier number.
    - `requestsMaxAmount` integer, required — Max amount of requests.
    - `timeInterval` integer, required — Time interval for requests.
    - `catalogueId` string, required — Id of catalogue item to which throttling belongs.
    - `type` 'ENV' | 'CONSUMER', required — Throttling type.
    - `id` string, required — Unique id in db.

## Other responses

- `403` — Forbidden
- `404` — Not Found
- `409` — Conflict
- `422` — Unprocessable entity
- `500` — Internal Server Error

---

[API](https://skmtc.dev/posti/apis/posti-developer-portal-backend-rest-api.md) · [All operations](https://skmtc.dev/posti/apis/posti-developer-portal-backend-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/posti/posti-developer-portal-backend-rest-api/revisions/4b67dce32742/schema)
