For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
      • AstroFully-managed data operations, powered by Apache Airflow.
      • Astro Private CloudRun Airflow-as-a-service in your environment.
      • Professional ServicesExpert Airflow services for your enterprise's success.
    • Tools
      • Cosmos
      • Orbiter
      • CLI
      • AI SDK
      • Agents
      • Blueprint
      • UpdatesThe State of Airflow 2026See the insights from over 5,800 data practitioners in the full report. Download Now ➔
  • Customers
  • Docs
    • Insights
      • Blog
      • Webinars
      • Resource Library
      • Events
    • Education
      • Academy
      • What is Airflow?
  • Pricing
Get Started Free
  • Astro API v1beta1
    • v1beta1 deprecation notice
    • Migrate to v1
  • Platform API Reference
      • GETList environment objects
      • POSTCreate a new environment object
      • GETGet environment object
      • POSTUpdate an environment object
      • DELDelete an environment object
      • POSTExclude linking an environment object
    • Changelog
  • IAM API Reference
    • Changelog
    • Book Office Hours

Product

  • Platform Overview
  • Astro
  • Astro Observe
  • Astro Private Cloud
  • Security & Trust
  • Pricing

Tools & Services

  • Cosmos
  • Docs
  • Professional Services
  • Product Updates

Use Cases

  • AI Ops
  • Data Observability
  • ETL/ELT
  • ML Ops
  • Operational Analytics
  • All Use Cases

Industries

  • Financial Services
  • Gaming
  • Retail
  • Manufacturing
  • Healthcare
  • All Industries

Resources

  • Academy
  • eBooks & Guides
  • Blog
  • Webinars
  • Events
  • The Data Flowcast Podcast
  • All Resources

Airflow

  • What is Airflow
  • Airflow on Astro
  • Airflow 3.0
  • Airflow Upgrades
  • Airflow Use Cases
  • Airflow 2.x End of Life

Company

  • Our Story
  • Customers
  • Newsroom
  • Careers
  • Contact

Support

  • Knowledge Base
  • Status
  • Contact Support
GitHubYouTubeLinkedInx
  • Legal
  • Privacy
  • Terms of Service
  • Consent Preferences

  • Do Not Sell or Share My Personal information
  • Limit the Use Of My Sensitive Personal Information

Apache Airflow®, Airflow, and the Airflow logo are trademarks of the Apache Software Foundation. Copyright © Astronomer 2026. All rights reserved.

LogoLogo
Platform API ReferenceEnvironment

Create a new environment object

POST
https://api.astronomer.io/platform/v1beta1/organizations/:organizationId/environment-objects
POST
/platform/v1beta1/organizations/:organizationId/environment-objects
$curl -X POST https://api.astronomer.io/platform/v1beta1/organizations/organizationId/environment-objects \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "objectKey": "prod_postgres_db",
> "objectType": "CONNECTION",
> "scope": "WORKSPACE",
> "scopeEntityId": "workspace_12345"
>}'
1{
2 "id": "envobj_67890"
3}
Create an environment object for a Deployment or Workspace. An environment object represents a connection, Airflow variable, or metrics export resource that is managed by the Astro Environment Manager.
Was this page helpful?
Previous

Get environment object

Next
Built with

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

organizationIdstringRequired
The ID of the Organization in which to create the environment object.

Request

The request body for creating a new environment object.
objectKeystringRequired
The key for the environment object
objectTypeenumRequired
The type of environment object
Allowed values:
scopeenumRequired
The scope of the environment object
Allowed values:
scopeEntityIdstringRequired
The ID of the scope entity where the environment object is created
airflowVariableobjectOptional
autoLinkDeploymentsbooleanOptional
Whether or not to automatically link Deployments to the environment object. Only applicable for WORKSPACE scope
connectionobjectOptional
excludeLinkslist of objectsOptional
The links to exclude from the environment object. Only applicable for WORKSPACE scope
linkslist of objectsOptional
The Deployments that Astro links to the environment object. Only applicable for WORKSPACE scope
metricsExportobjectOptional

Response

OK
idstring
The ID of the environment object

Errors

401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
405
Method Not Allowed Error
409
Conflict Error
500
Internal Server Error