> For the complete documentation index, see [llms.txt](/llms.txt).
> A full single-fetch corpus is available at [llms-full.txt](/llms-full.txt).
---
title: "Environments"
description: "List, fetch, and create the environments a project deploys into: local, preview, staging, and production."
last_verified: 2026-07-27
---


**Endpoints**: `GET /api/v1/environments`, `GET /api/v1/environments/:id`, `POST /api/v1/environments`
**Auth**: `X-API-KEY` or `Authorization: Bearer <token>` (required)
**Error envelope**: 4xx/5xx return `{"error": string, "message": string, "code": int, "hint"?: string}`


An **environment** scopes a [deployment](/docs/api-reference/deployments.md) and its [secrets](/docs/api-reference/secrets.md) to a stage of the release pipeline. Every project gets four environments — `local`, `preview`, `staging`, and `production` — created automatically the first time you list them.

## Next steps

* [Secrets](/docs/api-reference/secrets.md): store credentials scoped to an environment
* [Deployments](/docs/api-reference/deployments.md): each deployment belongs to exactly one environment
* [Projects](/docs/api-reference/projects.md): the parent resource every environment belongs to
