> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bland.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# List Agent Environments

> List an agent's environments with their pinned versions.

### Overview

Returns the agent's `dev`, `staging`, and `production` environments, each with the name and semver of the version it is pinned to. `dev` is never pinned: it always runs the newest saved version. Move the `staging` pointer with [Publish Agent to Staging](https://docs.bland.ai/api-v2/post/agents-id-publish.md) and the `production` pointer with [Promote Agent to Production](https://docs.bland.ai/api-v2/post/agents-id-promote.md) or [Roll Back Agent](https://docs.bland.ai/api-v2/post/agents-id-rollback.md).

### Headers

**authorization** `string` *required*

Your API key for authentication.

### Path Parameters

**agent\_id** `string` *required*

The agent's unique identifier.

### Response

**data** `array`

The agent's three environments.

**environment object**

**id** `string`

Unique identifier for the environment.

**env\_type** `string`

One of `dev`, `staging`, `production`.

**current\_version\_id** `string | null`

ID of the version this environment is pinned to. `null` when unpinned. Always `null` for `dev`.

**current\_version** `object | null`

Details of the pinned version, or `null` when unpinned. Contains `name` (the version's saved name, or `null` if it was never named) and `semver` (the version number minted when it was first published, or `null` if it has never been published).

**errors** `null | array`

`null` on success, or a list of error objects if the request failed.

```json Response theme={null}
{
  "data": [
    {
      "id": "3f16480d-528f-4861-9e23-c2f40ceaf895",
      "env_type": "dev",
      "current_version_id": null,
      "current_version": null
    },
    {
      "id": "2d2740be-28ce-4a2b-bcfc-9ad947bb9faa",
      "env_type": "staging",
      "current_version_id": "54bc3ac6-7481-429f-8995-e7b119cf3b06",
      "current_version": {
        "name": "Holiday hours",
        "semver": "1.4.0"
      }
    },
    {
      "id": "bf884f61-5034-48b4-9a2e-2f38fd0af537",
      "env_type": "production",
      "current_version_id": "7a971ff5-3ff8-41bd-a21e-fc3e3537cb6b",
      "current_version": {
        "name": null,
        "semver": "1.3.2"
      }
    }
  ],
  "errors": null
}
```

```json Not Found theme={null}
{
  "data": null,
  "errors": [
    {
      "error": "NOT_FOUND",
      "message": "Agent not found"
    }
  ]
}
```

***

Docs for agents: [llms.txt](https://docs.bland.ai/llms.txt)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.