# POST /v1/deployments/{deployment_id}/versions/{version}/promote

> Make it live.

In [Deployments API](https://vestra.ai/developers/reference/api/deployments.md): How your Bash is set up, in versions: apply a whole vestra.yaml, promote, roll back, and the interview that drafts the file.

Send `Authorization: Bearer vk_test_...` on every call.

Make it live. Refused unless its latest test run passed.

Your API key, scope `setup` or `all`. On the card: [`deploy`](https://vestra.ai/developers/deploy.md). Over HTTP it is made from the contract: fill in each {…} and every value.

## Request

Path:

- `deployment_id` (`string`, required): The deployment's id (`dep_...`). The /v1/deployments routes also take its name.
- `version` (`string`, required): The version number: 1 is the first, and each save adds one.

Headers:

- `Idempotency-Key` (`string`): Send the same key to retry this call safely for 24 hours.

## Answers 200

- `deployment` (`object`): The deployment, after the promotion.
  - `id` (`string`): The deployment's id. Example: `dep_8f2k`.
  - `object` (`"deployment"`): Always `deployment`.
  - `name` (`string`): Its name, as people read it.
  - `slug` (`string`): Its name in URLs and refs: send it where a route takes `{deployment_id}`. Example: `trip-rescue`.
  - `description` (`string`): What it is for; empty when none was given.
  - `base` (`"bash"`): What it is built on: always `bash`.
  - `status` (`"active" | "archived"`): `active`, or `archived` (put away: no new conversation or version reaches it).
  - `draft_version` (`integer`): The version test keys run. A new save moves it there; a promote with a test key moves it to the version named, older ones included.
  - `live_version` (`integer | null`): The version live keys run; null until one is promoted.
  - `created_at` (`string`): When it was made, as an ISO 8601 date and time in UTC.
  - `updated_at` (`string`): When it last changed, as an ISO 8601 date and time in UTC.
- `promotion` (`object | null`): What moved; null when the version was already live, so nothing did.
  - `object` (`"deployment_promotion"`): Always `deployment_promotion`.
  - `deployment_id` (`string`): The deployment's id. Example: `dep_8f2k`.
  - `action` (`"promote" | "rollback"`): `promote` (a version went live) or `rollback` (an earlier one went back live).
  - `from_version` (`integer | null`): The version live before; null when none was.
  - `to_version` (`integer`): The version live now.
  - `verdict` (`"passed" | "failed" | "none" | "rollback"`): The version's tests when it went live: `passed`, `none` (there were none to run), or `rollback`.
  - `created_at` (`string`): When it went live, as an ISO 8601 date and time in UTC.
- `became_default` (`boolean`): True when this made the deployment the company's default: an ask that names no deployment now reaches it.

## Code

**HTTP**

```bash
curl -X POST "$VESTRA_BASE_URL/v1/deployments/{deployment_id}/versions/{version}/promote" \
  -H "Authorization: Bearer $VESTRA_API_KEY"
```

**TypeScript, Python, CLI, MCP**: No sample in your language for this route, so here it is over HTTP.
