Skip to main content
POST
Create Environment
Every request requires ?beta=true.

Authorizations

X-Api-Key
string
header
default:sk-ant-local-default
required

OMA workspace API key.

Headers

anthropic-beta
string

Optional header to specify the beta version(s) you want to use.

To use multiple betas, use a comma separated list like beta1,beta2 or specify the header multiple times for each beta.

anthropic-version
string

The version of the OMA API you want to use.

Read more about versioning and our version history here.

Query Parameters

beta
enum<boolean>
required

Selects the beta API contract for this endpoint. Must be true.

Available options:
true

Body

application/json

Public API request to create a new environment (without org/account fields).

name
string
required

Human-readable name for the environment

Required string length: 1 - 256
Example:

"python-data-analysis"

config
CloudConfigParams · object

Request params for cloud environment configuration.

Fields default to null; on update, omitted fields preserve the existing value.

Example:
description
string | null

Optional description of the environment

Maximum string length: 1024
Example:

"Python environment with data-analysis packages."

metadata
Metadata · object

User-provided metadata key-value pairs

scope
enum<string> | null

The visibility scope for this environment. 'organization' makes the environment visible to all accounts. 'account' restricts visibility to the owning account only. Only applicable for self-hosted environments. If not specified, defaults based on organization type.

Available options:
organization,
account

Response

Successful Response

Unified Environment resource for both cloud and self-hosted environments.

archived_at
string | null
required

RFC 3339 timestamp when environment was archived, or null if not archived

Example:

null

config
CloudConfig · object
required

cloud environment configuration.

Example:
created_at
string
required

RFC 3339 timestamp when environment was created

Example:

"2026-03-15T10:00:00Z"

description
string
required

User-provided description for the environment

Example:

"Python environment with data-analysis packages."

id
string
required

Environment identifier (e.g., 'env_...')

Example:

"env_011CZkZ9X2dpNyB7HsEFoRfW"

metadata
Metadata · object
required

User-provided metadata key-value pairs

Example:
name
string
required

Human-readable name for the environment

Example:

"python-data-analysis"

type
string
default:environment
required

The type of object (always 'environment')

Allowed value: "environment"
Example:

"environment"

updated_at
string
required

RFC 3339 timestamp when environment was last updated

Example:

"2026-03-15T10:00:00Z"

scope
enum<string>

The visibility scope for this environment. 'organization' means visible to all accounts. 'account' means visible only to the owning account.

Available options:
organization,
account