---
title: "Add Environment"
method: POST
path: "/v1/accounts/{account_id}/environments"
tags: ["Environments"]
---

# Add Environment

`POST /v1/accounts/{account_id}/environments`

## Request

- Base URL: `https://api.rivery.io`
- URL: `https://api.rivery.io/v1/accounts/{account_id}/environments`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/rivery/apis/boomi-data-integration-api/docs/v1/accounts/:account_id/environments/post.ts> (a function with typed inputs; its response is checked against the schema)

**Authorization scope:** `environment:edit` 
 
 **Creates a new environment entity**

## Path parameters

- `account_id` string, required

## Request body

- EnvironmentInput: Add Environment Model
  - `name` string, required: The environment name
  - `color` 'gray.400' | 'tagGreen' | 'cBlues' | 'tagCyan' | 'tagGeekBlue' | 'cPurples' | 'tagPurple' | 'tagMagenta' | 'cOranges' | 'tagOrange' | 'yellow.200': The EnvironmentsColor enum provides all color options for environments
  - `description` string, nullable: The environment description
  - `is_default` boolean: A flag that indicates whether the environment is the account's default environment

## Response `201`

Successful Response

- EnvironmentsFields: Environments properties to return.
  - `_id` string, required: The environment id
  - `account` string, required: The account id of the user
  - `user_created` string, nullable: The user id of the user who first created the environment
  - `created_at` union: The environment creation date time in UTC timezone. Time format YYYY-MM-DDThh:mm:ss.ms
    - string, date-time
    - string
  - `cross_id` string, required: The cross id of the environment
  - `updated_at` union: The time in which the environment was last updated (UTC time zone)
    - string, date-time
    - string
  - `environment_name` string, required: The environment name
  - `color` 'gray.400' | 'tagGreen' | 'cBlues' | 'tagCyan' | 'tagGeekBlue' | 'cPurples' | 'tagPurple' | 'tagMagenta' | 'cOranges' | 'tagOrange' | 'yellow.200': The EnvironmentsColor enum provides all color options for environments
  - `description` string, nullable: The environment description
  - `variables` object, required: Environment's variables
  - `is_deleted` boolean, nullable: A flag that indicates whether the environment is deleted
  - `deleted_by` string, nullable: The user id of the user who deleted the environment (if the environment is deleted)
  - `deleted_at` union: The time in which the environment was deleted (if the environment is deleted). Time format YYYY-MM-DDThh:mm:ss.ms
    - string, date-time
    - string
  - `is_default` boolean: A flag that indicates whether the environment is the account's default environment
  - `updated_by` string, nullable: The user id of the user who last updated the environment
  - `is_delete_lock` boolean, nullable: A flag that indicates the environment deletion progress

## Other responses

- `422`: Validation Error

## Changes

> 572 revisions in range; 2 not diffed.

- **2026-10-24** `00b90942c8d6`: 1 info
  - endpoint added
- **2026-10-24** `0a8241f415c4`: 1 breaking
  - api path removed without deprecation
- **2026-08-06** `ddd6b1c27983`: 4 info
  - api tag `Environments` added
  - api tag `Beta Endpoints` removed
  - the `is_default` request property default value changed from `False` to `false`
  - the `is_default` response's property default value changed from `False` to `false` for the status `201`

[Operation history](https://skmtc.dev/rivery/apis/boomi-data-integration-api/changes/v1/accounts/:account_id/environments/post.md)

---

[API](https://skmtc.dev/rivery/apis/boomi-data-integration-api.md) - [All operations](https://skmtc.dev/rivery/apis/boomi-data-integration-api/llms.txt) - [OpenAPI document](https://skmtc.dev/rivery/apis/boomi-data-integration-api/revisions/cd90a1bf0f26?raw)
