Skip to main content
post/v1/environments
Request example
Response
post/v1/environments

Authorization

Authorizationstringheaderrequired#
API key authentication. Allowed headers-- "Authorization: ApiKey <novu_secret_key>".

Headers

idempotency-keystring#
A header for idempotency purposes

Body

application/json
namestringrequired#
Name of the environment to be created

Example:"Production Environment"

parentIdstring#
MongoDB ObjectId of the parent environment (optional)

Example:"60d5ecb8b3b3a30015f3e1a1"

colorstringrequired#
Hex color code for the environment

Pattern: ^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$

Example:"#3498DB"

Responses

application/json
Created
_idstringrequired#
Unique identifier of the environment

Example:"60d5ecb8b3b3a30015f3e1a1"

namestringrequired#
Name of the environment

Example:"Production Environment"

_organizationIdstringrequired#
Organization ID associated with the environment

Example:"60d5ecb8b3b3a30015f3e1a2"

identifierstringrequired#
Unique identifier for the environment

Example:"prod-env-01"

typeenum<string>#
Type of the environment
Options:devprod

Example:"prod"

apiKeysobject[]#
List of API keys associated with the environment
_parentIdstring#
Parent environment ID

Example:"60d5ecb8b3b3a30015f3e1a3"

slugstring#
URL-friendly slug for the environment

Example:"production"