---
title: "Create Environment"
method: POST
path: "/v1/convai/environments"
tags: ["Agents Platform"]
---

# Create Environment

`POST /v1/convai/environments`

## Request

- Base URL: `https://api.elevenlabs.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.elevenlabs.io/v1/convai/environments`
- Auth: none declared

Create a workspace environment. Variables without a value for it fall back to their production value.

## Headers

- `xi-api-key` string, nullable: Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

## Request body

- CreateEnvironmentRequest
  - `name` string, required: Unique name of the environment, e.g. 'staging'.

## Response `200`

Successful Response

- EnvironmentResponse
  - `name` string, required: Name of the environment, e.g. 'staging'.
  - `updated_at_unix_secs` integer, nullable: When the environment was created or one of its values last changed. Unset when neither is known.
  - `created_by_user_id` string, nullable: Unset for 'production' and when the creator is not known.

## Other responses

- `400`: Invalid environment name
- `409`: Environment with this name already exists
- `422`: Validation Error

## Changes

- **2026-10-16** `4b43b1758c9b`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/changes/v1/convai/environments/post.md)

---

[API](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation.md) - [All operations](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/elevenlabs/apis/elevenlabs-api-documentation/revisions/0e2bfc751634?raw)
