Notifly
API ReferenceEnvironments

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

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.

Authorization

secretKey
Authorization<token>

API key authentication. Allowed headers-- "Authorization: ApiKey <secret_key>".

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/environments" \  -H "Content-Type: application/json" \  -d '{    "name": "Production Environment",    "color": "#3498db"  }'
{  "data": {    "_id": "60d5ecb8b3b3a30015f3e1a1",    "name": "Production Environment",    "_organizationId": "60d5ecb8b3b3a30015f3e1a2",    "identifier": "prod-env-01",    "type": "prod",    "apiKeys": [      {        "key": "sk_test_1234567890abcdef",        "_userId": "60d5ecb8b3b3a30015f3e1a4",        "hash": "hash_value_here"      }    ],    "_parentId": "60d5ecb8b3b3a30015f3e1a3",    "slug": "production"  }}