---
title: "corestack_deployments_pipeline_restore"
url: https://docs.corefinity.com/mcp/tools/corestack_deployments_pipeline_restore
type: tool
last_updated: 2026-11-13
feature: deployment-pipeline
related:
  - https://docs.corefinity.com/api/reference/deployments/restore-site-deployment-pipeline.md
  - https://docs.corefinity.com/guides/sites/code-and-deployments/pipeline-stages.md
---
# corestack_deployments_pipeline_restore

**Restore a pipeline version.** Restore one saved version of a deployment pipeline, as corestack_deployments_pipeline_versions_list lists it with restorable true. Its stages and settings are saved again as a new version; the current one stays restorable. Scope: write.

- Scope: `write`
- Runs as a task: no

## When to use it

Restore one saved version of a deployment pipeline, one `corestack_deployments_pipeline_versions_list` lists with `restorable: true` (read and compare it first with `corestack_deployments_pipeline_get` `version_id`). Its stages and settings are saved again as a new version, so the current one stays restorable. Send the `revision` you read. Restoring needs write only: the lines were saved before.

The same action in the public REST API, with the same checks, refusals and scope: `POST /api/corestack/sites/{site}/deployments/pipeline/{binding}/restore`.

## Inputs

- `site_id` (integer, ≥ 1, required)
- `binding_id` (integer, ≥ 1): Default: the environment's default binding.
- `version_id` (integer, ≥ 1, required): The version to restore.
- `revision` (string, required): The pipeline revision you read.

### Input schema

```json
{
  "additionalProperties": false,
  "properties": {
    "binding_id": {
      "description": "Default: the environment's default binding.",
      "minimum": 1,
      "type": "integer"
    },
    "revision": {
      "description": "The pipeline revision you read.",
      "type": "string"
    },
    "site_id": {
      "minimum": 1,
      "type": "integer"
    },
    "version_id": {
      "description": "The version to restore.",
      "minimum": 1,
      "type": "integer"
    }
  },
  "required": [
    "site_id",
    "version_id",
    "revision"
  ],
  "type": "object"
}
```

## Refusals

- `forbidden`: the person's role lacks the Edit Environment Deployment Pipeline permission. The message names it and
  says an owner of the company can grant it in Roles; `details.permission` is `editEnvironmentDeploymentPipeline`.
  Nothing is changed.
- `stale`: the pipeline changed since you read it; read it again and resend.
- `pipeline_classic`: that version is the classic pipeline kept for Corefinity, or the binding is still classic; it cannot be restored here.
- `pipeline_locked`: Corefinity has locked this pipeline.
- `managed_elsewhere` (message: "This site is managed by another control panel"): another control panel manages this site, so use that control panel for it. This is refused before anything else about the site, as in the Control Panel and the API. Nothing was done.
- The refusals every tool can answer: `invalid_arguments`, `tenant_mismatch`, `scope_required`, `pin_refused`, `rate_limited`, `temporarily_unavailable`, `internal_error` (corestack://guides/how-this-server-works).

## Example

```json
{
  "name": "corestack_deployments_pipeline_restore",
  "arguments": {
    "site_id": 4211,
    "version_id": 381,
    "revision": "r-8f2c"
  }
}
```

## Prompt

```text
Using the Corefinity MCP server, call corestack_deployments_pipeline_restore with site_id 4211, version_id 381, revision r-8f2c. (Restore a pipeline version.) Tell me what it returned.
```

## The same task elsewhere

- Endpoint: [POST /api/corestack/sites/{site}/deployments/pipeline/{binding}/restore](https://docs.corefinity.com/api/reference/deployments/restore-site-deployment-pipeline.md)
- Guide: [Pipeline](https://docs.corefinity.com/guides/sites/code-and-deployments/pipeline-stages.md)
