POST
/
v1
/
environments
curl --request POST \
  --url https://api.rootly.com/v1/environments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/vnd.api+json' \
  --data '{
  "data": {
    "type": "environments",
    "attributes": {
      "name": "<string>",
      "description": "<string>",
      "color": "<string>",
      "position": 123,
      "notify_emails": [
        "<string>"
      ],
      "slack_channels": [
        {
          "id": "<string>",
          "name": "<string>"
        }
      ],
      "slack_aliases": [
        {
          "id": "<string>",
          "name": "<string>"
        }
      ]
    }
  }
}'
{
  "data": {
    "id": "a4f2fe69-35f7-4a66-b7c2-12c99115a4f2",
    "type": "environments",
    "attributes": {
      "slug": "us-east-1",
      "name": "us-east-1",
      "description": "East Coast Datacenter",
      "color": "#FFF",
      "position": 1,
      "notify_emails": [
        "hello@rootly.com",
        "world@rootly.com"
      ],
      "slack_channels": [
        {
          "id": "C03MKDSEJE8",
          "name": "elastisearch"
        }
      ],
      "slack_aliases": [
        {
          "id": "S03F7QUV7F1",
          "name": "leadership"
        }
      ],
      "created_at": "2025-05-08T00:17:45.439-07:00",
      "updated_at": "2025-05-08T00:17:45.439-07:00"
    }
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/vnd.api+json

Response

201
application/vnd.api+json
environment created

The response is of type object.