---
title: "Create a new Environment"
diataxis: reference
applies_to:
  product: "nirmata-control-hub"
audience: ["platform-engineer","developer"]
last_updated: 2026-03-25
url: https://docs.nirmata.io/docs/reference/rest-api/sample_operations/create_a_new_environment/
---

 Request:

    POST /api/environments/
    Accept: application/json
    Authorization: NIRMATA-API <key>

    {
      "name": "dev-test",
      "hostCluster": {"name" : "devtest-aks-us-east"}
    }

Note the different ways you can specify a relation in the JSON. For a 1-1 relationship you can:

  1.  Specify an UUID
  2.  Specify a JSON object with fields that can be used to find the relation. In the example above, we use the name field to query the  Cluster.
 

