> ## 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.

# Promote Agent to Production

> Pin production to the version currently in staging.

### Overview

Moves the agent's `production` pointer to whatever `staging` is pinned to and records a deployment carrying that version's original semver; promoting never mints a new number. Phone numbers attached to the agent begin answering with the promoted version. No request body. The server does not run checks here: start one with [Start Check Run](https://docs.bland.ai/api-v2/post/agents-id-environments-env-check-runs.md) beforehand and gate on its result yourself.

Requires an admin, owner, operator, or prompter role.

### Headers

**authorization** `string` *required*

Your API key for authentication.

### Path Parameters

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

The agent's unique identifier.

### Response

**data.semver** `string`

The promoted version's number, for example `1.4.0`.

**data.environments** `array`

The agent's three environments after the promote. Each has `id`, `env_type` (`dev`, `staging`, or `production`), and `current_version_id` (the pinned version, or `null` if unpinned). `staging` and `production` now point at the same version.

**errors** `null | array`

`null` on success, or a list of error objects if the request failed. Returns `400 STAGING_UNPINNED` when nothing has been published to staging yet.

```json Response theme={null}
{
  "data": {
    "semver": "1.4.0",
    "environments": [
      {
        "id": "3d5a2d9b-0457-4610-b6d0-86d09b42d8bc",
        "env_type": "dev",
        "current_version_id": null
      },
      {
        "id": "f1ad8610-caea-4c4f-9d9b-3f35bf1a1a43",
        "env_type": "staging",
        "current_version_id": "46201abd-c8e6-4095-a65f-d5135a673627"
      },
      {
        "id": "de65595f-4fbf-4d9e-9ce4-13dd995e863e",
        "env_type": "production",
        "current_version_id": "46201abd-c8e6-4095-a65f-d5135a673627"
      }
    ]
  },
  "errors": null
}
```

```json Staging Unpinned theme={null}
{
  "data": null,
  "errors": [
    {
      "error": "STAGING_UNPINNED",
      "message": "Publish to staging before promoting to production"
    }
  ]
}
```

```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.