Skip to main content
POST
/
api
/
v1
/
environments
Create environment
curl --request POST \
  --url https://api.devhelm.io/api/v1/environments \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "slug": "<string>",
  "variables": {},
  "isDefault": true
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "orgId": 123,
    "name": "<string>",
    "slug": "<string>",
    "variables": {},
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "monitorCount": 123,
    "isDefault": true
  }
}

Authorizations

Authorization
string
header
required

API key (dh_live_...) or Auth0 JWT token

Body

application/json
name
string
required

Human-readable environment name

Maximum string length: 100
slug
string
required

URL-safe identifier (lowercase alphanumeric, hyphens, underscores)

Maximum string length: 100
Pattern: ^[a-z0-9][a-z0-9_-]*$
variables
object

Initial key-value variable pairs for this environment

isDefault
boolean

Whether this is the default environment for new monitors

Response

201 - */*

Created

data
object

Environment with variable substitutions for monitor configs