• Cheat sheets
  • Documentation
  • API reference
  • Product updates
  • Sign in
Kontent.ai Learn
  • Try Kontent.ai
  • Plan
  • Set up
  • Model
  • Develop
  • Create
Management API v2
API Reference
    • About Management API
    • Postman collection
    • SDKs
    • Authentication
    • API keys
    • API limitations
    • Guidelines on handling changes
      • Introduction
      • Clone an environment
        POST
      • Get status of environment cloning
        GET
      • Retrieve environment information
        GET
      • Mark environment as production
        PUT
      • Rename an environment
        PATCH
      • Delete an environment
        DELETE

Environments

An environment is a snapshot of your project that you can use to safely make changes to your content model and adjust your app. Because environments are isolated snapshots, they aren't meant for content production.Use environments to update your content model and adjust your app safely. Learn how to set up, sync, and migrate using environments.

Clone an environment

Create a clone of an existing environment. We recommend you work with the new environment only after the cloning is finished. Check the environment's cloning progress using API to know when the new environment is ready.By default, the new environment is:
  • Cloned with assets and content items. You can include version history of up to 50 versions in your new environment. For a faster cloning experience, you can omit assets and content items or the version history.
  • Accessible to project managers and the person who initiated the cloning process. If you want to give other users access to the new environment, specify roles_to_activate when initiating the cloning.
POST
https://manage.kontent.ai/v2/projects/{environment_id}/clone-environment

Request

Path parameters

environment_id
required · string
Identifies your environment.

Body schema

Application/json

Specify the environment's name and the roles that should be active in the new environment.

name
required · string · 1-200 chars
The new environment's name.
roles_to_activate[]
array
The user roles to activate specified by role ID. These roles will be activated in addition to the users with the Project manager role.
copy_data_options
object
Specifies what content to clone from the source environment.
Show child attributes

Request samples

TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { ManagementClient } from '@kontent-ai/management-sdk';

const client = new ManagementClient({
  environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
  apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',
});

const response = await client
  .cloneEnvironment()
  .withData({
    name: 'Develop',
    roles_to_activate: ['ee483b59-5a24-4010-b277-ae224c34bc71'],
    copy_data_options: {
      content_items_assets: true,
      content_item_version_history: false,
    },
  })
  .toPromise();

Response

Status (200)
The environment cloning has started.
id
required · string
The new environment's internal ID.
management_api_key
required · string · jwt
The API key you can use to manage the new environment. This is the same API key as the one used to initiate the cloning.
secured_delivery_api_key
string · nullable · jwt
Deprecated
To retrieve published content from your newly created environment, use a Delivery API key that’s scoped to the new environment.
delivery_preview_api_key
string · nullable · jwt
Deprecated
To preview content from your newly created environment, use a Delivery API key that’s scoped to the new environment.

Example responses

200
400
{
  "id": "71386f85-cddb-4cb0-aa54-988566feb9a1",
  "management_api_key": "ey...",
  "secured_delivery_api_key": "ey...",
  "delivery_preview_api_key": "ey..."
}

Get status of environment cloning

Retrieve the cloning status of the specified environment.
GET
https://manage.kontent.ai/v2/projects/{environment_id}/environment-cloning-state

Request

Path parameters

environment_id
required · string
Identifies your environment.

Request samples

TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { ManagementClient } from '@kontent-ai/management-sdk';

const client = new ManagementClient({
  environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
  apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',
});

const response = await client.getEnvironmentCloningState().toPromise();

Response

Status (200)
The cloning status of the specified environment.
cloning_state
required · string
Specifies whether the environment has been cloned successfully.

Example responses

200
{
  "cloning_state": "done"
}

Retrieve environment information

Retrieve the ID and display name of your project's environment. Using this endpoint, you can also validate your Management API key.
GET
https://manage.kontent.ai/v2/projects/{environment_id}

Request

Path parameters

environment_id
required · string
Identifies your environment.

Request samples

TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { ManagementClient } from '@kontent-ai/management-sdk';

const client = new ManagementClient({
  environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
  apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',
});

const response = await client.environmentInformation().toPromise();

Response

Status (200)
Information about the specified environment.
id
string · uuid
The environment's ID.
name
string
The project's display name.
environment
string · 1-200 chars
The environment's display name.
is_production
boolean
Determines whether the project's environment is marked as production.

Example responses

200
403
{
  "id": "8d20758c-d74c-4f59-ae04-ee928c0816b7",
  "name": "Sample project",
  "environment": "Production",
  "is_production": true
}

Mark environment as production

Marks the specified environment as production. This action effectively swaps the production environment with the specified non-production environment.
PUT
https://manage.kontent.ai/v2/projects/{environment_id}/mark-environment-as-production

Request

Path parameters

environment_id
required · string
Identifies your environment.

Body schema

Application/json

Specify whether you want to enable webhooks.

enable_webhooks
boolean
Determines whether the webhooks in the specified environment should be enabled after marking the environment as production.If not specified, the webhooks in the specified environment will be enabled.

Request samples

TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { ManagementClient } from '@kontent-ai/management-sdk';

const client = new ManagementClient({
  environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
  apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',
});

const response = await client
  .markEnvironmentAsProduction()
  .withData({
    enable_webhooks: false,
  })
  .toPromise();

Response

Status (204)
The environment was successfully marked as production.
Empty response

Example responses

400
{
  "request_id": "4c3b488c74c18640",
  "error_code": 232,
  "message": "The environment 4a8b44fa-785c-00ae-4d5c-029de7428cab is already marked as production."
}

Rename an environment

Change the display name of an environment.
PATCH
https://manage.kontent.ai/v2/projects/{environment_id}

Request

Path parameters

environment_id
required · string
Identifies your environment.

Body schema

Application/json

Specify the environment's name.

array · min. 1 items

Hide child attributes
op
required · string
The operation's name. The allowed operation is rename_environment.
value
required · string
The environment's name.

Request samples

TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { ManagementClient } from '@kontent-ai/management-sdk';

const client = new ManagementClient({
  environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
  apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',
});

const response = await client
  .modifyEnvironment()
  .withData([
    {
      op: 'rename_environment',
      value: 'My Little Production',
    },
  ])
  .toPromise();

Response

Status (200)
The environment was renamed.
id
string · uuid
The environment's ID.
name
string
The project's display name.
environment
string · 1-200 chars
The environment's display name.
is_production
boolean
Determines whether the project's environment is marked as production.

Example responses

200
400
{
  "id": "4a8b44fa-785c-00ae-4d5c-029de7428cab",
  "name": "Production",
  "is_production": true
}

Delete an environment

Deletes an environment from your project. If an environment is marked as production, it cannot be deleted.
DELETE
https://manage.kontent.ai/v2/projects/{environment_id}

Request

Path parameters

environment_id
required · string
Identifies your environment.

Request samples

TypeScript
C#
cURL
// Tip: Find more about JS/TS SDKs at https://kontent.ai/learn/javascript
import { ManagementClient } from '@kontent-ai/management-sdk';

const client = new ManagementClient({
  environmentId: 'KONTENT_AI_ENVIRONMENT_ID',
  apiKey: 'KONTENT_AI_MANAGEMENT_API_KEY',
});

const response = await client.deleteEnvironment().toPromise();

Response

Status (204)
The environment was deleted.
Empty response

Example responses

400
{
  "request_id": "af1567cb33d85545",
  "error_code": 233,
  "message": "The production environment can’t be deleted."
}
Copyright © 2025 Kontent.ai. All rights reserved.
  • Web
  • Privacy policy
  • Cookies policy
  • Consent settings
  • Security
  • GDPR