canonical: https://jentic.com/apis/env0.com/env0

# env0 API

The env0 API drives infrastructure-as-code deployments on the env0 governance platform. Your agent creates environments, deploys and destroys them, and lists their deployments, while managing the templates (called blueprints) that environments are provisioned from. It also organises work into projects, sets configuration variables, and administers organizations, teams, and API keys so an automation can run a full self-service deployment flow.

## For AI agents

Deploy and destroy infrastructure-as-code environments on env0, manage blueprints and projects, set configuration variables, and administer teams and API keys.

## Scope

Does not provision cloud resources directly, run application CI builds, or store Terraform state files. Use for env0 infrastructure-as-code deployment and governance only.

## Capabilities

- Create an environment and trigger a deployment or a destroy run
- List the deployments recorded against an environment
- Manage blueprint templates that environments are provisioned from
- Organise environments into projects and manage project membership
- Set and update configuration variables for deployments
- Administer teams and create or list API keys

## Use cases

### Agent-Driven Environment Deployment

An AI agent connected through Jentic provisions infrastructure by creating an environment from a blueprint, setting the configuration variables it needs, and triggering a deployment. Because env0 models create, deploy, and destroy as distinct operations, the agent runs a controlled deployment flow and can tear the environment down with an explicit destroy call when it is done.

Example prompt: Create an environment from a blueprint, set one configuration variable, and trigger a deployment

### Self-Service Project Setup

A platform team gives developers self-service infrastructure by provisioning projects and the templates behind them. The env0 API creates projects, registers blueprint templates, and manages team access, so an agent stands up a new project with its approved templates and the right teams attached.

Example prompt: Create a project, attach a blueprint template to it, and grant a team access to the project

### Deployment Governance and Teardown

An operations workflow controls spend by listing deployments and destroying environments that are no longer needed. The API returns the deployments for an environment and exposes an explicit destroy operation, so an agent reconciles live environments against policy and tears down the ones that should not persist.

Example prompt: List deployments for an environment and, if it is idle, trigger a destroy run

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | `/environments` | List environments |
| POST | `/environments` | Create an environment |
| POST | `/environments/{id}/deployments` | Deploy an environment |
| POST | `/environments/{id}/destroy` | Destroy an environment |
| GET | `/projects` | List projects |
| POST | `/projects` | Create a project |
| GET | `/blueprints` | List blueprint templates |
| GET | `/configuration` | List configuration variables |

## Key resources

- **Environments** — Create, deploy, destroy, and delete infrastructure environments
- **Deployments** — Trigger and list deployments for an environment
- **Blueprints** — Templates that environments are provisioned from
- **Projects** — Group environments and manage project membership
- **Configuration** — Configuration variables used during deployments
- **Teams and API keys** — Administer teams and manage programmatic API keys

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 40 / 100
- **Maturity:** Non-Ready
- **Dimensions:**
  - Foundational Compliance: 89 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 48 / 100
  - Agent Usability: 94 / 100
  - Security: 10 / 100
  - AI Discoverability: 71 / 100
- **View full report:** https://jentic.com/apis/env0.com/env0/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring the env0 API by hand means encoding the API Key ID and Secret for HTTP Basic auth and sequencing create, deploy, and destroy calls yourself. Through Jentic you install once, import the env0 API from the API Directory, store the key pair once, and your agent calls the operations.
- **Permission scoping:** env0 puts the environment id in the URL path, so a rule can scope your agent to the operations on one environment. You choose the operations it may call, so destructive ones like destroying or deleting an environment are not included unless you add them.
- **Credential handling:** Your env0 API Key ID and Secret are held by your own Jentic One instance, encrypted, and injected into the Basic auth header at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'deploy an environment' or 'list deployments', and Jentic returns the matching env0 operation with its input schema so the agent runs the right step in the deployment flow.

## Related APIs

- **Scalr API** — Another Terraform and infrastructure-as-code automation platform, an alternative for IaC governance.
- **CircleCI API** — A CI/CD pipeline API that complements env0 by building and testing code before it is deployed.
- **GitHub API** — Source control for the IaC templates env0 deploys, pairing version control with deployment automation.

## FAQ

### What authentication does the env0 API use?

The env0 API uses HTTP Basic authentication, per its OpenAPI spec: you send the API Key ID as the username and the API Key Secret as the password. Through Jentic the credential is held by your own Jentic One instance and attached at execution time, so it never appears in your agent's prompt or logs.

### Can I deploy and destroy environments with the env0 API?

Yes. The API creates an environment, triggers a deployment, lists the deployments recorded against it, and destroys it with an explicit operation. Your agent can run a controlled create, deploy, and teardown flow for an environment.

### What are the rate limits for the env0 API?

The OpenAPI spec does not specify rate limits. Check the env0 documentation at https://docs.env0.com for the current limits before running frequent deployment operations.

### Is there an env0 MCP server?

You do not need an MCP server to give your agent the env0 API. Jentic connects it directly from the API Directory: import it, store your API Key ID and Secret once, and your agent discovers the environment and project operations it needs on demand without loading an extra server's tool definitions into its context.

### Can I limit what my agent is allowed to do with the env0 API?

Yes. env0 puts the environment id in the URL path, so a rule can scope your agent to the operations on one environment, and you choose the operations it may call. Destructive ones like destroying or deleting an environment stay out unless you add them, and every call it makes is logged.

### How do I deploy an env0 environment through Jentic?

Install the Jentic One command line with `curl -fsSL https://raw.githubusercontent.com/jentic/jentic-one/main/tools/install.sh | sh`, then add the env0 API from the Jentic directory and search by intent such as 'deploy an infrastructure environment'. Jentic returns the matching operation with its input schema so your agent builds a valid request. To run it on your own infrastructure, install Jentic One from its GitHub repo.
