---
title: "Create or update environments"
method: POST
path: "/v1/private/agent-configs/blueprints/environments"
tags: ["Agent Configs"]
---

# Create or update environments

`POST /v1/private/agent-configs/blueprints/environments`

## Request

- Base URL: `http://localhost:5173/api`
- URL: `http://localhost:5173/api/v1/private/agent-configs/blueprints/environments`
- Auth: none declared

Creates or updates environment-to-blueprint mappings

## Request body

- AgentConfigEnvUpdate
  - `project_id` string, uuid, required
  - `envs` AgentConfigEnv[], required
    - `id` string, uuid
    - `project_id` string, uuid
    - `env_name` string, required
    - `blueprint_id` string, uuid, required
    - `created_by` string
    - `created_at` string, date-time
    - `ended_at` string, date-time

## Response `204`

Environments updated

## Other responses

- `401`: Unauthorized
- `404`: Not Found

---

[API](https://skmtc.dev/comet-ml/apis/opik-rest-api.md) - [All operations](https://skmtc.dev/comet-ml/apis/opik-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/comet-ml/apis/opik-rest-api/revisions/0067fada8962?raw)
