Environments

Create an environment

Creates a new environment within the current organization. Environments allow you to manage different stages of your application development lifecycle. Each environment has its own set of API keys and configurations.

post/v1/environments

Request

  • Base URL: https://api.notifly.io
  • URL: https://api.notifly.io/v1/environments
  • Auth: API key in header Authorization

Request body

namestring required

Name of the environment to be created

parentIdstring

MongoDB ObjectId of the parent environment (optional)

colorstring required

Hex color code for the environment

Example request

{
  "name": "Production Environment",
  "parentId": "60d5ecb8b3b3a30015f3e1a1",
  "color": "#3498db"
}

Response

Created

Example response

{
  "data": {
    "_id": "60d5ecb8b3b3a30015f3e1a1",
    "name": "Production Environment",
    "_organizationId": "60d5ecb8b3b3a30015f3e1a2",
    "identifier": "prod-env-01",
    "type": "prod",
    "apiKeys": [
      {
        "key": "api-key-1234567890abcdef",
        "_userId": "60d5ecb8b3b3a30015f3e1a4",
        "hash": "hash_value_here"
      }
    ],
    "_parentId": "60d5ecb8b3b3a30015f3e1a3",
    "slug": "production"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.