1. OpenAPI (Demo)
  2. Environments
  3. Create a project environment
ReadmeGitHub
  • Platform API overview
  • Quickstart
  • POSTCreate a member session
  • POSTRefresh a member session
  • DELETERevoke a member session
  • GETList organizations
  • POSTCreate an organization
  • GETGet an organization
  • PATCHUpdate an organization
  • GETList organization members
  • POSTInvite an organization member
  • DELETERemove an organization member
  • PATCHUpdate a member role
  • GETList projects
  • POSTCreate a project
  • GETGet a project
  • DELETEArchive a project
  • PATCHUpdate a project
  • GETList project environments
  • POSTCreate a project environment
  • GETList project documents
  • POSTCreate a project document
  • GETGet a document
  • DELETEArchive a document
  • PATCHUpdate a document
  • POSTPublish a document
  • GETList contacts
  • POSTCreate a contact
  • GETGet a contact
  • DELETEDelete a contact
  • PATCHUpdate a contact
  • GETList product events
  • GETGet analytics overview
  • GETList workflows
  • POSTCreate a workflow
  • GETList workflow runs
  • GETList webhook subscriptions
  • POSTCreate a webhook subscription
  • GETGet a webhook subscription
  • DELETEDelete a webhook subscription
  • PATCHUpdate a webhook subscription
  • GETList webhook deliveries
  • POSTReplay a webhook delivery
  • GETList files
  • POSTCreate a multipart file upload
  • GETGet file metadata
  • DELETEDelete a file
  • GETGet current subscription
  • PATCHUpdate subscription settings
  • GETList invoices
  • GETGet metered usage
  • GETList API keys
  • POSTCreate an API key
  • POSTRevoke an API key
  • GETList audit logs
  • GETList exports
  • POSTCreate an export
  • GETGet API health
POST/organizations/{organizationId}/projects/{projectId}/environments

Create a project environment

Creates an isolated environment with configurable variables and deployment protection.

Send request

Use the documented inputs to call this endpoint directly.

API serverbase URL
Bearer tokenBearerAuthoptional
Stored only in this browser for the BearerAuth security scheme and reused on every API page in this group.

Parameters

Values are applied to the request and the example on the right.

organizationIdpath · stringrequired

Opaque organization identifier.

projectIdpath · stringrequired

Request body

application/jsonrequired
namestringrequired
slugstringrequired
protectionenumoptional

Values: "none" · "approval_required" · "locked"

variablesobjectoptional

Responses

201application/json

Environment created.

{
  "id": "env_01J8F7M3Q9X5V2K6P4N",
  "name": "Staging",
  "slug": "staging",
  "protection": "approval_required",
  "variables_count": 12,
  "last_deployment_at": "2026-09-02T18:20:00Z"
}
idstringoptional
namestringoptional
slugstringoptional
protectionstringoptional
variables_countintegeroptional
last_deployment_atstring · date-timeoptional
422

Environment configuration is invalid.

List project environments< PreviousList project documentsNext >

Powered by heyo

curl --request POST \  'https://api.demo.heyo.example/v3/organizations/org_01J8F1Q6N6VTX4E8W9R2D0A7B3/projects/prj_01J8F5KM4MAB0V7YQ6P3N2R8D1/environments' \  --header 'Content-Type: application/json' \  --data '{  "name": "Staging",  "slug": "staging",  "protection": "approval_required",  "variables": {    "API_ORIGIN": "https://staging-api.northstar.example",    "FEATURE_NEW_EDITOR": "true"  }}'
{  "id": "env_01J8F7M3Q9X5V2K6P4N",  "name": "Staging",  "slug": "staging",  "protection": "approval_required",  "variables_count": 12,  "last_deployment_at": "2026-09-02T18:20:00Z"}