---
title: "Accept a carried-over pipeline"
url: https://docs.corefinity.com/api/reference/deployments/accept-site-deployment-carried-over
type: endpoint
last_updated: 2026-11-13
feature: deployment-pipeline
related:
  - https://docs.corefinity.com/guides/sites/code-and-deployments/pipeline-stages.md
  - https://docs.corefinity.com/mcp/tools/corestack_deployments_carryover_accept.md
---
# Accept a carried-over pipeline

Decides the carried-over lines of one pipeline and turns it into a three-stage pipeline. Each line that needs
a look is accepted, removed or edited; `lines` `[]` accepts the translation as it is, once no line needs a
look. Your role needs the Edit Environment Deployment Pipeline permission.

```http
POST /api/corestack/sites/{site}/deployments/carried-over/accept
```

- Scope: `write`
- Also needs `exec` when An edit brings new text
- Two-factor: required on your account (all)
- Rate limit: 20 a minute
- Try it in the console: off. It overwrites data that cannot be brought back. Copy the request and run it yourself when you are sure.

## Path parameters

- `site` (integer, required): The id of a site row. A website's production site and each of its environments has its own id. Digits only.

## Body

- `binding_id` (integer, required)
- `lines` (array of objects, required): A decision for each line that needs a look, named by its `stage` and `index` as the read answers them. An empty list accepts the translation as it is.
  - `action` (string, required) One of `accept`, `remove`, `edit`.
  - `index` (integer, required)
  - `stage` (string, required) One of `build`, `database`, `post_deploy`.
  - `text` (string): With `edit`, the new line.
- `revision` (string): The pipeline's `revision` from the read. Leave it out while that is null.

## Request

### curl

```bash
curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/deployments/carried-over/accept \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "binding_id": 2210,
    "lines": [
      {
        "action": "remove",
        "index": 1,
        "stage": "build"
      }
    ]
  }'
```

### PHP

```php
use Illuminate\Support\Facades\Http;

$response = Http::withToken(env('COREFINITY_TOKEN'))
    ->acceptJson()
    ->post('https://manage.corefinity.com/api/corestack/sites/1042/deployments/carried-over/accept', [
        'binding_id' => 2210,
        'lines' => [
            [
                'action' => 'remove',
                'index' => 1,
                'stage' => 'build',
            ],
        ],
    ]);

$data = $response->json();
```

### Node

```javascript
const res = await fetch('https://manage.corefinity.com/api/corestack/sites/1042/deployments/carried-over/accept', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.COREFINITY_TOKEN}`,
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    binding_id: 2210,
    lines: [
      {
        action: 'remove',
        index: 1,
        stage: 'build',
      },
    ],
  }),
});

// An answer with no body (204) has nothing to parse.
const text = await res.text();
const data = text && JSON.parse(text);
```

### Python

```python
import os
import requests

res = requests.post(
    "https://manage.corefinity.com/api/corestack/sites/1042/deployments/carried-over/accept",
    headers={
        "Authorization": f"Bearer {os.environ['COREFINITY_TOKEN']}",
        "Accept": "application/json",
    },
    json={
        "binding_id": 2210,
        "lines": [
            {
                "action": "remove",
                "index": 1,
                "stage": "build",
            },
        ],
    },
)

data = res.json() if res.content else None
```

## Responses

### 200 What was carried over, with the pipeline now accepted.

```json
{
  "attention_id": "deploy_pipeline_carried:1042",
  "auto_deploy": false,
  "bindings": [
    {
      "also_set": [
        "Maintenance page: off"
      ],
      "binding_id": 2210,
      "label": "Default pipeline",
      "lines": [
        {
          "change": "kept",
          "needs_review": false,
          "result": [
            {
              "stage": "build",
              "text": "composer install --no-dev"
            }
          ],
          "source": {
            "index": 0,
            "stage": "build"
          },
          "text": "composer install --no-dev"
        },
        {
          "change": "removed",
          "needs_review": false,
          "reason": "Copies from the old server need a look",
          "result": [],
          "source": {
            "index": 1,
            "stage": "build"
          },
          "text": "scp web@old.harbourandfinch.example.org:/var/www/media.tgz ."
        }
      ],
      "rehearsal": null,
      "repository": {
        "branch": "main",
        "provider": "gitlab",
        "repo": "northwind-digital/harbourandfinch"
      },
      "revision": "e64e702d17d85dd8",
      "state": "accepted"
    }
  ],
  "files_mode": false,
  "moved_at": null
}
```

### 401 No token, or a token that is not valid.

```json
{
  "message": "Unauthenticated."
}
```

### 403 The token lacks the scope (`scope_required`, with the `scope` to use: `write`, or `exec` when the change brings a command the pipeline does not run now), your company requires two-factor authentication and you have not set it up, or your role lacks the Edit Environment Deployment Pipeline permission (`forbidden`, with `permission`).

```json
{
  "code": "company_unavailable",
  "message": "Your company is unavailable.",
  "reason": "company_unavailable"
}
```

### 404 The id does not exist or is something you cannot see, or the feature is not on for your company (`feature_off`).

```json
{
  "code": "feature_off",
  "message": "Not found.",
  "reason": "feature_off"
}
```

### 409 Nothing was carried over for this pipeline (`not_available`), the translation changed since it was read (`stale`), a credential in it cannot be moved into a deployment variable (`variable_invalid`: contact support), Corefinity has locked the pipeline (`pipeline_locked`), or the site is managed by another control panel (`managed_elsewhere`).

```json
{
  "code": "managed_elsewhere",
  "message": "This site is managed by another control panel",
  "reason": "managed_elsewhere"
}
```

### 422 `lines` is not a list of decisions, or a decision is not one the line can take (`invalid`, with the `field`, such as `lines.0`): a line that still runs n98-magerun cannot be accepted as it is, and a line that picks the Node.js version cannot be edited. Or the lines an edit leaves are refused as a save of them would be, the field named in `errors` only: `line_credentials` (an edit holds a credential), `line_too_long` or `too_many_lines`.

```json
{
  "code": "invalid",
  "errors": {
    "lines.0": [
      "An edit needs its new text, on one line."
    ]
  },
  "field": "lines.0",
  "message": "An edit needs its new text, on one line.",
  "reason": "invalid"
}
```

### 429 Too many requests (`rate_limited`). Wait for the number of seconds in `Retry-After`, which `retry_after_seconds` repeats.

```json
{
  "code": "rate_limited",
  "message": "Too many requests. Try again in 60 seconds.",
  "reason": "rate_limited",
  "retry_after_seconds": 60
}
```

## If it is refused

| Status | Reason | What to do |
|---|---|---|
| 401 |  | Send a valid token as `Authorization: Bearer <token>`. |
| 403 | `company_unavailable` | Your company is unavailable. |
| 403 | `scope_required` | Use a token with the scope named in `scope`. |
| 403 | `forbidden` | The person is not allowed to do this. |
| 403 | `two_factor_required` | Turn on two-factor on your account, then send again. |
| 404 | `feature_off` | This feature is not on for your organisation yet. |
| 409 | `managed_elsewhere` | This site is read-only here. Change it in the control panel that manages it. |
| 409 | `not_available` | The tool does not apply to this object. |
| 422 | `invalid` | Fix the field named in `field`; `errors` says why. |
| 422 | `line_credentials` | This line holds a credential. Move this value into a variable, then save again. |
| 429 | `rate_limited` | Wait for the seconds in `Retry-After`. |

## The same task elsewhere

- Guide: [Pipeline](https://docs.corefinity.com/guides/sites/code-and-deployments/pipeline-stages.md)
- MCP tool: [`corestack_deployments_carryover_accept`](https://docs.corefinity.com/mcp/tools/corestack_deployments_carryover_accept.md)
