ApiManagementV1WorkspacesWorkspaceidEnvironments

Create a new environment

POST
/management/v1/workspaces/{workspaceId}/environments
AuthorizationBearer <token>

Management token (nhm_...)

In: header

Path Parameters

workspaceIdstring
namestring
Length1 <= length <= 50
slugstring
Length2 <= length <= 50

Response Body

curl -X POST "https://loading/management/v1/workspaces/string/environments" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "slug": "string"  }'
{
  "id": "string",
  "name": "string",
  "slug": "string",
  "isDefault": true,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}

{
  "error": {
    "code": "validation_error",
    "message": "Slug must be 2-50 characters, lowercase alphanumeric and hyphens only"
  }
}

{
  "error": {
    "code": "unauthorized",
    "message": "Missing or invalid authorization header"
  }
}

{
  "error": {
    "code": "token_disabled",
    "message": "Management token is disabled"
  }
}

{
  "error": {
    "code": "conflict",
    "message": "An environment with this slug already exists"
  }
}